You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2012/08/04 18:26:09 UTC
svn commit: r1369361 - in /webservices/commons/trunk/modules/axiom/modules:
axiom-tests/src/test/java/org/apache/axiom/om/DefaultNSHandlingTest.java
axiom-testutils/src/main/resources/org/apache/axiom/testutils/conformance/default-namespace.xml
Author: veithen
Date: Sat Aug 4 16:26:09 2012
New Revision: 1369361
URL: http://svn.apache.org/viewvc?rev=1369361&view=rev
Log:
AXIOM-311: Refactored part of DefaultNSHandlingTest.
Added:
webservices/commons/trunk/modules/axiom/modules/axiom-testutils/src/main/resources/org/apache/axiom/testutils/conformance/default-namespace.xml (with props)
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/DefaultNSHandlingTest.java
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/DefaultNSHandlingTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/DefaultNSHandlingTest.java?rev=1369361&r1=1369360&r2=1369361&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/DefaultNSHandlingTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/DefaultNSHandlingTest.java Sat Aug 4 16:26:09 2012
@@ -24,38 +24,8 @@ import org.custommonkey.xmlunit.XMLTestC
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
-import java.io.StringReader;
-import java.util.Iterator;
-public class DefaultNSHandlingTest extends XMLTestCase {
-
- public void testDefaultNamespaceWithSameDefaultNSForAll() {
- String testXML = "<html xmlns='http://www.w3.org/TR/REC-html40'>" +
- "<head><title>Frobnostication</title></head>" +
- "<body><p>Moved to <a href='http://frob.com'>here</a>.</p></body>" +
- "</html>";
- OMXMLParserWrapper builder =
- OMXMLBuilderFactory.createOMBuilder(new StringReader(testXML));
- OMElement documentElement = builder.getDocumentElement();
-
- checkNS(documentElement);
-
- checkNSWithChildren(documentElement);
- }
-
- private void checkNSWithChildren(OMElement documentElement) {
- Iterator childElementsIter = documentElement.getChildElements();
- while (childElementsIter.hasNext()) {
- OMElement omElement = (OMElement) childElementsIter.next();
- checkNS(omElement);
- checkNSWithChildren(omElement);
- }
- }
-
- private void checkNS(OMElement element) {
- assertTrue(
- "http://www.w3.org/TR/REC-html40".equals(element.getNamespace().getNamespaceURI()));
- }
+public class DefaultNSHandlingTest /*extends XMLTestCase*/ {
// public void testForIssueWSCOMMONS119() {
//
Added: webservices/commons/trunk/modules/axiom/modules/axiom-testutils/src/main/resources/org/apache/axiom/testutils/conformance/default-namespace.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testutils/src/main/resources/org/apache/axiom/testutils/conformance/default-namespace.xml?rev=1369361&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testutils/src/main/resources/org/apache/axiom/testutils/conformance/default-namespace.xml (added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testutils/src/main/resources/org/apache/axiom/testutils/conformance/default-namespace.xml Sat Aug 4 16:26:09 2012
@@ -0,0 +1 @@
+<html xmlns='http://www.w3.org/TR/REC-html40'><head><title>Frobnostication</title></head><body><p>Moved to <a href='http://frob.com'>here</a>.</p></body></html>
\ No newline at end of file
Propchange: webservices/commons/trunk/modules/axiom/modules/axiom-testutils/src/main/resources/org/apache/axiom/testutils/conformance/default-namespace.xml
------------------------------------------------------------------------------
svn:eol-style = native