Author: veithen
Date: Thu Mar 31 16:29:07 2011
New Revision: 1087364
URL: http://svn.apache.org/viewvc?rev=1087364&view=rev
Log:
No need to parse documents into DOM. XMLUnit supports comparing XML documents
as strings.
Removed:
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/AbstractOMSerializationTest.java
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/AttrNsTest.java
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/AttrNsTest.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/AttrNsTest.java?rev=1087364&r1=1087363&r2=1087364&view=diff
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/AttrNsTest.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/AttrNsTest.java
Thu Mar 31 16:29:07 2011
@@ -21,12 +21,13 @@ package org.apache.axiom.om;
import org.apache.axiom.om.util.StAXUtils;
import org.custommonkey.xmlunit.Diff;
-import org.w3c.dom.Document;
+import org.custommonkey.xmlunit.XMLTestCase;
+
import javax.xml.stream.XMLStreamReader;
import java.io.StringReader;
import java.util.Iterator;
-public class AttrNsTest extends AbstractOMSerializationTest {
+public class AttrNsTest extends XMLTestCase {
public void testAttributesWithProgrammaticalCreation() throws Exception {
String expectedXML =
"<AttributeTester xmlns=\"\"
xmlns:myAttr2NS=\"http://test-attributes-2.org\" " +
@@ -49,10 +50,7 @@ public class AttrNsTest extends Abstract
}
assertTrue(nsCount == 2);
- Document document1 = newDocument(expectedXML);
- Document document2 = newDocument(omElement.toString());
-
- Diff diff = compareXML(document1, document2);
+ Diff diff = compareXML(expectedXML, omElement.toString());
assertXMLEqual(diff, true);
}
@@ -74,9 +72,7 @@ public class AttrNsTest extends Abstract
// now print the object after it has been processed
System.out.println("after - '" + documentElement.toString() + "'");
- Document document1 = newDocument(xmlString);
- Document document2 = newDocument(documentElement.toString());
- Diff diff = compareXML(document1, document2);
+ Diff diff = compareXML(xmlString, documentElement.toString());
assertXMLEqual(diff, true);
}
}