You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by lr...@apache.org on 2009/06/12 08:40:25 UTC
svn commit: r783998 -
/tuscany/java/sca/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java
Author: lresende
Date: Fri Jun 12 06:40:25 2009
New Revision: 783998
URL: http://svn.apache.org/viewvc?rev=783998&view=rev
Log:
Migrating test case to jUnit 4.5 style
Modified:
tuscany/java/sca/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java
Modified: tuscany/java/sca/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java?rev=783998&r1=783997&r2=783998&view=diff
==============================================================================
--- tuscany/java/sca/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java (original)
+++ tuscany/java/sca/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java Fri Jun 12 06:40:25 2009
@@ -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 @@
/**
* @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);
}
}