summaryrefslogtreecommitdiffstats
path: root/java/sca/itest/scaclient-api/src
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-05-06 09:40:17 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-05-06 09:40:17 +0000
commit8ec67f4a7e114d8bbaaa0346578b79560bde475c (patch)
treed2968f108f52847c688dc46f70f02b9928d1621a /java/sca/itest/scaclient-api/src
parent11088b40c732b601dbe6e96400d13d9a0715059e (diff)
Continue exploring sca client api with a new module for the client implementation
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@772115 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/itest/scaclient-api/src')
-rw-r--r--java/sca/itest/scaclient-api/src/test/java/SCAClientTestCase.java17
1 files changed, 8 insertions, 9 deletions
diff --git a/java/sca/itest/scaclient-api/src/test/java/SCAClientTestCase.java b/java/sca/itest/scaclient-api/src/test/java/SCAClientTestCase.java
index 5ba76a039d..9978cb07e2 100644
--- a/java/sca/itest/scaclient-api/src/test/java/SCAClientTestCase.java
+++ b/java/sca/itest/scaclient-api/src/test/java/SCAClientTestCase.java
@@ -1,14 +1,12 @@
-
+import java.net.URI;
import itest.HelloworldService;
import junit.framework.TestCase;
import org.apache.tuscany.sca.node.Node;
-import org.oasisopen.sca.client.SCAClient;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.oasisopen.sca.client.SCAClientFactory;
-
-
/**
* Test SCADomain.newInstance and invocation of a service.
*
@@ -16,21 +14,22 @@ import org.oasisopen.sca.client.SCAClientFactory;
*/
public class SCAClientTestCase extends TestCase {
- private SCAClient scaClient;
-
+ private Node node;
+
@Override
protected void setUp() throws Exception {
- scaClient = SCAClientFactory.newInstance();
+ node = NodeFactory.newInstance().createNode();
+ node.start();
}
public void testInvoke() throws Exception {
- HelloworldService service = scaClient.getService(HelloworldService.class, "HelloworldComponent", null);
+ HelloworldService service = SCAClientFactory.newInstance().getService(HelloworldService.class, "HelloworldComponent", URI.create("default"));
assertEquals("Hello petra", service.sayHello("petra"));
}
@Override
protected void tearDown() throws Exception {
- ((Node)scaClient).stop();
+ node.stop();
}
}