summaryrefslogtreecommitdiffstats
path: root/java/sca/samples
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2008-11-22 05:11:38 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2008-11-22 05:11:38 +0000
commitf70650d2d8d4b9dbffb01ab548c3ee7ee96cd674 (patch)
treeb3cd53430199984e69deff480ae02c99b548026c /java/sca/samples
parentf76d1397b16101fe13bd02bd334f3fbdcb40bb8e (diff)
Using contribution helper to properly discover the contribution location
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@719807 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/samples')
-rw-r--r--java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java b/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java
index fba801eee1..da1f89548f 100644
--- a/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java
+++ b/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java
@@ -18,9 +18,11 @@
*/
package calculator;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Contribution;
+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;
@@ -40,7 +42,9 @@ public class CalculatorTestCase{
@BeforeClass
public static void setUpBeforeClass() throws Exception {
- node = NodeFactory.newInstance().createNode();
+ NodeFactory factory = NodeFactory.newInstance();
+ String contribution = ContributionLocationHelper.getContributionLocation(CalculatorClient.class);
+ node = factory.createNode("Calculator.composite", new Contribution("calculator", contribution));
node.start();
calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");