summaryrefslogtreecommitdiffstats
path: root/java/sca/itest/callback-id
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/itest/callback-id')
-rw-r--r--java/sca/itest/callback-id/pom.xml12
-rw-r--r--java/sca/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClientImpl.java3
-rw-r--r--java/sca/itest/callback-id/src/test/java/org/apache/tuscany/sca/test/CallBackIdTestCase.java32
3 files changed, 30 insertions, 17 deletions
diff --git a/java/sca/itest/callback-id/pom.xml b/java/sca/itest/callback-id/pom.xml
index 3eedfe0fc9..fe02bbcb15 100644
--- a/java/sca/itest/callback-id/pom.xml
+++ b/java/sca/itest/callback-id/pom.xml
@@ -31,15 +31,23 @@
<dependencies>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
+ <artifactId>tuscany-node-api</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-implementation-java-runtime</artifactId>
<version>2.0-SNAPSHOT</version>
- <scope>runtime</scope>
+ <scope>test</scope>
</dependency>
+
</dependencies>
</project>
diff --git a/java/sca/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClientImpl.java b/java/sca/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClientImpl.java
index 59c9c3d069..afcccdbc02 100644
--- a/java/sca/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClientImpl.java
+++ b/java/sca/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClientImpl.java
@@ -18,8 +18,7 @@
*/
package org.apache.tuscany.sca.test;
-import junit.framework.Assert;
-
+import org.junit.Assert;
import org.osoa.sca.ComponentContext;
import org.osoa.sca.RequestContext;
import org.osoa.sca.ServiceReference;
diff --git a/java/sca/itest/callback-id/src/test/java/org/apache/tuscany/sca/test/CallBackIdTestCase.java b/java/sca/itest/callback-id/src/test/java/org/apache/tuscany/sca/test/CallBackIdTestCase.java
index 771fbb8ff7..56fd46d1b0 100644
--- a/java/sca/itest/callback-id/src/test/java/org/apache/tuscany/sca/test/CallBackIdTestCase.java
+++ b/java/sca/itest/callback-id/src/test/java/org/apache/tuscany/sca/test/CallBackIdTestCase.java
@@ -18,28 +18,34 @@
*/
package org.apache.tuscany.sca.test;
-import junit.framework.TestCase;
+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.After;
+import org.junit.Before;
+import org.junit.Test;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+public class CallBackIdTestCase {
-public class CallBackIdTestCase extends TestCase {
-
- private SCADomain domain;
+ private Node node;
private CallBackIdClient aCallBackClient;
+ @Test
public void testCallBackBasic() {
aCallBackClient.run();
}
- @Override
- protected void setUp() throws Exception {
- domain = SCADomain.newInstance("CallBackIdClient.composite");
-
- aCallBackClient = domain.getService(CallBackIdClient.class, "CallBackIdClient");
+ @Before
+ public void setUp() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("CallBackIdClient.composite");
+ node = NodeFactory.newInstance().createNode("CallBackIdClient.composite", new Contribution("c1", location));
+ node.start();
+ aCallBackClient = node.getService(CallBackIdClient.class, "CallBackIdClient");
}
- @Override
- protected void tearDown() throws Exception {
- domain.close();
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
}
}