Author: antelder
Date: Sat Jul  4 10:31:27 2009
New Revision: 791099

URL: http://svn.apache.org/viewvc?rev=791099&view=rev
Log:
Update node tests for latest sca client api's

Modified:
    
tuscany/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java
    
tuscany/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java

Modified: 
tuscany/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java?rev=791099&r1=791098&r2=791099&view=diff
==============================================================================
--- 
tuscany/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java 
(original)
+++ 
tuscany/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java 
Sat Jul  4 10:31:27 2009
@@ -35,7 +35,6 @@
 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 @@
     @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"));
     }

Modified: 
tuscany/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java?rev=791099&r1=791098&r2=791099&view=diff
==============================================================================
--- 
tuscany/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java
 (original)
+++ 
tuscany/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java
 Sat Jul  4 10:31:27 2009
@@ -32,7 +32,6 @@
 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 @@
 
     @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"));
     }


Reply via email to