From e96eacb5539837f536a515b56e381dec81dc5d08 Mon Sep 17 00:00:00 2001 From: antelder Date: Thu, 2 Apr 2009 10:15:22 +0000 Subject: Clean up contribution itests for split into seperate itests git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@761232 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/java/ContributionFolderTestCase.java | 38 ++++++++++++++++ .../test/java/ContributionFolderTestCaseFIXME.java | 38 ---------------- .../repository/folderWithJars/Calculator.composite | 49 +++++++++++++++++++++ .../folderWithJars/META-INF/sca-contribution.xml | 23 ++++++++++ .../repository/folderWithJars/service.jar | Bin 0 -> 2380 bytes .../repository/folderWithJars/serviceImpl.jar | Bin 0 -> 4655 bytes .../folderWithJars/Calculator.composite | 49 --------------------- .../folderWithJars/META-INF/sca-contribution.xml | 23 ---------- .../repository2/folderWithJars/service.jar | Bin 2380 -> 0 bytes .../repository2/folderWithJars/serviceImpl.jar | Bin 4655 -> 0 bytes .../src/test/java/ContributionZIPTestCase.java | 38 ++++++++++++++++ .../test/java/ContributionZIPTestCaseFIXME.java | 38 ---------------- .../src/test/resources/repository/contribution.zip | Bin 0 -> 6395 bytes .../folderWithJars/Calculator.composite | 49 --------------------- .../folderWithJars/META-INF/sca-contribution.xml | 23 ---------- .../repository2/folderWithJars/service.jar | Bin 2131 -> 0 bytes .../repository2/folderWithJars/serviceImpl.jar | Bin 3641 -> 0 bytes .../test/resources/repository3/contribution.zip | Bin 6395 -> 0 bytes 18 files changed, 148 insertions(+), 220 deletions(-) create mode 100644 java/sca/itest/contribution-folder/src/test/java/ContributionFolderTestCase.java delete mode 100644 java/sca/itest/contribution-folder/src/test/java/ContributionFolderTestCaseFIXME.java create mode 100644 java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/Calculator.composite create mode 100644 java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/META-INF/sca-contribution.xml create mode 100644 java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/service.jar create mode 100644 java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/serviceImpl.jar delete mode 100644 java/sca/itest/contribution-folder/src/test/resources/repository2/folderWithJars/Calculator.composite delete mode 100644 java/sca/itest/contribution-folder/src/test/resources/repository2/folderWithJars/META-INF/sca-contribution.xml delete mode 100644 java/sca/itest/contribution-folder/src/test/resources/repository2/folderWithJars/service.jar delete mode 100644 java/sca/itest/contribution-folder/src/test/resources/repository2/folderWithJars/serviceImpl.jar create mode 100644 java/sca/itest/contribution-zip/src/test/java/ContributionZIPTestCase.java delete mode 100644 java/sca/itest/contribution-zip/src/test/java/ContributionZIPTestCaseFIXME.java create mode 100644 java/sca/itest/contribution-zip/src/test/resources/repository/contribution.zip delete mode 100644 java/sca/itest/contribution-zip/src/test/resources/repository2/folderWithJars/Calculator.composite delete mode 100644 java/sca/itest/contribution-zip/src/test/resources/repository2/folderWithJars/META-INF/sca-contribution.xml delete mode 100644 java/sca/itest/contribution-zip/src/test/resources/repository2/folderWithJars/service.jar delete mode 100644 java/sca/itest/contribution-zip/src/test/resources/repository2/folderWithJars/serviceImpl.jar delete mode 100644 java/sca/itest/contribution-zip/src/test/resources/repository3/contribution.zip diff --git a/java/sca/itest/contribution-folder/src/test/java/ContributionFolderTestCase.java b/java/sca/itest/contribution-folder/src/test/java/ContributionFolderTestCase.java new file mode 100644 index 0000000000..582b9cf5c1 --- /dev/null +++ b/java/sca/itest/contribution-folder/src/test/java/ContributionFolderTestCase.java @@ -0,0 +1,38 @@ + + +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/ContributionFolderTestCaseFIXME.java b/java/sca/itest/contribution-folder/src/test/java/ContributionFolderTestCaseFIXME.java deleted file mode 100644 index 865d98558c..0000000000 --- a/java/sca/itest/contribution-folder/src/test/java/ContributionFolderTestCaseFIXME.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 ContributionFolderTestCaseFIXME extends TestCase { - - private Node node; - - @Override - protected void setUp() throws Exception { - node = NodeFactory.newInstance().createNode(null, new Contribution("foo", "src/test/resources/repository2")); - 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/resources/repository/folderWithJars/Calculator.composite b/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/Calculator.composite new file mode 100644 index 0000000000..e11d44fe58 --- /dev/null +++ b/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/Calculator.composite @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/META-INF/sca-contribution.xml b/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..10140b7bc1 --- /dev/null +++ b/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/META-INF/sca-contribution.xml @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/service.jar b/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/service.jar new file mode 100644 index 0000000000..fe264693fe Binary files /dev/null and b/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/service.jar differ diff --git a/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/serviceImpl.jar b/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/serviceImpl.jar new file mode 100644 index 0000000000..d5dfb647d3 Binary files /dev/null and b/java/sca/itest/contribution-folder/src/test/resources/repository/folderWithJars/serviceImpl.jar differ diff --git a/java/sca/itest/contribution-folder/src/test/resources/repository2/folderWithJars/Calculator.composite b/java/sca/itest/contribution-folder/src/test/resources/repository2/folderWithJars/Calculator.composite deleted file mode 100644 index e11d44fe58..0000000000 --- a/java/sca/itest/contribution-folder/src/test/resources/repository2/folderWithJars/Calculator.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/java/sca/itest/contribution-folder/src/test/resources/repository2/folderWithJars/META-INF/sca-contribution.xml b/java/sca/itest/contribution-folder/src/test/resources/repository2/folderWithJars/META-INF/sca-contribution.xml deleted file mode 100644 index 10140b7bc1..0000000000 --- a/java/sca/itest/contribution-folder/src/test/resources/repository2/folderWithJars/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/java/sca/itest/contribution-folder/src/test/resources/repository2/folderWithJars/service.jar b/java/sca/itest/contribution-folder/src/test/resources/repository2/folderWithJars/service.jar deleted file mode 100644 index fe264693fe..0000000000 Binary files a/java/sca/itest/contribution-folder/src/test/resources/repository2/folderWithJars/service.jar and /dev/null differ diff --git a/java/sca/itest/contribution-folder/src/test/resources/repository2/folderWithJars/serviceImpl.jar b/java/sca/itest/contribution-folder/src/test/resources/repository2/folderWithJars/serviceImpl.jar deleted file mode 100644 index d5dfb647d3..0000000000 Binary files a/java/sca/itest/contribution-folder/src/test/resources/repository2/folderWithJars/serviceImpl.jar and /dev/null differ diff --git a/java/sca/itest/contribution-zip/src/test/java/ContributionZIPTestCase.java b/java/sca/itest/contribution-zip/src/test/java/ContributionZIPTestCase.java new file mode 100644 index 0000000000..b835c63ae6 --- /dev/null +++ b/java/sca/itest/contribution-zip/src/test/java/ContributionZIPTestCase.java @@ -0,0 +1,38 @@ + + +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 ContributionZIPTestCase extends TestCase { + + private Node node; + + @Override + protected void setUp() throws Exception { + node = NodeFactory.newInstance().createNode(null, new Contribution("foo", "src/test/resources/repository/contribution.zip")); + 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-zip/src/test/java/ContributionZIPTestCaseFIXME.java b/java/sca/itest/contribution-zip/src/test/java/ContributionZIPTestCaseFIXME.java deleted file mode 100644 index 5a087033f0..0000000000 --- a/java/sca/itest/contribution-zip/src/test/java/ContributionZIPTestCaseFIXME.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 ContributionZIPTestCaseFIXME extends TestCase { - - private Node node; - - @Override - protected void setUp() throws Exception { - node = NodeFactory.newInstance().createNode(null, new Contribution("foo", "src/test/resources/repository3/contribution.zip")); - 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-zip/src/test/resources/repository/contribution.zip b/java/sca/itest/contribution-zip/src/test/resources/repository/contribution.zip new file mode 100644 index 0000000000..3239ae1242 Binary files /dev/null and b/java/sca/itest/contribution-zip/src/test/resources/repository/contribution.zip differ diff --git a/java/sca/itest/contribution-zip/src/test/resources/repository2/folderWithJars/Calculator.composite b/java/sca/itest/contribution-zip/src/test/resources/repository2/folderWithJars/Calculator.composite deleted file mode 100644 index ac88b2ac48..0000000000 --- a/java/sca/itest/contribution-zip/src/test/resources/repository2/folderWithJars/Calculator.composite +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/java/sca/itest/contribution-zip/src/test/resources/repository2/folderWithJars/META-INF/sca-contribution.xml b/java/sca/itest/contribution-zip/src/test/resources/repository2/folderWithJars/META-INF/sca-contribution.xml deleted file mode 100644 index 8b60ae590c..0000000000 --- a/java/sca/itest/contribution-zip/src/test/resources/repository2/folderWithJars/META-INF/sca-contribution.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - \ No newline at end of file diff --git a/java/sca/itest/contribution-zip/src/test/resources/repository2/folderWithJars/service.jar b/java/sca/itest/contribution-zip/src/test/resources/repository2/folderWithJars/service.jar deleted file mode 100644 index 7e4a7132a3..0000000000 Binary files a/java/sca/itest/contribution-zip/src/test/resources/repository2/folderWithJars/service.jar and /dev/null differ diff --git a/java/sca/itest/contribution-zip/src/test/resources/repository2/folderWithJars/serviceImpl.jar b/java/sca/itest/contribution-zip/src/test/resources/repository2/folderWithJars/serviceImpl.jar deleted file mode 100644 index 0e16e11b0b..0000000000 Binary files a/java/sca/itest/contribution-zip/src/test/resources/repository2/folderWithJars/serviceImpl.jar and /dev/null differ diff --git a/java/sca/itest/contribution-zip/src/test/resources/repository3/contribution.zip b/java/sca/itest/contribution-zip/src/test/resources/repository3/contribution.zip deleted file mode 100644 index 3239ae1242..0000000000 Binary files a/java/sca/itest/contribution-zip/src/test/resources/repository3/contribution.zip and /dev/null differ -- cgit v1.2.3