Author: keith
Date: Thu Apr 17 08:17:08 2008
New Revision: 15757
Log:
Adding clients for appendChild and prependChild
Modified:
trunk/mashup/java/modules/integration/test/org/wso2/mashup/integration/E4XTest.java
Modified:
trunk/mashup/java/modules/integration/test/org/wso2/mashup/integration/E4XTest.java
==============================================================================
---
trunk/mashup/java/modules/integration/test/org/wso2/mashup/integration/E4XTest.java
(original)
+++
trunk/mashup/java/modules/integration/test/org/wso2/mashup/integration/E4XTest.java
Thu Apr 17 08:17:08 2008
@@ -62,4 +62,38 @@
"<employee xmlns:test=\"http://wso2.com\"
id=\"0\"><name>Jim</name><age>25</age></employee>",
result.getFirstElement().getFirstElement().getFirstElement().toString());
}
+
+ /**
+ * Tests the appendChild method of the E4X Impl
+ * @throws Exception - Thrown in case an exception occurs
+ */
+ public void testAppendChild() throws Exception {
+ Options options = new Options();
+ options.setTo(endpointReference);
+ options.setAction(
+
"http://services.mashup.wso2.org/E4XTest/ServiceInterface/appendChildRequest");
+ sender.setOptions(options);
+ OMElement result = sender.sendReceive(null);
+ // Test weather the element was appended correctly
+ TestCase.assertEquals(
+ "<employee
id=\"0\"><name>Jim</name><age>25</age><hobby>snorkeling</hobby></employee>",
+
result.getFirstElement().getFirstElement().getFirstElement().toString());
+ }
+
+ /**
+ * Tests the prependChild method of the E4X Impl
+ * @throws Exception - Thrown in case an exception occurs
+ */
+ public void testPrependChild() throws Exception {
+ Options options = new Options();
+ options.setTo(endpointReference);
+ options.setAction(
+
"http://services.mashup.wso2.org/E4XTest/ServiceInterface/prependChildRequest");
+ sender.setOptions(options);
+ OMElement result = sender.sendReceive(null);
+ // Test weather the element was prepended correctly
+ TestCase.assertEquals(
+ "<employee
id=\"0\"><hobby>snorkeling</hobby><name>Jim</name><age>25</age></employee>",
+
result.getFirstElement().getFirstElement().getFirstElement().toString());
+ }
}
\ No newline at end of file
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev