summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/OneNodeTestCase.java
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-11-25 11:12:03 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-11-25 11:12:03 +0000
commit82aa0cfbd6f8ff0e2c73015cc1e1d03fffd48808 (patch)
tree374c32ff5abc3b2224cd33528ffaf8a7461a7302 /sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/OneNodeTestCase.java
parentde5197c39ffbdaec890debe429faf1c07212e338 (diff)
Remove SCAClient as its not in the latest spec and update all the places it was used to use SCAClientFactory.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@884043 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/OneNodeTestCase.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/OneNodeTestCase.java b/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/OneNodeTestCase.java
index 100cbde17a..ab237e6af6 100644
--- a/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/OneNodeTestCase.java
+++ b/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/OneNodeTestCase.java
@@ -24,13 +24,14 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
import itest.nodes.Helloworld;
-import org.apache.tuscany.sca.domain.node.DomainNode;
+import java.net.URI;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.oasisopen.sca.NoSuchDomainException;
import org.oasisopen.sca.NoSuchServiceException;
-import org.oasisopen.sca.client.SCAClient;
+import org.oasisopen.sca.client.SCAClientFactory;
/**
* This shows how to test the Calculator service component.
@@ -49,14 +50,14 @@ public class OneNodeTestCase{
@Test
public void testService() throws Exception {
- Helloworld service = SCAClient.getService(Helloworld.class, "defaultDomain/HelloworldService");
+ Helloworld service = SCAClientFactory.newInstance(URI.create("vm://defaultDomain")).getService(Helloworld.class, "HelloworldService");
assertNotNull(service);
assertEquals("Hello Petra", service.sayHello("Petra"));
}
@Test
public void testClient() throws Exception {
- Helloworld client = SCAClient.getService(Helloworld.class, "defaultDomain/HelloworldClient");
+ Helloworld client = SCAClientFactory.newInstance(URI.create("vm://defaultDomain")).getService(Helloworld.class, "HelloworldClient");
assertNotNull(client);
assertEquals("Hi Hello Petra", client.sayHello("Petra"));
}
@@ -65,13 +66,13 @@ public class OneNodeTestCase{
public void testRemovingServiceContribution() throws Exception {
domain.removeContribution(serviceContributionUri);
try {
- SCAClient.getService(Helloworld.class, "defaultDomain/HelloworldService");
+ SCAClientFactory.newInstance(URI.create("vm://defaultDomain")).getService(Helloworld.class, "HelloworldService");
// FIXME: should this be NoSuchServiceException or ServiceNotFoundException?
} catch (NoSuchServiceException e) {
// expected
}
- Helloworld client = SCAClient.getService(Helloworld.class, "defaultDomain/HelloworldClient");
+ Helloworld client = SCAClientFactory.newInstance(URI.create("vm://defaultDomain")).getService(Helloworld.class, "HelloworldClient");
assertNotNull(client);
try {
assertEquals("Hi Hello Petra", client.sayHello("Petra"));
@@ -86,7 +87,7 @@ public class OneNodeTestCase{
public void testStoppingDomainNode() throws Exception {
domain.stop();
try {
- SCAClient.getService(Helloworld.class, "defaultDomain/HelloworldClient");
+ SCAClientFactory.newInstance(URI.create("vm://defaultDomain")).getService(Helloworld.class, "HelloworldClient");
fail();
} catch (NoSuchDomainException e) {
// expected