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
This commit is contained in:
lresende 2009-07-02 15:04:29 +00:00
parent 974807211a
commit 6194ba122c
2 changed files with 10 additions and 8 deletions
java/sca/itest/bpel/helloworld-reference/src/test/java

View file

@ -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();
}

View file

@ -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");