diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-06-04 14:23:04 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-06-04 14:23:04 +0000 |
commit | 04b98608b95a8effd457576caeadae02f9f59f0d (patch) | |
tree | c9768d221ff67f7c37bf7f62230ef6cf42d99398 /sca-java-2.x/trunk/modules/domain/src/test/java | |
parent | 37c624ca7d7bd356aca8e3aabd5103a1c8cf274f (diff) |
Add testcase to add a Deployer Composite as a deployment composite
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@951416 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/domain/src/test/java')
-rw-r--r-- | sca-java-2.x/trunk/modules/domain/src/test/java/org/apache/tuscany/sca/something/DeployerTestCase.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/domain/src/test/java/org/apache/tuscany/sca/something/DeployerTestCase.java b/sca-java-2.x/trunk/modules/domain/src/test/java/org/apache/tuscany/sca/something/DeployerTestCase.java index 33e999b0b4..9cac4a1e28 100644 --- a/sca-java-2.x/trunk/modules/domain/src/test/java/org/apache/tuscany/sca/something/DeployerTestCase.java +++ b/sca-java-2.x/trunk/modules/domain/src/test/java/org/apache/tuscany/sca/something/DeployerTestCase.java @@ -23,8 +23,12 @@ import java.net.MalformedURLException; import java.net.URI;
import java.util.List;
+import javax.xml.stream.XMLStreamException;
+
import junit.framework.Assert;
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.contribution.Artifact;
import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
import org.apache.tuscany.sca.deployment.Deployer;
@@ -53,11 +57,20 @@ public class DeployerTestCase { }
@Test
- public void testAddDeploymentComposite() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, MalformedURLException {
+ public void testAddDeploymentComposite() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, MalformedURLException, XMLStreamException {
Section10 section10 = Section10Factory.createSection10();
+ section10.installContribution("foo", "src/test/resources/sample-helloworld-nodeployable.jar", null, true);
+
Deployer deployer = section10.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");
+ Assert.assertEquals(1, dcs.size());
+ Assert.assertEquals("foo/helloworld2.composite", dcs.get(0));
}
}
|