summaryrefslogtreecommitdiffstats
path: root/branches
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2008-10-30 07:28:13 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2008-10-30 07:28:13 +0000
commit7a28ba7f5ff5dbe521e4b62011c4353685516a31 (patch)
tree8c3b6d16678a9f03d1c2ba1ead9051579041526b /branches
parent5dcbe37fccb4f30e8f801dea45530a419b80fca4 (diff)
Updating test case to follow new JUnit test style
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@709106 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches')
-rw-r--r--branches/sca-equinox/samples/calculator-equinox/src/test/java/calculator/CalculatorTestCase.java29
1 files changed, 18 insertions, 11 deletions
diff --git a/branches/sca-equinox/samples/calculator-equinox/src/test/java/calculator/CalculatorTestCase.java b/branches/sca-equinox/samples/calculator-equinox/src/test/java/calculator/CalculatorTestCase.java
index f666d092fd..00e5422930 100644
--- a/branches/sca-equinox/samples/calculator-equinox/src/test/java/calculator/CalculatorTestCase.java
+++ b/branches/sca-equinox/samples/calculator-equinox/src/test/java/calculator/CalculatorTestCase.java
@@ -18,23 +18,30 @@
*/
package calculator;
-import junit.framework.TestCase;
+import static org.junit.Assert.*;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.equinox.launcher.Contribution;
import org.apache.tuscany.sca.node.equinox.launcher.ContributionLocationHelper;
import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.osoa.sca.annotations.EagerInit;
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Scope;
/**
* This shows how to test the Calculator composition.
*/
-public class CalculatorTestCase extends TestCase {
+@Scope("COMPOSITE") @EagerInit
+public class CalculatorTestCase {
- private NodeLauncher launcher;
- private Node node;
-
- @Override
- protected void setUp() throws Exception {
+ private static NodeLauncher launcher;
+ private static Node node;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
launcher = NodeLauncher.newInstance();
String location = ContributionLocationHelper.getContributionLocation(CalculatorClient.class);
node = launcher.createNode("Calculator.composite", new Contribution("test", location));
@@ -42,8 +49,8 @@ public class CalculatorTestCase extends TestCase {
node.start();
}
- @Override
- protected void tearDown() throws Exception {
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
if (node != null) {
node.stop();
node.destroy();
@@ -53,7 +60,7 @@ public class CalculatorTestCase extends TestCase {
}
}
- public void testDummy() {
+ @Test
+ public void testDummy() throws Exception {
}
-
}