summaryrefslogtreecommitdiffstats
path: root/java/sca/samples/binding-ws-calculator/src/test/java/calculator/CalculatorTestCase.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--java/sca/samples/binding-ws-calculator/src/test/java/calculator/CalculatorTestCase.java41
1 files changed, 4 insertions, 37 deletions
diff --git a/java/sca/samples/binding-ws-calculator/src/test/java/calculator/CalculatorTestCase.java b/java/sca/samples/binding-ws-calculator/src/test/java/calculator/CalculatorTestCase.java
index 2e710ee4ae..bc90f0e566 100644
--- a/java/sca/samples/binding-ws-calculator/src/test/java/calculator/CalculatorTestCase.java
+++ b/java/sca/samples/binding-ws-calculator/src/test/java/calculator/CalculatorTestCase.java
@@ -27,48 +27,15 @@ import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
+import sample.SampleClientImpl;
+
/**
- * This shows how to test the Calculator composition.
+ * Test the Calculator composition.
*/
public class CalculatorTestCase {
- private static NodeLauncher launcher;
- private static Node node;
- private static String status = "Sample Success";
-
- public static void main(String[] args) throws Exception {
- setUpBeforeClass();
- tearDownAfterClass();
- }
-
- @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));
-
- try {
- node.start();
- } catch (Exception ex) {
- status = ex.toString();
- System.out.println(status);
- }
- }
-
- @AfterClass
- public static void tearDownAfterClass() throws Exception {
- Thread.sleep(30000);
- if (node != null) {
- node.stop();
- node.destroy();
- }
- if (launcher != null) {
- launcher.destroy();
- }
- }
-
@Test
public void testSample() throws Exception {
- Assert.assertEquals("Sample Success", status);
+ SampleClientImpl.main(null);
}
}