summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2011-08-19 13:15:52 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2011-08-19 13:15:52 +0000
commit4ca42d5aeabc4e7309cbd3773db4f183f12af1e2 (patch)
tree89c7d19c59edd04c699bb3e4b1552743b84dc86b /sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache
parented8ec6354e647d4078f6a7f6a8caf409f3774bcd (diff)
TUSCANY-3916 - Add local callback miss-match case. Remote callback case to follow.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1159623 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache')
-rw-r--r--sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMissmatchTestCase.java52
1 files changed, 48 insertions, 4 deletions
diff --git a/sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMissmatchTestCase.java b/sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMissmatchTestCase.java
index a15ba144b4..203b1a4ce0 100644
--- a/sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMissmatchTestCase.java
+++ b/sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMissmatchTestCase.java
@@ -31,7 +31,12 @@ import org.oasisopen.sca.ServiceRuntimeException;
public class InerfaceMissmatchTestCase {
-
+ /**
+ * Non-remoteable client and service interfaces where the parameter types of one of the operations don't match.
+ * Components running in the same composite/JVM, i.e. no remote registry
+ *
+ * @throws Exception
+ */
@Test
public void testLocal() throws Exception {
String [] contributions = {"./target/classes"};
@@ -50,10 +55,43 @@ public class InerfaceMissmatchTestCase {
Assert.assertTrue(ex.getMessage().startsWith("Unable to bind []"));
}
- node1.stop();
-
+ node1.stop();
}
+
+ /**
+ * Non-remoteable client and service interfaces where the parameter types of one of the callback operations don't match.
+ * Components running in the same composite/JVM, i.e. no remote registry
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testCallbackLocal() throws Exception {
+ String [] contributions = {"./target/classes"};
+ Node node1 = NodeFactory.newInstance().createNode(URI.create("tuscany:InerfaceMissmatchTestCase"),
+ "org/apache/tuscany/sca/itest/interfaces/missmatch/local/MissmatchCallbackLocal.composite",
+ contributions);
+ node1.start();
+
+ ClientComponent local = node1.getService(ClientComponent.class, "LocalClientComponent");
+ ParameterObject po = new ParameterObject();
+
+ try {
+ local.foo1(po);
+ Assert.fail("Expection exteption indicating that interfaces don't match");
+ } catch (ServiceRuntimeException ex){
+ Assert.assertTrue(ex.getMessage().startsWith("Unable to bind []"));
+ }
+
+ node1.stop();
+ }
+ /**
+ * Remoteable client and service interfaces where the parameter types of one of the operations don't match.
+ * Components running in the same composite/JVM, i.e. no remote registry
+ * Tuscany is not able to detect miss-match here?
+ *
+ * @throws Exception
+ */
@Test
public void testNonDistributedRemotable() throws Exception {
@@ -77,7 +115,13 @@ public class InerfaceMissmatchTestCase {
node1.stop();
}
-
+ /**
+ * Remoteable client and service interfaces where the parameter types of one of the operations don't match.
+ * Components running in the seaprate composite/JVM, i.e. there is a remote registry
+ * Both of the interfaces are converted to WSDL and Tuscany is able to detect miss-match.
+ *
+ * @throws Exception
+ */
@Test
public void testDistributedRemotable() throws Exception {