summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/samples/calculator/src/test/java
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-11-25 09:28:07 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-11-25 09:28:07 +0000
commit67e1bed89e5f41d03ff7c285880690d2b23ef64a (patch)
treea916c117931ad725181de44bfcf1f183f1e8da1c /sca-java-2.x/trunk/samples/calculator/src/test/java
parent72f1b5c1f8226f4dec2019cead88a122e33a94aa (diff)
Update the calculator sample to use the simplest createNode API as per the ongoing dev list discussion
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@884011 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/samples/calculator/src/test/java')
-rw-r--r--sca-java-2.x/trunk/samples/calculator/src/test/java/calculator/CalculatorTestCase.java12
1 files changed, 3 insertions, 9 deletions
diff --git a/sca-java-2.x/trunk/samples/calculator/src/test/java/calculator/CalculatorTestCase.java b/sca-java-2.x/trunk/samples/calculator/src/test/java/calculator/CalculatorTestCase.java
index 73c7d872b9..eaf56a1cfe 100644
--- a/sca-java-2.x/trunk/samples/calculator/src/test/java/calculator/CalculatorTestCase.java
+++ b/sca-java-2.x/trunk/samples/calculator/src/test/java/calculator/CalculatorTestCase.java
@@ -20,9 +20,6 @@ package calculator;
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;
@@ -39,12 +36,9 @@ public class CalculatorTestCase{
@BeforeClass
public static void setUpBeforeClass() throws Exception {
- NodeFactory factory = NodeFactory.newInstance();
- String contribution = ContributionLocationHelper.getContributionLocation(CalculatorClient.class);
- node = factory.createNode("Calculator.composite", new Contribution("calculator", contribution)).start();
- // node = factory.createNode().start();
-
- calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ // ideally it would be: node = NodeFactory.newInstance().createNode("target/classes").start();
+ node = NodeFactory.newInstance().createNode(null, new String[] {"target/classes"}).start();
+ calculatorService = node.getService(CalculatorService.class, "CalculatorServiceComponent");
}
@AfterClass