[java-identity-provider COMMIT] in /trunk/idp-saml-impl/src: main/java/net/shibboleth/idp/saml/impl/xmlobject/XMLObje...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Apr 4 21:18:18 BST 2012
Author: putmanb
Date: Wed Apr 4 21:18:18 2012
New Revision: 4166
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4166&view=rev
Log:
Update Shib metadata extension unit tests for OpenSAML TestNG conversion.
Add missing XMLObject provider configuration resource file.
Add XMLObject provider Initializer impl and services API declaration.
Added:
trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/xmlobject/XMLObjectProviderInitializer.java (with props)
trunk/idp-saml-impl/src/main/resources/META-INF/
trunk/idp-saml-impl/src/main/resources/META-INF/services/
trunk/idp-saml-impl/src/main/resources/META-INF/services/org.opensaml.core.config.Initializer
trunk/idp-saml-impl/src/main/resources/shibboleth-saml-metadata-ext-config.xml (with props)
Modified:
trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/xmlobject/KeyAuthorityTest.java
trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/xmlobject/ScopeTest.java
trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/xmlobject/ScopedValueTest.java
Modified: trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/xmlobject/KeyAuthorityTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/xmlobject/KeyAuthorityTest.java?rev=4166&r1=4165&r2=4166&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/xmlobject/KeyAuthorityTest.java (original)
+++ trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/xmlobject/KeyAuthorityTest.java Wed Apr 4 21:18:18 2012
@@ -21,14 +21,16 @@
import net.shibboleth.idp.saml.xmlobject.KeyAuthority;
+import org.opensaml.core.xml.XMLObjectProviderBaseTestCase;
import org.opensaml.xmlsec.signature.KeyInfo;
import org.testng.Assert;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
/**
* Testing shibmd:KeyAuthority metadata extension.
*/
-public class KeyAuthorityTest extends BaseShibObjectProviderTestCase {
+public class KeyAuthorityTest extends XMLObjectProviderBaseTestCase {
private Integer expectedVerifyDepth;
@@ -40,15 +42,14 @@
/** Constructor. */
public KeyAuthorityTest() {
- singleElementFile = DATA_PATH + "/impl/ShibMDKeyAuthority.xml";
- singleElementOptionalAttributesFile = DATA_PATH + "/impl/ShibMDKeyAuthorityOptionalAttributes.xml";
- childElementsFile = DATA_PATH + "/impl/ShibMDKeyAuthorityChildElements.xml";
+ singleElementFile = "/net/shibboleth/idp/saml/impl/xmlobject/ShibMDKeyAuthority.xml";
+ singleElementOptionalAttributesFile = "/net/shibboleth/idp/saml/impl/xmlobject/ShibMDKeyAuthorityOptionalAttributes.xml";
+ childElementsFile = "/net/shibboleth/idp/saml/impl/xmlobject/ShibMDKeyAuthorityChildElements.xml";
}
/** {@inheritDoc} */
- protected void setUp() throws Exception {
- super.setUp();
-
+ @BeforeMethod
+ protected void setUp() throws Exception {
expectedVerifyDepth = new Integer(5);
expectedNumKeyInfos = 4;
@@ -57,14 +58,16 @@
}
/** {@inheritDoc} */
- public void testSingleElementMarshall() {
+ @Test
+ public void testSingleElementMarshall() {
KeyAuthority keyAuthority = (KeyAuthority) buildXMLObject(KeyAuthority.DEFAULT_ELEMENT_NAME);
assertXMLEquals(expectedDOM, keyAuthority);
}
/** {@inheritDoc} */
- public void testSingleElementOptionalAttributesMarshall() {
+ @Test
+ public void testSingleElementOptionalAttributesMarshall() {
KeyAuthority keyAuthority = (KeyAuthority) buildXMLObject(KeyAuthority.DEFAULT_ELEMENT_NAME);
keyAuthority.setVerifyDepth(expectedVerifyDepth);
@@ -74,7 +77,8 @@
}
/** {@inheritDoc} */
- public void testChildElementsMarshall() {
+ @Test
+ public void testChildElementsMarshall() {
KeyAuthority keyAuthority = (KeyAuthority) buildXMLObject(KeyAuthority.DEFAULT_ELEMENT_NAME);
for (int i = 0; i < expectedNumKeyInfos; i++) {
Modified: trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/xmlobject/ScopeTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/xmlobject/ScopeTest.java?rev=4166&r1=4165&r2=4166&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/xmlobject/ScopeTest.java (original)
+++ trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/xmlobject/ScopeTest.java Wed Apr 4 21:18:18 2012
@@ -19,13 +19,16 @@
import net.shibboleth.idp.saml.xmlobject.Scope;
+import org.opensaml.core.xml.XMLObjectProviderBaseTestCase;
import org.opensaml.core.xml.schema.XSBooleanValue;
import org.testng.Assert;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
/**
* Testing shibmd:Scope metadata extension.
*/
[... 188 lines stripped ...]
More information about the commits
mailing list