tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lrese...@apache.org
Subject svn commit: r719807 - /tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java
Date Sat, 22 Nov 2008 05:11:38 GMT
Author: lresende
Date: Fri Nov 21 21:11:38 2008
New Revision: 719807

URL: http://svn.apache.org/viewvc?rev=719807&view=rev
Log:
Using contribution helper to properly discover the contribution location

Modified:
    tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java

Modified: tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java?rev=719807&r1=719806&r2=719807&view=diff
==============================================================================
--- tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java (original)
+++ tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java Fri
Nov 21 21:11:38 2008
@@ -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 @@
 
     @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");



Mime
View raw message