diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2008-11-22 05:11:38 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2008-11-22 05:11:38 +0000 |
commit | f70650d2d8d4b9dbffb01ab548c3ee7ee96cd674 (patch) | |
tree | b3cd53430199984e69deff480ae02c99b548026c /java/sca/samples | |
parent | f76d1397b16101fe13bd02bd334f3fbdcb40bb8e (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.java | 8 |
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"); |