Author: lresende
Date: Sun Jul 22 10:54:11 2007
New Revision: 558515

URL: http://svn.apache.org/viewvc?view=rev&rev=558515
Log:
Adding test case for the helloworld-ws-service sample

Modified:
    
incubator/tuscany/java/sca/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldServerTestCase.java

Modified: 
incubator/tuscany/java/sca/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldServerTestCase.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldServerTestCase.java?view=diff&rev=558515&r1=558514&r2=558515
==============================================================================
--- 
incubator/tuscany/java/sca/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldServerTestCase.java
 (original)
+++ 
incubator/tuscany/java/sca/samples/helloworld-ws-service/src/test/java/helloworld/HelloWorldServerTestCase.java
 Sun Jul 22 10:54:11 2007
@@ -18,6 +18,9 @@
  */
 package helloworld;
 
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNotNull;
+
 import java.io.IOException;
 import java.net.Socket;
 
@@ -29,7 +32,7 @@
 /**
  * Tests that the helloworld server is available
  */
-public class HelloWorldServerTestCase {
+public class HelloWorldServerTestCase{
 
     private SCADomain scaDomain;
 
@@ -42,6 +45,14 @@
        public void testPing() throws IOException {
                new Socket("127.0.0.1", 8085);
        }
+    
+    @Test
+    public void testServiceCall() throws IOException {
+        HelloWorldService helloWorldService = 
scaDomain.getService(HelloWorldService.class, 
"HelloWorldServiceComponent/HelloWorldService");
+        assertNotNull(helloWorldService);
+        
+        assertEquals("Hello Smith", helloWorldService.getGreetings("Smith"));
+    }
 
        @After
        public void stopServer() throws Exception {



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to