summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/itest/ws/defaults/src/test/java/org
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-03-16 13:16:47 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-03-16 13:16:47 +0000
commitbc4a1fa45decc2e1bf30e1892ab8c3c8af3e3bfe (patch)
tree35cd08383f6b68100c9af9fb2bef3a72121371dd /sca-java-2.x/trunk/itest/ws/defaults/src/test/java/org
parentf0d84f946b1ce94cba6c082cad881708b5d8eaa4 (diff)
Add in a complex type test (was HelloWorldNoWSDLTestCase. Simplify package naming to match other ws tests.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@923726 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/itest/ws/defaults/src/test/java/org')
-rw-r--r--sca-java-2.x/trunk/itest/ws/defaults/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/DefaultsTestCase.java34
1 files changed, 29 insertions, 5 deletions
diff --git a/sca-java-2.x/trunk/itest/ws/defaults/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/DefaultsTestCase.java b/sca-java-2.x/trunk/itest/ws/defaults/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/DefaultsTestCase.java
index f7e6ee9981..1e4c1fcbff 100644
--- a/sca-java-2.x/trunk/itest/ws/defaults/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/DefaultsTestCase.java
+++ b/sca-java-2.x/trunk/itest/ws/defaults/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/DefaultsTestCase.java
@@ -21,7 +21,7 @@ package org.apache.tuscany.sca.binding.ws.axis2;
import junit.framework.TestCase;
-import org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorld;
+import org.apache.tuscany.sca.binding.ws.axis2.HelloWorld;
import org.apache.tuscany.sca.node.Contribution;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
@@ -31,10 +31,6 @@ public class DefaultsTestCase extends TestCase {
private Node node;
private HelloWorld helloWorld;
- public void testCalculator() throws Exception {
- assertEquals("Hello petra", helloWorld.getGreetings("petra"));
- }
-
@Override
protected void setUp() throws Exception {
node = NodeFactory.newInstance().createNode(new Contribution("test", "target/classes"));
@@ -42,6 +38,34 @@ public class DefaultsTestCase extends TestCase {
helloWorld = node.getService(HelloWorld.class, "HelloWorldClient");
}
+ public void testCalculator() throws Exception {
+ assertEquals("Hello petra", helloWorld.getGreetings("petra"));
+
+ Foo f = new Foo();
+ Bar b1 = new Bar();
+ b1.setS("petra");
+ b1.setX(1);
+ b1.setY(new Integer(2));
+ b1.setB(Boolean.TRUE);
+ Bar b2 = new Bar();
+ b2.setS("beate");
+ b2.setX(3);
+ b2.setY(new Integer(4));
+ b2.setB(Boolean.FALSE);
+ f.setBars(new Bar[] { b1, b2} );
+
+ Foo f2 = helloWorld.getGreetingsComplex(f);
+
+ assertEquals("petra", f2.getBars()[0].getS());
+ assertEquals(1, f2.getBars()[0].getX());
+ assertEquals(2, f2.getBars()[0].getY().intValue());
+ assertTrue(f2.getBars()[0].getB().booleanValue());
+ assertEquals("simon", f2.getBars()[1].getS());
+ assertEquals(4, f2.getBars()[1].getX());
+ assertEquals(5, f2.getBars()[1].getY().intValue());
+ assertTrue(f2.getBars()[1].getB().booleanValue());
+ }
+
@Override
protected void tearDown() throws Exception {
node.stop();