diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-01 10:01:33 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-01 10:01:33 +0000 |
commit | ab803c465357998d6f77d60f0ede77f417b3b9bf (patch) | |
tree | 7fa38530c64040d8004f2efafb024606db54fc09 /sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany | |
parent | 3e3a7d6d4fdaabc59567491a9983e927ee9bfd19 (diff) |
Start cleaning up JavaDoc and changes coming to light while doing that: move getDeployer and getAssemblyFactory from Node to NodeFactory, change getInstalledContribution to return an assembly Contribution instead of an InstalledContribution, rename deployDeployables to runDeployables
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@959582 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany')
-rw-r--r-- | sca-java-2.x/trunk/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/DeployerTestCase.java | 22 |
1 files changed, 11 insertions, 11 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/node2/DeployerTestCase.java index 08b2e8ce5d..3fa60ca3ca 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/node2/DeployerTestCase.java @@ -33,8 +33,6 @@ import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.deployment.Deployer; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.ValidationException; -import org.apache.tuscany.sca.node2.Node; -import org.apache.tuscany.sca.node2.NodeFactory; import org.apache.tuscany.sca.runtime.ActivationException; import org.junit.Test; import org.oasisopen.sca.NoSuchDomainException; @@ -44,32 +42,34 @@ public class DeployerTestCase { @Test public void testInstalledContribution() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, MalformedURLException { - Node section10 = NodeFactory.createNode(); + NodeFactory nodeFactory = new NodeFactory(); + Node node = nodeFactory.createNode("myDomain"); - Deployer deployer = section10.getDeployer(); + Deployer deployer = nodeFactory.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(); - section10.installContribution(contribution, null, true); - List<String> ics = section10.getInstalledContributions(); + node.installContribution(contribution, null, true); + List<String> ics = node.getInstalledContributions(); Assert.assertEquals(1, ics.size()); Assert.assertEquals("foo", ics.get(0)); } @Test public void testAddDeploymentComposite() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, MalformedURLException, XMLStreamException { - Node section10 = NodeFactory.createNode(); + NodeFactory nodeFactory = new NodeFactory(); + Node node = nodeFactory.createNode("myDomain"); - section10.installContribution("foo", "src/test/resources/sample-helloworld-nodeployable.jar", null, null, true); + node.installContribution("foo", "src/test/resources/sample-helloworld-nodeployable.jar", null, null, true); - Deployer deployer = section10.getDeployer(); + Deployer deployer = nodeFactory.getDeployer(); Monitor monitor = deployer.createMonitor(); Composite composite = deployer.loadXMLDocument(new File("src/test/resources/helloworld2.composite").toURI().toURL(), monitor); monitor.analyzeProblems(); composite.setURI("helloworld2.composite"); - section10.addDeploymentComposite("foo", composite); - List<String> dcs = section10.getDeployedCompostes("foo"); + node.addDeploymentComposite("foo", composite); + List<String> dcs = node.getDeployedCompostes("foo"); Assert.assertEquals(1, dcs.size()); Assert.assertEquals("foo/helloworld2.composite", dcs.get(0)); } |