From 73ffdb3c639f918474bc0df9dac57af8b121f3ab Mon Sep 17 00:00:00 2001 From: rfeng Date: Fri, 15 May 2009 18:36:42 +0000 Subject: Push down some of the createNode() methods to NodeFactory and only require the createNode(NodeConfiguration) to be implemented by subclasses git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@775283 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/java/ContributionFolderTestCase.java | 38 ---------------------- .../test/java/test/ContributionFolderTestCase.java | 36 ++++++++++++++++++++ 2 files changed, 36 insertions(+), 38 deletions(-) delete mode 100644 java/sca/itest/contribution-folder/src/test/java/ContributionFolderTestCase.java create mode 100644 java/sca/itest/contribution-folder/src/test/java/test/ContributionFolderTestCase.java (limited to 'java/sca/itest/contribution-folder') diff --git a/java/sca/itest/contribution-folder/src/test/java/ContributionFolderTestCase.java b/java/sca/itest/contribution-folder/src/test/java/ContributionFolderTestCase.java deleted file mode 100644 index 582b9cf5c1..0000000000 --- a/java/sca/itest/contribution-folder/src/test/java/ContributionFolderTestCase.java +++ /dev/null @@ -1,38 +0,0 @@ - - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -import calculator.CalculatorService; - - - -/** - * Test SCADomain.newInstance and invocation of a service. - * - * @version $Rev: 608205 $ $Date: 2008-01-02 20:29:05 +0000 (Wed, 02 Jan 2008) $ - */ -public class ContributionFolderTestCase extends TestCase { - - private Node node; - - @Override - protected void setUp() throws Exception { - node = NodeFactory.newInstance().createNode(null, new Contribution("foo", "src/test/resources/repository")); - node.start(); - } - - public void testInvoke() throws Exception { - CalculatorService service = node.getService(CalculatorService.class, "CalculatorServiceComponent"); - assertEquals(3.0, service.add(1, 2)); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/java/sca/itest/contribution-folder/src/test/java/test/ContributionFolderTestCase.java b/java/sca/itest/contribution-folder/src/test/java/test/ContributionFolderTestCase.java new file mode 100644 index 0000000000..184738554c --- /dev/null +++ b/java/sca/itest/contribution-folder/src/test/java/test/ContributionFolderTestCase.java @@ -0,0 +1,36 @@ +package test; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.node.Contribution; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; + +import calculator.CalculatorService; + +/** + * Test SCADomain.newInstance and invocation of a service. + * + * @version $Rev: 608205 $ $Date: 2008-01-02 20:29:05 +0000 (Wed, 02 Jan 2008) $ + */ +public class ContributionFolderTestCase extends TestCase { + + private Node node; + + @Override + protected void setUp() throws Exception { + node = NodeFactory.newInstance().createNode(new Contribution("foo", "src/test/resources/repository")); + node.start(); + } + + public void testInvoke() throws Exception { + CalculatorService service = node.getService(CalculatorService.class, "CalculatorServiceComponent"); + assertEquals(3.0, service.add(1, 2)); + } + + @Override + protected void tearDown() throws Exception { + node.stop(); + } + +} -- cgit v1.2.3