diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-12-05 00:48:31 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-12-05 00:48:31 +0000 |
commit | f44c07576a61f6f4915ea8fd2aa5af9fee71745f (patch) | |
tree | da023390d4bb97f353cdff9e6ca11a3f2eb9236b /java/sca/itest/wires/src/test | |
parent | 10a9f2e5c0be26d6a44f1f90b677b9c5b7f985a9 (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/wires/src/test')
-rw-r--r-- | java/sca/itest/wires/src/test/java/org/apache/tuscany/sca/itest/WireTestCase.java | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/java/sca/itest/wires/src/test/java/org/apache/tuscany/sca/itest/WireTestCase.java b/java/sca/itest/wires/src/test/java/org/apache/tuscany/sca/itest/WireTestCase.java index 95f721cd8e..cd1b22ba91 100644 --- a/java/sca/itest/wires/src/test/java/org/apache/tuscany/sca/itest/WireTestCase.java +++ b/java/sca/itest/wires/src/test/java/org/apache/tuscany/sca/itest/WireTestCase.java @@ -19,10 +19,16 @@ package org.apache.tuscany.sca.itest; -import junit.framework.Assert; 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; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; /** * This test case will attempt to use a wire @@ -30,10 +36,10 @@ import org.apache.tuscany.sca.host.embedded.SCADomain; public class WireTestCase extends TestCase { /** - * The SCADomain we are using + * The Node we are using */ - private SCADomain domain; - + private Node node; + /** * The client the tests should use */ @@ -42,28 +48,33 @@ public class WireTestCase extends TestCase { /** * Run the wire tests */ + @Test public void testWire() { - aWireClient.runTests(); + aWireClient.runTests(); } /** * Load the Wire composite and look up the client. */ - @Override - protected void setUp() throws Exception { - domain = SCADomain.newInstance("WireTest.composite"); - aWireClient = domain.getService(WireClient.class, "WireClient"); + + @Before + public void setUp() throws Exception { + String location = ContributionLocationHelper.getContributionLocation("WireTest.composite"); + node = NodeFactory.newInstance().createNode("WireTest.composite", new Contribution("c1", location)); + node.start(); + aWireClient = node.getService(WireClient.class, "WireClient"); Assert.assertNotNull(aWireClient); - - aWireClient = domain.getService(WireClient.class, "AnotherWireClient"); + + aWireClient = node.getService(WireClient.class, "AnotherWireClient"); Assert.assertNotNull(aWireClient); } /** - * Shutdown the SCA domain + * Shutdown the SCA node */ - @Override - protected void tearDown() throws Exception { - domain.close(); + + @After + public void tearDown() throws Exception { + node.stop(); } } |