summaryrefslogtreecommitdiffstats
path: root/branches/sca-equinox/modules/implementation-resource-runtime
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-equinox/modules/implementation-resource-runtime')
-rw-r--r--branches/sca-equinox/modules/implementation-resource-runtime/pom.xml2
-rw-r--r--branches/sca-equinox/modules/implementation-resource-runtime/src/test/java/org/apache/tuscany/sca/implementation/resource/ResourceImplementationTestCase.java16
2 files changed, 12 insertions, 6 deletions
diff --git a/branches/sca-equinox/modules/implementation-resource-runtime/pom.xml b/branches/sca-equinox/modules/implementation-resource-runtime/pom.xml
index 33270149b5..d4145c5e8b 100644
--- a/branches/sca-equinox/modules/implementation-resource-runtime/pom.xml
+++ b/branches/sca-equinox/modules/implementation-resource-runtime/pom.xml
@@ -50,7 +50,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
+ <artifactId>tuscany-node-impl</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>test</scope>
</dependency>
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);