diff options
Diffstat (limited to '')
-rw-r--r-- | java/sca/itest/bpel/helloworld/src/test/java/helloworld/HelloWorld.java | 2 | ||||
-rw-r--r-- | java/sca/itest/bpel/helloworld/src/test/java/helloworld/HelloWorldTestCase.java | 31 |
2 files changed, 20 insertions, 13 deletions
diff --git a/java/sca/itest/bpel/helloworld/src/test/java/helloworld/HelloWorld.java b/java/sca/itest/bpel/helloworld/src/test/java/helloworld/HelloWorld.java index ffdbc50a22..0999e97065 100644 --- a/java/sca/itest/bpel/helloworld/src/test/java/helloworld/HelloWorld.java +++ b/java/sca/itest/bpel/helloworld/src/test/java/helloworld/HelloWorld.java @@ -20,7 +20,7 @@ package helloworld; import org.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType; -import org.osoa.sca.annotations.Reference; +import org.oasisopen.sca.annotation.Reference; /** * @version $Rev$ $Date$ diff --git a/java/sca/itest/bpel/helloworld/src/test/java/helloworld/HelloWorldTestCase.java b/java/sca/itest/bpel/helloworld/src/test/java/helloworld/HelloWorldTestCase.java index 76fcd35c2d..ead696f03d 100644 --- a/java/sca/itest/bpel/helloworld/src/test/java/helloworld/HelloWorldTestCase.java +++ b/java/sca/itest/bpel/helloworld/src/test/java/helloworld/HelloWorldTestCase.java @@ -19,45 +19,52 @@ package helloworld; -import junit.framework.TestCase; +import junit.framework.Assert; import org.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType; -import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; /** * Tests the BPEL Helloworld Service * * @version $Rev$ $Date$ */ -public class HelloWorldTestCase extends TestCase { +public class HelloWorldTestCase { - private SCADomain scaDomain; + private Node node; /** * @throws java.lang.Exception */ - @Override + @BeforeClass protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("helloworld/helloworld.composite"); + node = NodeFactory.newInstance().createNode(); + node.start(); } /** * @throws java.lang.Exception */ - @Override + @AfterClass protected void tearDown() throws Exception { - scaDomain.close(); + node.stop(); } + @Test public void testServiceInvocation() throws Exception { - HelloPortType bpelService = scaDomain.getService(HelloPortType.class, "BPELHelloWorldService"); + HelloPortType bpelService = node.getService(HelloPortType.class, "BPELHelloWorldService"); String response = bpelService.hello("Hello"); - assertEquals("Hello World", response); + Assert.assertEquals("Hello World", response); } + @Test public void testReferenceInvocation() throws Exception { - HelloWorld bpelService = scaDomain.getService(HelloWorld.class, "BPELHelloWorld"); + HelloWorld bpelService = node.getService(HelloWorld.class, "BPELHelloWorld"); String response = bpelService.hello("Hello"); - assertEquals("Hello World", response); + Assert.assertEquals("Hello World", response); } } |