From 9182bba609947d775130c84f00639d8f0f766e00 Mon Sep 17 00:00:00 2001 From: rfeng Date: Tue, 19 May 2009 16:49:34 +0000 Subject: Change the NodeFactoryImpl to be capable of hosting multiple instances of SCA node in the same JVM and align the OSGiNodeFactoryImpl to that feature git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@776383 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/java/SCAClientTestCase.java | 35 ------------------ .../java/test/scaclient/SCAClientTestCase.java | 41 ++++++++++++++++++++++ 2 files changed, 41 insertions(+), 35 deletions(-) delete mode 100644 java/sca/itest/scaclient-api/src/test/java/SCAClientTestCase.java create mode 100644 java/sca/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java (limited to 'java/sca/itest/scaclient-api') diff --git a/java/sca/itest/scaclient-api/src/test/java/SCAClientTestCase.java b/java/sca/itest/scaclient-api/src/test/java/SCAClientTestCase.java deleted file mode 100644 index 9978cb07e2..0000000000 --- a/java/sca/itest/scaclient-api/src/test/java/SCAClientTestCase.java +++ /dev/null @@ -1,35 +0,0 @@ -import java.net.URI; - -import itest.HelloworldService; -import junit.framework.TestCase; - -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.oasisopen.sca.client.SCAClientFactory; - -/** - * Test SCADomain.newInstance and invocation of a service. - * - * @version $Rev$ $Date$ - */ -public class SCAClientTestCase extends TestCase { - - private Node node; - - @Override - protected void setUp() throws Exception { - node = NodeFactory.newInstance().createNode(); - node.start(); - } - - public void testInvoke() throws Exception { - HelloworldService service = SCAClientFactory.newInstance().getService(HelloworldService.class, "HelloworldComponent", URI.create("default")); - assertEquals("Hello petra", service.sayHello("petra")); - } - - @Override - protected void tearDown() throws Exception { - node.stop(); - } - -} diff --git a/java/sca/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java b/java/sca/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java new file mode 100644 index 0000000000..306f690a03 --- /dev/null +++ b/java/sca/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java @@ -0,0 +1,41 @@ +package test.scaclient; + +import itest.HelloworldService; + +import java.net.URI; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.oasisopen.sca.client.SCAClientFactory; + +/** + * Test SCADomain.newInstance and invocation of a service. + * + * @version $Rev$ $Date$ + */ +public class SCAClientTestCase extends TestCase { + + private Node node; + + @Override + protected void setUp() throws Exception { + node = NodeFactory.newInstance().createNode(); + node.start(); + } + + public void testInvoke() throws Exception { + HelloworldService service = + SCAClientFactory.newInstance().getService(HelloworldService.class, + "HelloworldComponent", + URI.create(Node.DEFAULT_DOMAIN_URI)); + assertEquals("Hello petra", service.sayHello("petra")); + } + + @Override + protected void tearDown() throws Exception { + node.stop(); + } + +} -- cgit v1.2.3