summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-07-28 10:43:41 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-07-28 10:43:41 +0000
commita7924f87bed97d3f31355d51ab0079a99cb56caa (patch)
tree9ce3b34742877c3a5e288bddc914a31af62644d4 /sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test
parent9e52793370e243c647f6df181402a827e1948c67 (diff)
TUSCANY-3635 - added a new test to help with the investigation of the issue Fabiano reported to the ML. See JIRA for link. The test is @Ignored at the moment as the 2.x binding.jsonp exhibits issues also.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@980015 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test')
-rw-r--r--sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/BeanA.java60
-rw-r--r--sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldClient.java3
-rw-r--r--sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldImpl.java4
-rw-r--r--sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldService.java2
-rw-r--r--sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/test/BindingTestCase.java20
5 files changed, 87 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/BeanA.java b/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/BeanA.java
new file mode 100644
index 0000000000..c8fd365da5
--- /dev/null
+++ b/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/BeanA.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+public class BeanA {
+
+ protected Boolean b;
+ protected String s;
+ protected int x;
+ protected Integer y;
+
+ public Boolean getB() {
+ return b;
+ }
+
+ public void setB(Boolean b) {
+ this.b = b;
+ }
+
+ public String getS() {
+ return s;
+ }
+
+ public void setS(String s) {
+ this.s = s;
+ }
+
+ public int getX() {
+ return x;
+ }
+
+ public void setX(int x) {
+ this.x = x;
+ }
+
+ public Integer getY() {
+ return y;
+ }
+
+ public void setY(Integer y) {
+ this.y = y;
+ }
+}
diff --git a/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldClient.java b/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldClient.java
index 97c5084910..66cf8f5b98 100644
--- a/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldClient.java
+++ b/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldClient.java
@@ -34,4 +34,7 @@ public class HelloWorldClient implements HelloWorldService {
return ref.sayHello2(firstName, lastName);
}
+ public BeanA sayHello3(BeanA bean) {
+ return ref.sayHello3(bean);
+ }
}
diff --git a/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldImpl.java b/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldImpl.java
index 99f2958d0d..8e7f0ae271 100644
--- a/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldImpl.java
+++ b/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldImpl.java
@@ -29,4 +29,8 @@ public class HelloWorldImpl implements HelloWorldService {
return "Hello " + firstName + " " + lastName;
}
+ public BeanA sayHello3(BeanA bean) {
+ return bean;
+ }
+
}
diff --git a/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldService.java b/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldService.java
index b252eddbed..a215ecf4be 100644
--- a/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldService.java
+++ b/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/helloworld/HelloWorldService.java
@@ -26,5 +26,7 @@ public interface HelloWorldService {
String sayHello(String name);
String sayHello2(String firstName, String lastName);
+
+ BeanA sayHello3(BeanA bean);
}
diff --git a/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/test/BindingTestCase.java b/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/test/BindingTestCase.java
index efec56bbe3..5a8e5ac533 100644
--- a/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/test/BindingTestCase.java
+++ b/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/test/java/test/BindingTestCase.java
@@ -18,6 +18,7 @@
*/
package test;
+import helloworld.BeanA;
import helloworld.HelloWorldService;
import java.io.BufferedReader;
@@ -33,6 +34,7 @@ import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
+import org.junit.Ignore;
import org.junit.Test;
public class BindingTestCase {
@@ -55,7 +57,7 @@ public class BindingTestCase {
String response = br.readLine();
Assert.assertEquals("foo(\"Hello petra arnold\");", response);
- }
+ }
@Test
public void testReference() throws MalformedURLException, IOException {
@@ -64,8 +66,22 @@ public class BindingTestCase {
Assert.assertEquals("Hello beate", client.sayHello("beate"));
Assert.assertEquals("Hello beate arnold", client.sayHello2("beate", "arnold"));
-
}
+
+ @Test
+ @Ignore("TUSCANY-3635")
+ public void testComplexParams() throws MalformedURLException, IOException {
+
+ HelloWorldService client = node.getService(HelloWorldService.class, "HelloWorldClient");
+
+ BeanA bean = new BeanA();
+ bean.setB(true);
+ bean.setS("Fred");
+ bean.setX(2);
+ bean.setX(5);
+
+ Assert.assertEquals("Fred", client.sayHello3(bean).getS());
+ }
@BeforeClass
public static void init() throws Exception {