summaryrefslogtreecommitdiffstats
path: root/java/sca/itest/callback-id/src
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-12-05 00:48:31 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-12-05 00:48:31 +0000
commitf44c07576a61f6f4915ea8fd2aa5af9fee71745f (patch)
treeda023390d4bb97f353cdff9e6ca11a3f2eb9236b /java/sca/itest/callback-id/src
parent10a9f2e5c0be26d6a44f1f90b677b9c5b7f985a9 (diff)
Convert, clean and bring up a set of itests
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@723537 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/itest/callback-id/src')
-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
2 files changed, 20 insertions, 15 deletions
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();
}
}