Author: thomas.diesler(a)jboss.com
Date: 2007-08-13 08:25:54 -0400 (Mon, 13 Aug 2007)
New Revision: 4330
Modified:
stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/common/utils/DOMWriterTestCase.java
Log:
Add testNamespaceCompletionDefault
Modified:
stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/common/utils/DOMWriterTestCase.java
===================================================================
---
stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/common/utils/DOMWriterTestCase.java 2007-08-13
10:55:42 UTC (rev 4329)
+++
stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/common/utils/DOMWriterTestCase.java 2007-08-13
12:25:54 UTC (rev 4330)
@@ -133,6 +133,34 @@
assertEquals(expStr, wasStr);
}
+ /** The envelope defines a default namespace
+ */
+ public void testNamespaceCompletionDefault() throws Exception
+ {
+ String inStr =
+ "<env:Envelope
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'
xmlns='http://somens'>" +
+ "<env:Body>" +
+ "<rpc>" +
+ "<param1/>" +
+ "<param2/>" +
+ "</rpc>" +
+ "</env:Body>" +
+ "</env:Envelope>";
+
+ Element env = DOMUtils.parse(inStr);
+ Element body = DOMUtils.getFirstChildElement(env);
+ Element rpc = DOMUtils.getFirstChildElement(body);
+
+ String expStr =
+ "<rpc xmlns='http://somens'>" +
+ "<param1/>" +
+ "<param2/>" +
+ "</rpc>";
+
+ String wasStr = DOMWriter.printNode(rpc, false);
+ assertEquals(expStr, wasStr);
+ }
+
/** The element does not contain the required attribute ns declaration.
*/
public void testNamespaceCompletionAttribute() throws Exception