From ff535b57b0ee3029230092809c979e8d6bc512e9 Mon Sep 17 00:00:00 2001 From: antelder Date: Fri, 3 Jul 2009 16:21:31 +0000 Subject: 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 --- .../src/test/java/test/scaclient/SCAClientTestCase.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'java') 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")); } -- cgit v1.2.3