diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-06-09 13:05:29 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-06-09 13:05:29 +0000 |
commit | e45e9a67838dd78afca4a3ccb381d98996df51d5 (patch) | |
tree | 5ae55af5704645026f376d296dc6ba35d66f27a0 /sca-java-2.x/trunk/modules/domain/src/test | |
parent | 9b70bf992c9d173040cb6c5e10a746f24de78d60 (diff) |
Remove the domain module as the code is now in domain-node
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@952990 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
7 files changed, 0 insertions, 265 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 deleted file mode 100644 index a3daf4a5c6..0000000000 --- a/sca-java-2.x/trunk/modules/domain/src/test/java/org/apache/tuscany/sca/something/DeployerTestCase.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.something; - -import java.io.File; -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.Contribution; -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.runtime.ActivationException; -import org.junit.Test; -import org.oasisopen.sca.NoSuchDomainException; -import org.oasisopen.sca.NoSuchServiceException; - -public class DeployerTestCase { - - @Test - public void testInstalledContribution() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, MalformedURLException { - Section10 section10 = Section10Factory.createSection10(); - - Deployer deployer = section10.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(); - Assert.assertEquals(1, ics.size()); - Assert.assertEquals("foo", ics.get(0)); - } - - @Test - 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, 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)); - } - -} diff --git a/sca-java-2.x/trunk/modules/domain/src/test/java/org/apache/tuscany/sca/something/Section10TestCase.java b/sca-java-2.x/trunk/modules/domain/src/test/java/org/apache/tuscany/sca/something/Section10TestCase.java deleted file mode 100644 index 373421adc1..0000000000 --- a/sca-java-2.x/trunk/modules/domain/src/test/java/org/apache/tuscany/sca/something/Section10TestCase.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tuscany.sca.something; - -import java.net.MalformedURLException; -import java.util.List; - -import junit.framework.Assert; - -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.something.impl.Section10Impl; -import org.junit.Ignore; -import org.junit.Test; -import org.oasisopen.sca.NoSuchDomainException; -import org.oasisopen.sca.NoSuchServiceException; - -public class Section10TestCase { - - @Test - public void testInstallDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { - Section10 section10 = Section10Factory.createSection10(); - section10.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null, true); - -// Helloworld helloworldService = section10.getService(Helloworld.class, "HelloworldComponent"); -// Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); - } - - @Ignore("TODO: fails with Sun JDK due to SCA properties issue") - @Test - public void testInstallWithDependent() throws NoSuchServiceException, ContributionReadException, ActivationException, ValidationException { - Section10 section10 = Section10Factory.createSection10(); - section10.installContribution("store", "/Tuscany/svn/2.x-trunk/itest/T3558/src/test/resources/sample-store.jar", null, null, true); - section10.installContribution("store-client", "/Tuscany/svn/2.x-trunk/itest/T3558/src/test/resources/sample-store-client.jar", null, null, true); - -// Helloworld helloworldService = section10.getService(Helloworld.class, "HelloworldComponent"); -// Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); - } - - @Test - public void testInstallNoDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { - Section10 section10 = Section10Factory.createSection10(); - section10.installContribution("helloworld", "src/test/resources/sample-helloworld-nodeployable.jar", null, null, true); - -// SCAClientFactory scaClientFactory = section10.getSCAClientFactory(); -// try { -// scaClientFactory.getService(Helloworld.class, "HelloworldComponent"); -// Assert.fail(); -// } catch (NoSuchServiceException e) { -// // expected as there is no deployables -// } - - section10.addToDomainLevelComposite("helloworld" + "/helloworld.composite"); -// Helloworld helloworldService = scaClientFactory.getService(Helloworld.class, "HelloworldComponent"); -// Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); - } - - @Test - public void testGetInstalledContributions() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { - Section10 section10 = Section10Factory.createSection10(); - section10.installContribution("foo", "src/test/resources/sample-helloworld-nodeployable.jar", null, null, true); - List<String> ics = section10.getInstalledContributions(); - Assert.assertEquals(1, ics.size()); - Assert.assertEquals("foo", ics.get(0)); - } - - @Test - public void testGetDeployedCompostes() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, MalformedURLException, ActivationException, ValidationException { - Section10 section10 = Section10Factory.createSection10(); - section10.installContribution("foo", "src/test/resources/sample-helloworld.jar", null, null, true); - List<String> dcs = section10.getDeployedCompostes("foo"); - Assert.assertEquals(1, dcs.size()); - Assert.assertEquals("foo/helloworld.composite", dcs.get(0)); - } - - @Test - public void testRemoveComposte() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, MalformedURLException, ActivationException, ValidationException { - Section10 section10 = Section10Factory.createSection10(); - section10.installContribution("foo", "src/test/resources/sample-helloworld.jar", null, null, true); - section10.removeFromDomainLevelComposite("foo/helloworld.composite"); - List<String> dcs = section10.getDeployedCompostes("foo"); - Assert.assertEquals(0, dcs.size()); - } - - @Test - public void testInstallWithMetaData() throws ContributionReadException, ActivationException, ValidationException { - Section10 section10 = Section10Factory.createSection10(); - ((Section10Impl)section10).installContribution("helloworld", "src/test/resources/sample-helloworld-nodeployable.jar", "src/test/resources/sca-contribution-generated.xml", null, true); - - List<String> dcs = section10.getDeployedCompostes("helloworld"); - Assert.assertEquals(1, dcs.size()); - Assert.assertEquals("helloworld/helloworld.composite", dcs.get(0)); - -// Helloworld helloworldService = scaClientFactory.getService(Helloworld.class, "HelloworldComponent"); -// Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); - } -} diff --git a/sca-java-2.x/trunk/modules/domain/src/test/java/sample/Helloworld.java b/sca-java-2.x/trunk/modules/domain/src/test/java/sample/Helloworld.java deleted file mode 100644 index ea65a1e58c..0000000000 --- a/sca-java-2.x/trunk/modules/domain/src/test/java/sample/Helloworld.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package sample; - -public interface Helloworld { - String sayHello(String name); -} diff --git a/sca-java-2.x/trunk/modules/domain/src/test/resources/helloworld2.composite b/sca-java-2.x/trunk/modules/domain/src/test/resources/helloworld2.composite deleted file mode 100644 index 8c7a789380..0000000000 --- a/sca-java-2.x/trunk/modules/domain/src/test/resources/helloworld2.composite +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
- xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
- targetNamespace="http://sample"
- name="helloworld2">
-
- <component name="Helloworld2Component">
- <implementation.java class="sample.HelloworldImpl"/>
- </component>
-
-</composite>
diff --git a/sca-java-2.x/trunk/modules/domain/src/test/resources/sample-helloworld-nodeployable.jar b/sca-java-2.x/trunk/modules/domain/src/test/resources/sample-helloworld-nodeployable.jar Binary files differdeleted file mode 100644 index 16dde03858..0000000000 --- a/sca-java-2.x/trunk/modules/domain/src/test/resources/sample-helloworld-nodeployable.jar +++ /dev/null diff --git a/sca-java-2.x/trunk/modules/domain/src/test/resources/sample-helloworld.jar b/sca-java-2.x/trunk/modules/domain/src/test/resources/sample-helloworld.jar Binary files differdeleted file mode 100644 index 50e732d50b..0000000000 --- a/sca-java-2.x/trunk/modules/domain/src/test/resources/sample-helloworld.jar +++ /dev/null diff --git a/sca-java-2.x/trunk/modules/domain/src/test/resources/sca-contribution-generated.xml b/sca-java-2.x/trunk/modules/domain/src/test/resources/sca-contribution-generated.xml deleted file mode 100644 index 8e20561dc3..0000000000 --- a/sca-java-2.x/trunk/modules/domain/src/test/resources/sca-contribution-generated.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. ---> -<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" - xmlns:sample="http://sample"> - <deployable composite="sample:helloworld"/> -</contribution> |