summaryrefslogtreecommitdiffstats
path: root/java/sca/itest/nodes
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/itest/nodes')
-rw-r--r--java/sca/itest/nodes/two-nodes-test/pom.xml5
-rw-r--r--java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java16
2 files changed, 21 insertions, 0 deletions
diff --git a/java/sca/itest/nodes/two-nodes-test/pom.xml b/java/sca/itest/nodes/two-nodes-test/pom.xml
index baaddc8738..8d92ab5b05 100644
--- a/java/sca/itest/nodes/two-nodes-test/pom.xml
+++ b/java/sca/itest/nodes/two-nodes-test/pom.xml
@@ -41,6 +41,11 @@
</dependency>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-client-impl</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-implementation-java-runtime</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
diff --git a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java b/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java
index eb1cbea1d5..c4584ac03d 100644
--- a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java
+++ b/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java
@@ -29,6 +29,8 @@ import org.apache.tuscany.sca.node.NodeFactory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.oasisopen.sca.client.SCAClient;
+import org.oasisopen.sca.client.SCAClientFactory;
/**
* This shows how to test the Calculator service component.
@@ -62,6 +64,20 @@ public class TwoNodesTestCase{
assertEquals("Hi Hello Petra", client.sayHello("Petra"));
}
+ @Test
+ public void testCalculatorClientAPI() throws Exception {
+
+ // Ideally this would use the SCAClient API but leaving that tillwe have the basics working
+ SCAClient scaClient = SCAClientFactory.newInstance();
+ Helloworld service = scaClient.getService(Helloworld.class, "HelloworldService", null);
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = scaClient.getService(Helloworld.class, "HelloworldClient", null);
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+ }
+
@AfterClass
public static void tearDownAfterClass() throws Exception {
if (serviceNode != null) {