From efe3363a815a777ecd283928900404dea84a7e1f Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Thu, 9 Oct 2008 06:33:54 +0000 Subject: Work in progress. Fixed implementation of NodeImpl, now working without dependencies on implementations from other bundles (except RuntimeAssemblyFactory, which will need to be cleaned up too). Started to remove dependencies on host-embedded and port code to NodeFactory and Node, as an interim step to bring them up, before porting them to the OSGi-enabled node launcher. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@703068 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tuscany/sca/binding/rmi/BindingTestCase.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'branches/sca-equinox/modules/binding-rmi-runtime/src') diff --git a/branches/sca-equinox/modules/binding-rmi-runtime/src/test/java/org/apache/tuscany/sca/binding/rmi/BindingTestCase.java b/branches/sca-equinox/modules/binding-rmi-runtime/src/test/java/org/apache/tuscany/sca/binding/rmi/BindingTestCase.java index c7838e284b..c62e3a6b8b 100644 --- a/branches/sca-equinox/modules/binding-rmi-runtime/src/test/java/org/apache/tuscany/sca/binding/rmi/BindingTestCase.java +++ b/branches/sca-equinox/modules/binding-rmi-runtime/src/test/java/org/apache/tuscany/sca/binding/rmi/BindingTestCase.java @@ -22,7 +22,10 @@ import helloworld.HelloException; import helloworld.HelloWorldRmiService; import junit.framework.Assert; -import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.apache.tuscany.sca.node.Contribution; +import org.apache.tuscany.sca.node.ContributionLocationHelper; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; @@ -34,7 +37,7 @@ import org.junit.Test; */ public class BindingTestCase { private static HelloWorldRmiService helloWorldRmiService; - private static SCADomain domain; + private static Node node; @Test public void testRmiService() { @@ -60,8 +63,10 @@ public class BindingTestCase { @BeforeClass public static void init() throws Exception { try { - domain = SCADomain.newInstance("RMIBindingTest.composite"); - helloWorldRmiService = domain.getService(HelloWorldRmiService.class, "HelloWorldRmiServiceComponent"); + String contribution = ContributionLocationHelper.getContributionLocation(BindingTestCase.class); + node = NodeFactory.newInstance().createNode("RMIBindingTest.composite", new Contribution("test", contribution)); + node.start(); + helloWorldRmiService = node.getService(HelloWorldRmiService.class, "HelloWorldRmiServiceComponent"); } catch (Exception e) { e.printStackTrace(); } @@ -69,7 +74,8 @@ public class BindingTestCase { @AfterClass public static void destroy() throws Exception { - domain.close(); + node.stop(); + node.destroy(); } } -- cgit v1.2.3