summaryrefslogtreecommitdiffstats
path: root/java/sca/itest
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-07-03 16:21:31 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-07-03 16:21:31 +0000
commitff535b57b0ee3029230092809c979e8d6bc512e9 (patch)
treeabc23ad87ad115033266d8a957cf1db81bd498f9 /java/sca/itest
parentcc476100fc8175a60f6f6aaa4fe7743f7384f3f2 (diff)
Start bringing up the client api to the recent proposals
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@790962 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/itest')
-rw-r--r--java/sca/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/java/sca/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java b/java/sca/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java
index f8c0d9034e..a331e4dd22 100644
--- a/java/sca/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java
+++ b/java/sca/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java
@@ -20,13 +20,11 @@
package test.scaclient;
import itest.HelloworldService;
-
-import java.net.URI;
-
import junit.framework.TestCase;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
+import org.oasisopen.sca.client.SCAClient;
import org.oasisopen.sca.client.SCAClientFactory;
/**
@@ -46,9 +44,12 @@ public class SCAClientTestCase extends TestCase {
public void testInvoke() throws Exception {
HelloworldService service =
- SCAClientFactory.newInstance().getService(HelloworldService.class,
- "HelloworldComponent",
- URI.create(Node.DEFAULT_DOMAIN_URI));
+ SCAClientFactory.newInstance(null).getService(HelloworldService.class, "HelloworldComponent");
+ assertEquals("Hello petra", service.sayHello("petra"));
+ }
+
+ public void testSimpleAPI() throws Exception {
+ HelloworldService service = SCAClient.getService(HelloworldService.class, "/HelloworldComponent");
assertEquals("Hello petra", service.sayHello("petra"));
}