diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-01-19 09:39:38 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-01-19 09:39:38 +0000 |
commit | 1844575eba4024ab299ebf179af0bed8ec1c0f52 (patch) | |
tree | 95c3c6f89287b74d8c2a0e37c52fa85bd9464e90 /sca-java-2.x/trunk/modules/domain-node/src/test/java/org | |
parent | 98a6c203285b86758f333b8dcff69f78e53e7f74 (diff) |
Rename main class to TuscanyRuntime
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1060728 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/domain-node/src/test/java/org')
-rw-r--r-- | sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DeployerTestCase.java (renamed from sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/DeployerTestCase.java) | 16 | ||||
-rw-r--r-- | sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeTestCase.java (renamed from sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeTestCase.java) | 26 | ||||
-rw-r--r-- | sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeXMLTestCase.java (renamed from sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeXMLTestCase.java) | 6 | ||||
-rw-r--r-- | sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java (renamed from sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/TwoNodesTestCase.java) | 8 |
4 files changed, 28 insertions, 28 deletions
diff --git a/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/DeployerTestCase.java b/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DeployerTestCase.java index 6d4467a895..bea340c7db 100644 --- a/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/DeployerTestCase.java +++ b/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DeployerTestCase.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.tuscany.sca.node2; +package org.apache.tuscany.sca.runtime; import java.io.File; import java.net.MalformedURLException; @@ -35,7 +35,7 @@ import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.ValidationException; import org.apache.tuscany.sca.runtime.ActivationException; import org.apache.tuscany.sca.runtime.Node; -import org.apache.tuscany.sca.runtime.NodeFactory; +import org.apache.tuscany.sca.runtime.TuscanyRuntime; import org.junit.Test; import org.oasisopen.sca.NoSuchDomainException; import org.oasisopen.sca.NoSuchServiceException; @@ -44,10 +44,10 @@ public class DeployerTestCase { @Test public void testInstalledContribution() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, MalformedURLException { - NodeFactory nodeFactory = NodeFactory.newInstance(); - Node node = nodeFactory.createNode("myDomain"); + TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance(); + Node node = tuscanyRuntime.createNode("myDomain"); - Deployer deployer = nodeFactory.getDeployer(); + Deployer deployer = tuscanyRuntime.getDeployer(); Monitor monitor = deployer.createMonitor(); Contribution contribution = deployer.loadContribution(URI.create("foo"), new File("src/test/resources/sample-helloworld-nodeployable.jar").toURI().toURL(), monitor); monitor.analyzeProblems(); @@ -60,12 +60,12 @@ public class DeployerTestCase { @Test public void testAddDeploymentComposite() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, MalformedURLException, XMLStreamException { - NodeFactory nodeFactory = NodeFactory.newInstance(); - Node node = nodeFactory.createNode("myDomain"); + TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance(); + Node node = tuscanyRuntime.createNode("myDomain"); node.installContribution("foo", "src/test/resources/sample-helloworld-nodeployable.jar", null, null, true); - Deployer deployer = nodeFactory.getDeployer(); + Deployer deployer = tuscanyRuntime.getDeployer(); Monitor monitor = deployer.createMonitor(); Composite composite = deployer.loadXMLDocument(new File("src/test/resources/helloworld2.composite").toURI().toURL(), monitor); monitor.analyzeProblems(); diff --git a/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeTestCase.java b/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeTestCase.java index 2fd1cb7a4e..6787804f06 100644 --- a/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeTestCase.java +++ b/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeTestCase.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.tuscany.sca.node2; +package org.apache.tuscany.sca.runtime; import java.net.MalformedURLException; import java.util.List; @@ -27,7 +27,7 @@ import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.monitor.ValidationException; import org.apache.tuscany.sca.runtime.ActivationException; import org.apache.tuscany.sca.runtime.Node; -import org.apache.tuscany.sca.runtime.NodeFactory; +import org.apache.tuscany.sca.runtime.TuscanyRuntime; import org.apache.tuscany.sca.runtime.impl.NodeImpl; import org.junit.Ignore; import org.junit.Test; @@ -40,7 +40,7 @@ public class NodeTestCase { @Test public void testInstallDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); + Node node = TuscanyRuntime.newInstance().createNode("default"); node.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null, true); Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent"); @@ -49,7 +49,7 @@ public class NodeTestCase { @Test public void testStopStart() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); + Node node = TuscanyRuntime.newInstance().createNode("default"); node.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null, true); String ci = node.getStartedCompositeURIs("helloworld").get(0); @@ -72,7 +72,7 @@ public class NodeTestCase { @Test @Ignore("Depdends on itest/T3558 which isn't in the build?") public void testInstallWithDependent() throws NoSuchServiceException, ContributionReadException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); + Node node = TuscanyRuntime.newInstance().createNode("default"); node.installContribution("store", "../../itest/T3558/src/test/resources/sample-store.jar", null, null, true); node.installContribution("store-client", "../../itest/T3558/src/test/resources/sample-store-client.jar", null, null, true); @@ -82,7 +82,7 @@ public class NodeTestCase { @Test public void testInstallNoDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); + Node node = TuscanyRuntime.newInstance().createNode("default"); node.installContribution("helloworld", "src/test/resources/sample-helloworld-nodeployable.jar", null, null, true); try { @@ -99,7 +99,7 @@ public class NodeTestCase { @Test public void testGetInstalledContributions() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); + Node node = TuscanyRuntime.newInstance().createNode("default"); node.installContribution("foo", "src/test/resources/sample-helloworld-nodeployable.jar", null, null, true); List<String> ics = node.getInstalledContributionURIs(); Assert.assertEquals(1, ics.size()); @@ -108,7 +108,7 @@ public class NodeTestCase { @Test public void testGetDeployedCompostes() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, MalformedURLException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); + Node node = TuscanyRuntime.newInstance().createNode("default"); node.installContribution("foo", "src/test/resources/sample-helloworld.jar", null, null, true); List<String> dcs = node.getStartedCompositeURIs("foo"); Assert.assertEquals(1, dcs.size()); @@ -117,7 +117,7 @@ public class NodeTestCase { @Test public void testRemoveComposte() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, MalformedURLException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); + Node node = TuscanyRuntime.newInstance().createNode("default"); node.installContribution("foo", "src/test/resources/sample-helloworld.jar", null, null, true); node.stop("foo", "helloworld.composite"); List<String> dcs = node.getStartedCompositeURIs("foo"); @@ -126,7 +126,7 @@ public class NodeTestCase { @Test public void testInstallWithMetaData() throws ContributionReadException, ActivationException, ValidationException, NoSuchServiceException { - Node node = NodeFactory.newInstance().createNode("default"); + Node node = TuscanyRuntime.newInstance().createNode("default"); ((NodeImpl)node).installContribution("helloworld", "src/test/resources/sample-helloworld-nodeployable.jar", "src/test/resources/sca-contribution-generated.xml", null, true); List<String> dcs = node.getStartedCompositeURIs("helloworld"); @@ -139,14 +139,14 @@ public class NodeTestCase { @Test public void testURI() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); + Node node = TuscanyRuntime.newInstance().createNode("default"); String uri = node.installContribution("src/test/resources/sample-helloworld.jar"); Assert.assertEquals("sample-helloworld", uri); } @Test public void testStaticCreate() { - Node node = NodeFactory.createStandaloneNode("helloworld.composite", "src/test/resources/sample-helloworld.jar"); + Node node = TuscanyRuntime.runComposite("helloworld.composite", "src/test/resources/sample-helloworld.jar"); List<String> cs = node.getInstalledContributionURIs(); Assert.assertEquals(1, cs.size()); List<String> dcs = node.getStartedCompositeURIs(cs.get(0)); @@ -156,7 +156,7 @@ public class NodeTestCase { @Test public void testStaticCreateWithNullComposite() { - Node node = NodeFactory.createStandaloneNode(null, "src/test/resources/sample-helloworld.jar"); + Node node = TuscanyRuntime.runComposite(null, "src/test/resources/sample-helloworld.jar"); List<String> cs = node.getInstalledContributionURIs(); Assert.assertEquals(1, cs.size()); List<String> dcs = node.getStartedCompositeURIs(cs.get(0)); diff --git a/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeXMLTestCase.java b/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeXMLTestCase.java index 694b0b6f6a..02a1ba1a5a 100644 --- a/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeXMLTestCase.java +++ b/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeXMLTestCase.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.tuscany.sca.node2; +package org.apache.tuscany.sca.runtime; import java.util.List; @@ -26,14 +26,14 @@ import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.monitor.ValidationException; import org.apache.tuscany.sca.runtime.ActivationException; import org.apache.tuscany.sca.runtime.Node; -import org.apache.tuscany.sca.runtime.NodeFactory; +import org.apache.tuscany.sca.runtime.TuscanyRuntime; import org.junit.Test; public class NodeXMLTestCase { @Test public void testHelloworldXML() throws ContributionReadException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNodeFromXML("src/test/resources/helloworldNode.xml"); + Node node = TuscanyRuntime.newInstance().createNodeFromXML("src/test/resources/helloworldNode.xml"); Assert.assertEquals("helloworld", node.getDomainName()); List<String> cs = node.getInstalledContributionURIs(); Assert.assertEquals(1, cs.size()); diff --git a/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/TwoNodesTestCase.java b/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java index 42949e2924..82ffff93d8 100644 --- a/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/TwoNodesTestCase.java +++ b/sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.tuscany.sca.node2; +package org.apache.tuscany.sca.runtime; import junit.framework.Assert; @@ -24,7 +24,7 @@ import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.monitor.ValidationException; import org.apache.tuscany.sca.runtime.ActivationException; import org.apache.tuscany.sca.runtime.Node; -import org.apache.tuscany.sca.runtime.NodeFactory; +import org.apache.tuscany.sca.runtime.TuscanyRuntime; import org.junit.Test; import org.oasisopen.sca.NoSuchDomainException; import org.oasisopen.sca.NoSuchServiceException; @@ -36,11 +36,11 @@ public class TwoNodesTestCase { @Test public void testInstallDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { // Node node1 = NodeFactory.newInstance().createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44331"); - Node node1 = NodeFactory.newInstance().createNode("uri:TwoNodesTestCase"); + Node node1 = TuscanyRuntime.newInstance().createNode("uri:TwoNodesTestCase"); node1.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null, true); // Node node2 = NodeFactory.newInstance().createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44332&wka=127.0.0.1:44331"); - Node node2 = NodeFactory.newInstance().createNode("uri:TwoNodesTestCase"); + Node node2 = TuscanyRuntime.newInstance().createNode("uri:TwoNodesTestCase"); Helloworld helloworldService = node2.getService(Helloworld.class, "HelloworldComponent"); Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); |