[java-opensaml COMMIT] in /trunk: opensaml-core/src/test/java/org/opensaml/core/xml/MarshallingTest.java opensaml-cor...
noreply at shibboleth.net
noreply at shibboleth.net
Thu Apr 5 17:40:21 BST 2012
Author: putmanb
Date: Thu Apr 5 17:40:20 2012
New Revision: 3028
URL: http://svn.shibboleth.net/view/java-opensaml?rev=3028&view=rev
Log:
Refactor unit tests to use new java-support XMLAssertTestNG class.
Remove JUnit dependency from all java-opensaml projects.
Bye bye JUnit.
Modified:
trunk/opensaml-core/src/test/java/org/opensaml/core/xml/MarshallingTest.java
trunk/opensaml-core/src/test/java/org/opensaml/core/xml/XMLObjectBaseTestCase.java
trunk/opensaml-parent/pom.xml
trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/RoundTripTest.java
trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/binding/artifact/BasicSAMLArtifactMapEntryTest.java
trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/common/binding/artifact/BasicSAMLArtifactMapTest.java
trunk/opensaml-soap-impl/src/test/java/org/opensaml/soap/WSBaseTestCase.java
trunk/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/encoder/SOAP11EncoderTest.java
trunk/opensaml-soap-impl/src/test/java/org/opensaml/soap/wssecurity/impl/WSSecurityObjectsTestCase.java
Modified: trunk/opensaml-core/src/test/java/org/opensaml/core/xml/MarshallingTest.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-core/src/test/java/org/opensaml/core/xml/MarshallingTest.java?rev=3028&r1=3027&r2=3028&view=diff
==============================================================================
--- trunk/opensaml-core/src/test/java/org/opensaml/core/xml/MarshallingTest.java (original)
+++ trunk/opensaml-core/src/test/java/org/opensaml/core/xml/MarshallingTest.java Thu Apr 5 17:40:20 2012
@@ -24,7 +24,7 @@
import net.shibboleth.utilities.java.support.xml.XMLParserException;
import org.custommonkey.xmlunit.Diff;
-import org.custommonkey.xmlunit.XMLAssert;
+import net.shibboleth.utilities.java.support.xml.XMLAssertTestNG;
import org.opensaml.core.xml.io.Marshaller;
import org.opensaml.core.xml.io.MarshallingException;
import org.opensaml.core.xml.mock.SimpleXMLObject;
@@ -154,7 +154,7 @@
// Marshall statement (with cached DOM) into SOAP Body element child
Document expectedDocument = parserPool.parse(MarshallingTest.class.getResourceAsStream(expectedDocumentLocation));
Element statementElem = marshaller.marshall(statement, soapBody);
- XMLAssert.assertXMLIdentical(new Diff(expectedDocument, statementElem.getOwnerDocument()), true);
+ XMLAssertTestNG.assertXMLIdentical(new Diff(expectedDocument, statementElem.getOwnerDocument()), true);
Assert.assertNull(response.getDOM(), "Parent of XML fragment DOM was not invalidated during marshalling");
Assert.assertNotNull(statement.getDOM(), "XML fragment DOM was invalidated during marshalling");
}
Modified: trunk/opensaml-core/src/test/java/org/opensaml/core/xml/XMLObjectBaseTestCase.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-core/src/test/java/org/opensaml/core/xml/XMLObjectBaseTestCase.java?rev=3028&r1=3027&r2=3028&view=diff
==============================================================================
--- trunk/opensaml-core/src/test/java/org/opensaml/core/xml/XMLObjectBaseTestCase.java (original)
+++ trunk/opensaml-core/src/test/java/org/opensaml/core/xml/XMLObjectBaseTestCase.java Thu Apr 5 17:40:20 2012
@@ -30,7 +30,7 @@
import net.shibboleth.utilities.java.support.xml.XMLParserException;
import org.custommonkey.xmlunit.Diff;
-import org.custommonkey.xmlunit.XMLAssert;
+import net.shibboleth.utilities.java.support.xml.XMLAssertTestNG;
import org.custommonkey.xmlunit.XMLUnit;
import org.opensaml.core.OpenSAMLInitBaseTestCase;
import org.opensaml.core.config.InitializationService;
@@ -123,7 +123,7 @@
if (log.isDebugEnabled()) {
log.debug("Marshalled DOM was " + SerializeSupport.nodeToString(generatedDOM));
}
- XMLAssert.assertXMLIdentical(failMessage, new Diff(expectedDOM, generatedDOM.getOwnerDocument()), true);
+ XMLAssertTestNG.assertXMLIdentical(failMessage, new Diff(expectedDOM, generatedDOM.getOwnerDocument()), true);
} catch (Exception e) {
Assert.fail("Marshalling failed with the following error: " + e);
}
Modified: trunk/opensaml-parent/pom.xml
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-parent/pom.xml?rev=3028&r1=3027&r2=3028&view=diff
==============================================================================
--- trunk/opensaml-parent/pom.xml (original)
+++ trunk/opensaml-parent/pom.xml Thu Apr 5 17:40:20 2012
@@ -81,17 +81,15 @@
<!-- Runtime Dependencies -->
<!-- Test Dependencies -->
-
- <!-- TODO JUnit is just temporary until TestNG conversion -->
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
[... 170 lines stripped ...]
More information about the commits
mailing list