You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2007/05/05 10:15:23 UTC

svn commit: r535476 - in /incubator/tuscany/java/sca/modules/implementation-script/src/test/java/org/apache/tuscany/sca/implementation/script/itests: AbstractSCATestCase.java helloworld/AbstractHelloWorldTestCase.java

Author: antelder
Date: Sat May  5 01:15:22 2007
New Revision: 535476

URL: http://svn.apache.org/viewvc?view=rev&rev=535476
Log:
Get all the script impl tests working again

Modified:
    incubator/tuscany/java/sca/modules/implementation-script/src/test/java/org/apache/tuscany/sca/implementation/script/itests/AbstractSCATestCase.java
    incubator/tuscany/java/sca/modules/implementation-script/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/AbstractHelloWorldTestCase.java

Modified: incubator/tuscany/java/sca/modules/implementation-script/src/test/java/org/apache/tuscany/sca/implementation/script/itests/AbstractSCATestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-script/src/test/java/org/apache/tuscany/sca/implementation/script/itests/AbstractSCATestCase.java?view=diff&rev=535476&r1=535475&r2=535476
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-script/src/test/java/org/apache/tuscany/sca/implementation/script/itests/AbstractSCATestCase.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-script/src/test/java/org/apache/tuscany/sca/implementation/script/itests/AbstractSCATestCase.java Sat May  5 01:15:22 2007
@@ -21,25 +21,22 @@
 
 import junit.framework.TestCase;
 
-import org.apache.tuscany.host.embedded.SCARuntimeActivator;
-import org.osoa.sca.ComponentContext;
-import org.osoa.sca.ServiceReference;
+import org.apache.tuscany.host.embedded.SCADomain;
 
 public abstract class AbstractSCATestCase<T> extends TestCase {
 
+    protected SCADomain domain;
     protected T service;
 
     protected void setUp() throws Exception {
-//        SCARuntimeActivator.start(getCompositeName());
-//        ComponentContext context = SCARuntimeActivator.getComponentContext("ClientComponent");
-//        ServiceReference<T> serviceReference = context.createSelfReference(getServiceClass());
-//        service = serviceReference.getService();
+        domain = SCADomain.newInstance(getCompositeName());
+        service = (T) domain.getService(getServiceClass(), "ClientComponent");
     }
     
     abstract protected Class getServiceClass();
 
     protected void tearDown() throws Exception {
-//        SCARuntimeActivator.stop();
+        domain.close();
     }
 
     protected String getCompositeName() {

Modified: incubator/tuscany/java/sca/modules/implementation-script/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/AbstractHelloWorldTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-script/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/AbstractHelloWorldTestCase.java?view=diff&rev=535476&r1=535475&r2=535476
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-script/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/AbstractHelloWorldTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-script/src/test/java/org/apache/tuscany/sca/implementation/script/itests/helloworld/AbstractHelloWorldTestCase.java Sat May  5 01:15:22 2007
@@ -24,7 +24,7 @@
 public abstract class AbstractHelloWorldTestCase extends AbstractSCATestCase<HelloWorld> {
 
     public void testCalculator() throws Exception {
-//        assertEquals("Hello petra", service.sayHello("petra"));
+        assertEquals("Hello petra", service.sayHello("petra"));
     }
     
     @Override



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org