summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/testing/itest/interface-matching/src/test
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2011-08-19 12:38:10 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2011-08-19 12:38:10 +0000
commited8ec6354e647d4078f6a7f6a8caf409f3774bcd (patch)
tree0b4859d4097ca883dc0975ff3404b2fbd89a9345 /sca-java-2.x/trunk/testing/itest/interface-matching/src/test
parentd8cda281dd77522962239a39af773ce5f9b1fac1 (diff)
Add miss-matched local interface. Accept for the time being that interface matching for remote java interfaces is rather lenient when Java beans are involved.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1159615 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/testing/itest/interface-matching/src/test')
-rw-r--r--sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMissmatchTestCase.java36
1 files changed, 32 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 4ccdc0593c..a15ba144b4 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
@@ -30,11 +30,10 @@ import org.junit.Test;
import org.oasisopen.sca.ServiceRuntimeException;
public class InerfaceMissmatchTestCase {
-
+
+
@Test
- @Ignore("Interfaces are not detected as being incompatible")
public void testLocal() throws Exception {
-
String [] contributions = {"./target/classes"};
Node node1 = NodeFactory.newInstance().createNode(URI.create("tuscany:InerfaceMissmatchTestCase"),
"org/apache/tuscany/sca/itest/interfaces/missmatch/local/MissmatchLocal.composite",
@@ -50,11 +49,37 @@ public class InerfaceMissmatchTestCase {
} catch (ServiceRuntimeException ex){
Assert.assertTrue(ex.getMessage().startsWith("Unable to bind []"));
}
+
+ node1.stop();
+
+ }
+
+ @Test
+ public void testNonDistributedRemotable() throws Exception {
+
+ String [] contributions = {"./target/classes"};
+ Node node1 = NodeFactory.newInstance().createNode(URI.create("tuscany:InerfaceMissmatchTestCase"),
+ "org/apache/tuscany/sca/itest/interfaces/missmatch/local/MissmatchRemoteable.composite",
+ contributions);
+ node1.start();
+
+ ClientComponent local = node1.getService(ClientComponent.class, "LocalClientComponent");
+ ParameterObject po = new ParameterObject();
+
+ try {
+ local.foo1(po);
+ } catch (ServiceRuntimeException ex){
+ //Assert.assertTrue(ex.getMessage().startsWith("Unable to bind []"));
+ Assert.fail("It seems that the matching process can't tell that these don't match as it has a " +
+ "String on one side and a complex type (Java Object) on the other");
+ }
+
+ node1.stop();
}
@Test
- public void testDistributed() throws Exception {
+ public void testDistributedRemotable() throws Exception {
String [] contributions = {"./target/classes"};
Node node1 = NodeFactory.newInstance().createNode(URI.create("tuscany:InerfaceMissmatchTestCase"),
@@ -76,6 +101,9 @@ public class InerfaceMissmatchTestCase {
} catch (ServiceRuntimeException ex){
Assert.assertTrue(ex.getMessage().startsWith("Unable to bind []"));
}
+
+ node1.stop();
+ node2.stop();
}
}