diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-08 10:45:16 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-08 10:45:16 +0000 |
commit | 586665176220b1fc44db3c6228605931b2a5f9b5 (patch) | |
tree | a0ce2c06c1ad3f895b8b410dabb94a098af396c8 /java | |
parent | 081650ead4099bea3723c041ab2f9c04364e8f6b (diff) |
Add a testcase to the two-nodes test that uses the SCAClient API
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@782589 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r-- | java/sca/itest/nodes/two-nodes-test/pom.xml | 5 | ||||
-rw-r--r-- | java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java | 16 |
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) {
|