diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-09 06:33:54 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-09 06:33:54 +0000 |
commit | efe3363a815a777ecd283928900404dea84a7e1f (patch) | |
tree | 42522fd01e6af981f8ff94663d911d56744154d5 /branches/sca-equinox/modules/implementation-resource-runtime/src | |
parent | aacabe1650e380595a8d701123394d791656d17d (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 'branches/sca-equinox/modules/implementation-resource-runtime/src')
-rw-r--r-- | branches/sca-equinox/modules/implementation-resource-runtime/src/test/java/org/apache/tuscany/sca/implementation/resource/ResourceImplementationTestCase.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/branches/sca-equinox/modules/implementation-resource-runtime/src/test/java/org/apache/tuscany/sca/implementation/resource/ResourceImplementationTestCase.java b/branches/sca-equinox/modules/implementation-resource-runtime/src/test/java/org/apache/tuscany/sca/implementation/resource/ResourceImplementationTestCase.java index 03f10e78e8..9b3c959753 100644 --- a/branches/sca-equinox/modules/implementation-resource-runtime/src/test/java/org/apache/tuscany/sca/implementation/resource/ResourceImplementationTestCase.java +++ b/branches/sca-equinox/modules/implementation-resource-runtime/src/test/java/org/apache/tuscany/sca/implementation/resource/ResourceImplementationTestCase.java @@ -25,27 +25,33 @@ import java.io.InputStreamReader; 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; /** * @version $Rev$ $Date$ */ public class ResourceImplementationTestCase extends TestCase { - private SCADomain scaDomain; + private Node node; @Override protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("resource.composite"); + String contribution = ContributionLocationHelper.getContributionLocation(getClass()); + node = NodeFactory.newInstance().createNode("resource.composite", new Contribution("test", contribution)); + node.start(); } @Override protected void tearDown() throws Exception { - scaDomain.close(); + node.stop(); + node.destroy(); } public void testResource() throws Exception { - Resource resource = scaDomain.getService(Resource.class, "ResourceServiceComponent"); + Resource resource = node.getService(Resource.class, "ResourceServiceComponent"); InputStream is = resource.get("test.html"); String document = read(is); assertTrue(document.indexOf("<body><p>hello</body>") != -1); |