summaryrefslogtreecommitdiffstats
path: root/branches/sca-equinox/modules/implementation-spring/src/test/java/org/apache/tuscany/sca/implementation/spring/itests/AbstractSCATestCase.java
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-10-09 06:33:54 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-10-09 06:33:54 +0000
commitefe3363a815a777ecd283928900404dea84a7e1f (patch)
tree42522fd01e6af981f8ff94663d911d56744154d5 /branches/sca-equinox/modules/implementation-spring/src/test/java/org/apache/tuscany/sca/implementation/spring/itests/AbstractSCATestCase.java
parentaacabe1650e380595a8d701123394d791656d17d (diff)
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
Diffstat (limited to '')
-rw-r--r--branches/sca-equinox/modules/implementation-spring/src/test/java/org/apache/tuscany/sca/implementation/spring/itests/AbstractSCATestCase.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/branches/sca-equinox/modules/implementation-spring/src/test/java/org/apache/tuscany/sca/implementation/spring/itests/AbstractSCATestCase.java b/branches/sca-equinox/modules/implementation-spring/src/test/java/org/apache/tuscany/sca/implementation/spring/itests/AbstractSCATestCase.java
index 6b2d114756..d782384ce6 100644
--- a/branches/sca-equinox/modules/implementation-spring/src/test/java/org/apache/tuscany/sca/implementation/spring/itests/AbstractSCATestCase.java
+++ b/branches/sca-equinox/modules/implementation-spring/src/test/java/org/apache/tuscany/sca/implementation/spring/itests/AbstractSCATestCase.java
@@ -21,7 +21,10 @@ package org.apache.tuscany.sca.implementation.spring.itests;
import junit.framework.TestCase;
-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;
/**
*
@@ -29,20 +32,23 @@ import org.apache.tuscany.sca.host.embedded.SCADomain;
*/
public abstract class AbstractSCATestCase<T> extends TestCase {
- protected SCADomain domain;
+ protected Node node;
protected T service;
@Override
protected void setUp() throws Exception {
- domain = SCADomain.newInstance(getCompositeName());
- service = (T)domain.getService(getServiceClass(), "ClientComponent");
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode(getCompositeName(), new Contribution("test", contribution));
+ node.start();
+ service = (T)node.getService(getServiceClass(), "ClientComponent");
}
protected abstract Class getServiceClass();
@Override
protected void tearDown() throws Exception {
- domain.close();
+ node.stop();
+ node.destroy();
}
protected String getCompositeName() {