You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by kw...@apache.org on 2008/05/20 01:40:01 UTC

svn commit: r658043 - in /incubator/tuscany/java/sca/vtest/java-api/conversation: id/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/ lifetime/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/

Author: kwilliams
Date: Mon May 19 16:40:01 2008
New Revision: 658043

URL: http://svn.apache.org/viewvc?rev=658043&view=rev
Log:
More refactoring

Modified:
    incubator/tuscany/java/sca/vtest/java-api/conversation/id/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/ConversationIDTestCase.java
    incubator/tuscany/java/sca/vtest/java-api/conversation/lifetime/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/LifetimeTestCase.java

Modified: incubator/tuscany/java/sca/vtest/java-api/conversation/id/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/ConversationIDTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/conversation/id/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/ConversationIDTestCase.java?rev=658043&r1=658042&r2=658043&view=diff
==============================================================================
--- incubator/tuscany/java/sca/vtest/java-api/conversation/id/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/ConversationIDTestCase.java (original)
+++ incubator/tuscany/java/sca/vtest/java-api/conversation/id/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/id/ConversationIDTestCase.java Mon May 19 16:40:01 2008
@@ -19,7 +19,7 @@
 
 package org.apache.tuscany.sca.vtest.javaapi.conversation.id;
 
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.vtest.utilities.ServiceFinder;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -29,7 +29,6 @@
  */
 public class ConversationIDTestCase {
 
-    protected static SCADomain domain;
     protected static String compositeName = "conversation-id.composite";
     protected static AService aService = null;
 
@@ -37,8 +36,8 @@
     public static void init() throws Exception {
         try {
             System.out.println("Setting up");
-            domain = SCADomain.newInstance(compositeName);
-            aService = domain.getService(AService.class, "AComponent");
+            ServiceFinder.init(compositeName);
+            aService = ServiceFinder.getService(AService.class, "AComponent");
         } catch (Exception ex) {
             ex.printStackTrace();
         }
@@ -48,8 +47,7 @@
     public static void destroy() throws Exception {
 
         System.out.println("Cleaning up");
-        if (domain != null)
-            domain.close();
+        ServiceFinder.cleanup();
 
     }
 

Modified: incubator/tuscany/java/sca/vtest/java-api/conversation/lifetime/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/LifetimeTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/conversation/lifetime/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/LifetimeTestCase.java?rev=658043&r1=658042&r2=658043&view=diff
==============================================================================
--- incubator/tuscany/java/sca/vtest/java-api/conversation/lifetime/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/LifetimeTestCase.java (original)
+++ incubator/tuscany/java/sca/vtest/java-api/conversation/lifetime/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/lifetime/LifetimeTestCase.java Mon May 19 16:40:01 2008
@@ -19,7 +19,7 @@
 
 package org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime;
 
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.vtest.utilities.ServiceFinder;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
@@ -31,7 +31,6 @@
  */
 public class LifetimeTestCase {
 
-    protected static SCADomain domain;
     protected static String compositeName = "lifetime.composite";
     protected static AService aService = null;
 
@@ -39,8 +38,8 @@
     public static void init() throws Exception {
         try {
             System.out.println("Setting up");
-            domain = SCADomain.newInstance(compositeName);
-            aService = domain.getService(AService.class, "AComponent");
+            ServiceFinder.init(compositeName);
+            aService = ServiceFinder.getService(AService.class, "AComponent");
         } catch (Exception ex) {
             ex.printStackTrace();
         }
@@ -50,8 +49,7 @@
     public static void destroy() throws Exception {
 
         System.out.println("Cleaning up");
-        if (domain != null)
-            domain.close();
+        ServiceFinder.cleanup();
 
     }
 
@@ -156,8 +154,8 @@
     /**
      * Line 487, 491
      * <p>
-     * A conversation ends, and any state associated with the conversation
-     * is freed up, when: <br>
+     * A conversation ends, and any state associated with the conversation is
+     * freed up, when: <br>
      * ...The client calls Conversation.end()
      */
     @Test
@@ -168,8 +166,8 @@
     /**
      * Line 487, 492
      * <p>
-     * A conversation ends, and any state associated with the conversation
-     * is freed up, when: <br>
+     * A conversation ends, and any state associated with the conversation is
+     * freed up, when: <br>
      * ...Any non-business exception is thrown by a conversational operation
      */
     @Test
@@ -194,8 +192,8 @@
      * Line 495, 496, 497
      * <p>
      * If ServiceReference.getConversationID() is called after the
-     * "@EndsConversation" method: is called, but before the next conversation has
-     * been started, it will return null.
+     * "@EndsConversation" method: is called, but before the next conversation
+     * has been started, it will return null.
      */
     @Test
     public void lifetime13() throws Exception {
@@ -205,11 +203,11 @@
     /**
      * Line 498, 499
      * <p>
-     * If a service reference is used after the service provider's
-     * conversation timeout has caused the conversation to be ended, then
+     * If a service reference is used after the service provider's conversation
+     * timeout has caused the conversation to be ended, then
      * ConversationEndedException will be thrown.
      */
-    @Test(expected=ConversationEndedException.class)
+    @Test(expected = ConversationEndedException.class)
     public void lifetime14() throws Exception {
         aService.testConversationEnd8();
     }