From 6194ba122c243f157ee6657b51e02b967dbd9b1a Mon Sep 17 00:00:00 2001 From: lresende Date: Thu, 2 Jul 2009 15:04:29 +0000 Subject: Minor fixes on variable/method scope required by junit 4.5 tests git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@790614 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/java/greetings/GreetingsTestCase.java | 8 ++++---- .../src/test/java/helloworld/HelloWorldTestCase.java | 10 ++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'java') diff --git a/java/sca/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestCase.java b/java/sca/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestCase.java index 1035641947..24ab0a4181 100644 --- a/java/sca/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestCase.java +++ b/java/sca/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestCase.java @@ -36,15 +36,15 @@ import org.junit.Test; */ public class GreetingsTestCase { - private Node node; + private static Node node; /** * @throws java.lang.Exception */ @BeforeClass - protected void setUp() throws Exception { + public static void setUp() throws Exception { String location = ContributionLocationHelper.getContributionLocation("greetings/greetings.composite"); - node = NodeFactory.newInstance().createNode("CallBackApiTest.composite", new Contribution("c1", location)); + node = NodeFactory.newInstance().createNode("greetings/greetings.composite", new Contribution("c1", location)); node.start(); } @@ -52,7 +52,7 @@ public class GreetingsTestCase { * @throws java.lang.Exception */ @AfterClass - protected void tearDown() throws Exception { + public static void tearDown() throws Exception { node.stop(); } diff --git a/java/sca/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldTestCase.java b/java/sca/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldTestCase.java index 5bf064b701..a9268ac1b5 100644 --- a/java/sca/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldTestCase.java +++ b/java/sca/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldTestCase.java @@ -27,6 +27,7 @@ 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 @@ -34,15 +35,15 @@ import org.junit.BeforeClass; * @version $Rev$ $Date$ */ public class HelloWorldTestCase { - private Node node; + private static Node node; /** * @throws java.lang.Exception */ @BeforeClass - protected void setUp() throws Exception { + public static void setUp() throws Exception { String location = ContributionLocationHelper.getContributionLocation("helloworld/helloworld.composite"); - node = NodeFactory.newInstance().createNode("CallBackApiTest.composite", new Contribution("c1", location)); + node = NodeFactory.newInstance().createNode("helloworld/helloworld.composite", new Contribution("c1", location)); node.start(); } @@ -50,10 +51,11 @@ public class HelloWorldTestCase { * @throws java.lang.Exception */ @AfterClass - protected void tearDown() throws Exception { + public static void tearDown() throws Exception { node.stop(); } + @Test public void testServiceInvocation() { HelloWorldService bpelService = node.getService(HelloWorldService.class, "HelloWorldService"); String response = bpelService.hello("Luciano"); -- cgit v1.2.3