From 65bb8eb02b9a717941587535242f70dfd82fe8dd Mon Sep 17 00:00:00 2001 From: antelder Date: Sat, 4 Jul 2009 10:31:27 +0000 Subject: Update node tests for latest sca client api's git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@791099 13f79535-47bb-0310-9956-ffa450edef68 --- .../itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java | 6 ++---- .../nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'java/sca') diff --git a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java b/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java index 67dc63861f..076c119335 100644 --- a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java +++ b/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java @@ -35,7 +35,6 @@ import org.junit.BeforeClass; import org.junit.Ignore; 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. @@ -72,12 +71,11 @@ public class ClientNode { @Test @Ignore("SCAClient needs to leverage the EndpointRegistry to invoke services that are not hosted on the local node") public void testCalculatorClientAPI() throws Exception { - SCAClient scaClient = SCAClientFactory.newInstance(); - Helloworld service = scaClient.getService(Helloworld.class, "HelloworldService", null); + Helloworld service = SCAClient.getService(Helloworld.class, "HelloworldService"); assertNotNull(service); assertEquals("Hello Petra", service.sayHello("Petra")); - Helloworld client = scaClient.getService(Helloworld.class, "HelloworldClient", null); + Helloworld client = SCAClient.getService(Helloworld.class, "HelloworldClient"); assertNotNull(client); assertEquals("Hi Hello Petra", client.sayHello("Petra")); } 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 f1b3af82a0..8c97bb9d81 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 @@ -32,7 +32,6 @@ 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. @@ -85,12 +84,11 @@ public class TwoNodesTestCase { @Test public void testCalculatorClientAPI() throws Exception { - SCAClient scaClient = SCAClientFactory.newInstance(); - Helloworld service = scaClient.getService(Helloworld.class, "HelloworldService", null); + Helloworld service = SCAClient.getService(Helloworld.class, "HelloworldService"); assertNotNull(service); assertEquals("Hello Petra", service.sayHello("Petra")); - Helloworld client = scaClient.getService(Helloworld.class, "HelloworldClient", null); + Helloworld client = SCAClient.getService(Helloworld.class, "HelloworldClient"); assertNotNull(client); assertEquals("Hi Hello Petra", client.sayHello("Petra")); } -- cgit v1.2.3