diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-12 06:40:25 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-12 06:40:25 +0000 |
commit | 18c5e95cd76e5a845c25c5f1431fe6a43fdada41 (patch) | |
tree | 6ea4dc93c86ca5a9cbb0a6327ca38f3f04715c53 /java/sca | |
parent | d33312a3c36bb263817a410449c209fbbd2d058e (diff) |
Migrating test case to jUnit 4.5 style
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@783998 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-rw-r--r-- | java/sca/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/java/sca/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java b/java/sca/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java index 3b85fa85a2..12e40d334b 100644 --- a/java/sca/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java +++ b/java/sca/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java @@ -19,27 +19,29 @@ package helloworld; -import junit.framework.TestCase; +import junit.framework.Assert; -import org.apache.tuscany.sca.node.ContributionLocationHelper; 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 service * * @version $Rev$ $Date$ */ -public class BPELHelloWorldTestCase extends TestCase { +public class BPELHelloWorldTestCase { - private Node node; - private Hello bpelService; + private static Node node; + private static Hello bpelService; /** * @throws java.lang.Exception */ - @Override - protected void setUp() throws Exception { + @BeforeClass + public static void setUp() throws Exception { node = NodeFactory.newInstance().createNode(); node.start(); @@ -50,13 +52,14 @@ public class BPELHelloWorldTestCase extends TestCase { /** * @throws java.lang.Exception */ - @Override - protected void tearDown() throws Exception { + @AfterClass + public static void tearDown() throws Exception { node.stop(); } + @Test public void testInvoke() throws Exception { String response = bpelService.hello("Hello"); - assertEquals("Hello World", response); + Assert.assertEquals("Hello World", response); } } |