From c0bef68247bd8a6d0bbbe7c9f07cc927ca2861d2 Mon Sep 17 00:00:00 2001 From: antelder Date: Thu, 16 Feb 2012 15:41:56 +0000 Subject: Delete old RC tags git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1245041 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/java/itest/nodes/Helloworld.java | 29 ----- .../sca/domain/node/GetServiceTestCase.java | 84 ------------ .../domain/node/MultipleNodesPerJVMTestCase.java | 87 ------------- .../tuscany/sca/domain/node/OneNodeTestCase.java | 105 --------------- .../sca/domain/node/StopStartNodesTestCase.java | 82 ------------ .../apache/tuscany/sca/node2/DeployerTestCase.java | 77 ----------- .../org/apache/tuscany/sca/node2/NodeTestCase.java | 141 --------------------- .../apache/tuscany/sca/node2/NodeXMLTestCase.java | 44 ------- .../src/test/java/sample/Helloworld.java | 24 ---- .../src/test/resources/helloworld2.composite | 29 ----- .../src/test/resources/helloworldNode.xml | 27 ---- .../itest-nodes-helloworld-client-2.0-SNAPSHOT.jar | Bin 4708 -> 0 bytes ...itest-nodes-helloworld-service-2.0-SNAPSHOT.jar | Bin 4515 -> 0 bytes .../resources/sample-helloworld-nodeployable.jar | Bin 4761 -> 0 bytes .../src/test/resources/sample-helloworld.jar | Bin 4753 -> 0 bytes .../test/resources/sca-contribution-generated.xml | 23 ---- 16 files changed, 752 deletions(-) delete mode 100644 sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/itest/nodes/Helloworld.java delete mode 100644 sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/GetServiceTestCase.java delete mode 100644 sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/MultipleNodesPerJVMTestCase.java delete mode 100644 sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/OneNodeTestCase.java delete mode 100644 sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/StopStartNodesTestCase.java delete mode 100644 sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/DeployerTestCase.java delete mode 100644 sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeTestCase.java delete mode 100644 sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeXMLTestCase.java delete mode 100644 sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/sample/Helloworld.java delete mode 100644 sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/helloworld2.composite delete mode 100644 sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/helloworldNode.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar delete mode 100644 sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/itest-nodes-helloworld-service-2.0-SNAPSHOT.jar delete mode 100644 sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/sample-helloworld-nodeployable.jar delete mode 100644 sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/sample-helloworld.jar delete mode 100644 sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/sca-contribution-generated.xml (limited to 'sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test') diff --git a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/itest/nodes/Helloworld.java b/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/itest/nodes/Helloworld.java deleted file mode 100644 index 76f8d4400d..0000000000 --- a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/itest/nodes/Helloworld.java +++ /dev/null @@ -1,29 +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 itest.nodes; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Helloworld { - - String sayHello(String name); - -} diff --git a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/GetServiceTestCase.java b/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/GetServiceTestCase.java deleted file mode 100644 index 2c0583e3e8..0000000000 --- a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/GetServiceTestCase.java +++ /dev/null @@ -1,84 +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.domain.node; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.fail; -import itest.nodes.Helloworld; - -import org.junit.After; -import org.junit.Ignore; -import org.junit.Test; -import org.oasisopen.sca.ServiceRuntimeException; - -/** - * This shows how to test the Calculator service component. - */ -@Ignore("TUSCANY-3391") -public class GetServiceTestCase{ - - private static DomainNode clientNode; - private static DomainNode serviceNode; - - @Test - public void testTwoNodesSameDomain() throws Exception { - serviceNode = new DomainNode("target/test-classes/itest-nodes-helloworld-service-2.0-Beta1.jar"); - clientNode = new DomainNode("target/test-classes/itest-nodes-helloworld-client-2.0-Beta1.jar"); - - Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService"); - assertNotNull(service); - assertEquals("Hello Petra", service.sayHello("Petra")); - - Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient"); - assertNotNull(client); - assertEquals("Hi Hello Petra", client.sayHello("Petra")); - } - - @Test - public void testTwoNodesDifferentDomains() throws Exception { - serviceNode = new DomainNode("vm://fooDomain", new String[]{"target/test-classes/itest-nodes-helloworld-service-2.0-Beta1.jar"}); - Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService"); - assertNotNull(service); - assertEquals("Hello Petra", service.sayHello("Petra")); - - clientNode = new DomainNode("vm://barDomain", new String[] {"target/test-classes/itest-nodes-helloworld-client-2.0-Beta1.jar"}); - Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient"); - assertNotNull(client); - - try { - assertEquals("Hi Hello Petra", client.sayHello("Petra")); - fail(); - } catch (ServiceRuntimeException e) { - // FIXME: this gives an SCARuntimeException, would be better to be something like ServiceNotFoundException? - // expected - } - } - - @After - public void tearDownAfterClass() throws Exception { - if (clientNode != null) { - clientNode.stop(); - } - if (serviceNode != null) { - serviceNode.stop(); - } - } -} diff --git a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/MultipleNodesPerJVMTestCase.java b/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/MultipleNodesPerJVMTestCase.java deleted file mode 100644 index 1f90b3953e..0000000000 --- a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/MultipleNodesPerJVMTestCase.java +++ /dev/null @@ -1,87 +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.domain.node; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.fail; -import itest.nodes.Helloworld; - -import java.net.URI; - -import org.junit.After; -import org.junit.Ignore; -import org.junit.Test; -import org.oasisopen.sca.ServiceRuntimeException; -import org.oasisopen.sca.client.SCAClientFactory; - -/** - * This shows how to test the Calculator service component. - */ -@Ignore("TUSCANY-3391") -public class MultipleNodesPerJVMTestCase{ - - private static DomainNode clientNode; - private static DomainNode serviceNode; - - @Test - public void testTwoNodesSameDomain() throws Exception { - serviceNode = new DomainNode("target/test-classes/itest-nodes-helloworld-service-2.0-Beta1.jar"); - clientNode = new DomainNode("target/test-classes/itest-nodes-helloworld-client-2.0-Beta1.jar"); - - Helloworld service = SCAClientFactory.newInstance(URI.create("vm://defaultDomain")).getService(Helloworld.class, "HelloworldService"); - assertNotNull(service); - assertEquals("Hello Petra", service.sayHello("Petra")); - - Helloworld client = SCAClientFactory.newInstance(URI.create("vm://defaultDomain")).getService(Helloworld.class, "HelloworldClient"); - assertNotNull(client); - assertEquals("Hi Hello Petra", client.sayHello("Petra")); - } - - @Test - public void testTwoNodesDifferentDomains() throws Exception { - serviceNode = new DomainNode("vm://fooDomain", new String[]{"target/test-classes/itest-nodes-helloworld-service-2.0-Beta1.jar"}); - Helloworld service = SCAClientFactory.newInstance(URI.create("vm://fooDomain")).getService(Helloworld.class, "HelloworldService"); - assertNotNull(service); - assertEquals("Hello Petra", service.sayHello("Petra")); - - clientNode = new DomainNode("vm://barDomain", new String[]{"target/test-classes/itest-nodes-helloworld-client-2.0-Beta1.jar"}); - Helloworld client = SCAClientFactory.newInstance(URI.create("vm://barDomain")).getService(Helloworld.class, "HelloworldClient"); - assertNotNull(client); - - try { - assertEquals("Hi Hello Petra", client.sayHello("Petra")); - fail(); - } catch (ServiceRuntimeException e) { - // FIXME: this gives an SCARuntimeException, would be better to be something like ServiceNotFoundException? - // expected - } - } - - @After - public void tearDownAfterClass() throws Exception { - if (clientNode != null) { - clientNode.stop(); - } - if (serviceNode != null) { - serviceNode.stop(); - } - } -} diff --git a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/OneNodeTestCase.java b/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/OneNodeTestCase.java deleted file mode 100644 index aef93986fc..0000000000 --- a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/OneNodeTestCase.java +++ /dev/null @@ -1,105 +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.domain.node; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.fail; -import itest.nodes.Helloworld; - -import java.net.URI; - -import org.junit.After; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.oasisopen.sca.NoSuchDomainException; -import org.oasisopen.sca.NoSuchServiceException; -import org.oasisopen.sca.client.SCAClientFactory; - -/** - * This shows how to test the Calculator service component. - */ -@Ignore("TUSCANY-3391") -public class OneNodeTestCase{ - - private static DomainNode domain; - private static String serviceContributionUri; - - @Before - public void setUpBeforeClass() throws Exception { - domain = new DomainNode(); - serviceContributionUri = domain.addContribution("target/test-classes/itest-nodes-helloworld-service-2.0-Beta1.jar"); - domain.addContribution("target/test-classes/itest-nodes-helloworld-client-2.0-Beta1.jar"); - } - - @Test - public void testService() throws Exception { - Helloworld service = SCAClientFactory.newInstance(URI.create("vm://defaultDomain")).getService(Helloworld.class, "HelloworldService"); - assertNotNull(service); - assertEquals("Hello Petra", service.sayHello("Petra")); - } - - @Test - public void testClient() throws Exception { - Helloworld client = SCAClientFactory.newInstance(URI.create("vm://defaultDomain")).getService(Helloworld.class, "HelloworldClient"); - assertNotNull(client); - assertEquals("Hi Hello Petra", client.sayHello("Petra")); - } - - @Test - public void testRemovingServiceContribution() throws Exception { - domain.removeContribution(serviceContributionUri); - try { - SCAClientFactory.newInstance(URI.create("vm://defaultDomain")).getService(Helloworld.class, "HelloworldService"); - // FIXME: should this be NoSuchServiceException or ServiceNotFoundException? - } catch (NoSuchServiceException e) { - // expected - } - - Helloworld client = SCAClientFactory.newInstance(URI.create("vm://defaultDomain")).getService(Helloworld.class, "HelloworldClient"); - assertNotNull(client); - try { - assertEquals("Hi Hello Petra", client.sayHello("Petra")); - fail(); - } catch (Exception e) { - // FIXME: this gives an NPE, would be better to be something like ServiceNotFoundException - // expected - } - } - - @Test - public void testStoppingDomainNode() throws Exception { - domain.stop(); - try { - SCAClientFactory.newInstance(URI.create("vm://defaultDomain")).getService(Helloworld.class, "HelloworldClient"); - fail(); - } catch (NoSuchDomainException e) { - // expected - } - } - - @After - public void tearDownAfterClass() throws Exception { - if (domain != null) { - domain.stop(); - } - } -} diff --git a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/StopStartNodesTestCase.java b/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/StopStartNodesTestCase.java deleted file mode 100644 index febea897fa..0000000000 --- a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/domain/node/StopStartNodesTestCase.java +++ /dev/null @@ -1,82 +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.domain.node; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.fail; -import itest.nodes.Helloworld; - -import java.net.URI; - -import org.junit.After; -import org.junit.Ignore; -import org.junit.Test; -import org.oasisopen.sca.client.SCAClientFactory; - -/** - * This shows how to test the Calculator service component. - */ -@Ignore("TUSCANY-3391") -public class StopStartNodesTestCase{ - - private static DomainNode clientNode; - private static DomainNode serviceNode; - - @Test - public void testTwoNodesSameDomain() throws Exception { - serviceNode = new DomainNode("vm://fooDomain", new String[]{"target/test-classes/itest-nodes-helloworld-service-2.0-Beta1.jar"}); - clientNode = new DomainNode("vm://fooDomain", new String[]{"target/test-classes/itest-nodes-helloworld-client-2.0-Beta1.jar"}); - - Helloworld service = SCAClientFactory.newInstance(URI.create("vm://fooDomain")).getService(Helloworld.class, "HelloworldService"); - assertNotNull(service); - assertEquals("Hello Petra", service.sayHello("Petra")); - - Helloworld client = SCAClientFactory.newInstance(URI.create("vm://fooDomain")).getService(Helloworld.class, "HelloworldClient"); - assertNotNull(client); - assertEquals("Hi Hello Petra", client.sayHello("Petra")); - - serviceNode.stop(); - - client = SCAClientFactory.newInstance(URI.create("vm://fooDomain")).getService(Helloworld.class, "HelloworldClient"); - assertNotNull(client); - try { - assertEquals("Hi Hello Petra", client.sayHello("Petra")); - fail(); - } catch (Exception e) { - // expected - } - - serviceNode = new DomainNode("vm://fooDomain", new String[]{"target/test-classes/itest-nodes-helloworld-service-2.0-Beta1.jar"}); - client = SCAClientFactory.newInstance(URI.create("vm://fooDomain")).getService(Helloworld.class, "HelloworldClient"); - assertNotNull(client); - assertEquals("Hi Hello Petra", client.sayHello("Petra")); - } - - @After - public void tearDownAfterClass() throws Exception { - if (clientNode != null) { - clientNode.stop(); - } - if (serviceNode != null) { - serviceNode.stop(); - } - } -} diff --git a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/DeployerTestCase.java b/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/DeployerTestCase.java deleted file mode 100644 index 4d0d4abfd2..0000000000 --- a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/DeployerTestCase.java +++ /dev/null @@ -1,77 +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.node2; - -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 { - NodeFactory nodeFactory = NodeFactory.newInstance(); - Node node = nodeFactory.createNode("myDomain"); - - 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(); - - node.installContribution(contribution, null, true); - List 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 { - NodeFactory nodeFactory = NodeFactory.newInstance(); - Node node = nodeFactory.createNode("myDomain"); - - node.installContribution("foo", "src/test/resources/sample-helloworld-nodeployable.jar", null, null, true); - - 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"); - node.addDeploymentComposite("foo", composite); - List dcs = node.getDeployedComposites("foo"); - Assert.assertEquals(1, dcs.size()); - Assert.assertEquals("helloworld2.composite", dcs.get(0)); - } - -} diff --git a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeTestCase.java b/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeTestCase.java deleted file mode 100644 index cdf8b02688..0000000000 --- a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeTestCase.java +++ /dev/null @@ -1,141 +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.node2; - -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.node2.impl.NodeImpl; -import org.apache.tuscany.sca.runtime.ActivationException; -import org.junit.Ignore; -import org.junit.Test; -import org.oasisopen.sca.NoSuchDomainException; -import org.oasisopen.sca.NoSuchServiceException; - -public class NodeTestCase { - - @Test - public void testInstallDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); - node.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null, true); - -// Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent"); -// Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); - } - - @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.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); - -// Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent"); -// Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); - } - - @Test - public void testInstallNoDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); - node.installContribution("helloworld", "src/test/resources/sample-helloworld-nodeployable.jar", null, null, true); - -// SCAClientFactory scaClientFactory = node.getSCAClientFactory(); -// try { -// scaClientFactory.getService(Helloworld.class, "HelloworldComponent"); -// Assert.fail(); -// } catch (NoSuchServiceException e) { -// // expected as there is no deployables -// } - - node.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 { - Node node = NodeFactory.newInstance().createNode("default"); - node.installContribution("foo", "src/test/resources/sample-helloworld-nodeployable.jar", null, null, true); - List ics = node.getInstalledContributions(); - Assert.assertEquals(1, ics.size()); - Assert.assertEquals("foo", ics.get(0)); - } - - @Test - public void testGetDeployedCompostes() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, MalformedURLException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); - node.installContribution("foo", "src/test/resources/sample-helloworld.jar", null, null, true); - List dcs = node.getDeployedComposites("foo"); - Assert.assertEquals(1, dcs.size()); - Assert.assertEquals("helloworld.composite", dcs.get(0)); - } - - @Test - public void testRemoveComposte() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, MalformedURLException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); - node.installContribution("foo", "src/test/resources/sample-helloworld.jar", null, null, true); - node.removeFromDomainLevelComposite("foo", "helloworld.composite"); - List dcs = node.getDeployedComposites("foo"); - Assert.assertEquals(0, dcs.size()); - } - - @Test - public void testInstallWithMetaData() throws ContributionReadException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); - ((NodeImpl)node).installContribution("helloworld", "src/test/resources/sample-helloworld-nodeployable.jar", "src/test/resources/sca-contribution-generated.xml", null, true); - - List dcs = node.getDeployedComposites("helloworld"); - Assert.assertEquals(1, dcs.size()); - Assert.assertEquals("helloworld.composite", dcs.get(0)); - -// Helloworld helloworldService = scaClientFactory.getService(Helloworld.class, "HelloworldComponent"); -// Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); - } - - @Test - public void testURI() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { - Node node = NodeFactory.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.newStandaloneNode("helloworld.composite", "src/test/resources/sample-helloworld.jar"); - List cs = node.getInstalledContributions(); - Assert.assertEquals(1, cs.size()); - List dcs = node.getDeployedComposites(cs.get(0)); - Assert.assertEquals(1, dcs.size()); - Assert.assertEquals("helloworld.composite", dcs.get(0)); - } - - @Test - public void testStaticCreateWithNullComposite() { - Node node = NodeFactory.newStandaloneNode(null, "src/test/resources/sample-helloworld.jar"); - List cs = node.getInstalledContributions(); - Assert.assertEquals(1, cs.size()); - List dcs = node.getDeployedComposites(cs.get(0)); - Assert.assertEquals(1, dcs.size()); - Assert.assertEquals("helloworld.composite", dcs.get(0)); - } -} diff --git a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeXMLTestCase.java b/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeXMLTestCase.java deleted file mode 100644 index 110fbfd49e..0000000000 --- a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeXMLTestCase.java +++ /dev/null @@ -1,44 +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.node2; - -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.junit.Test; - -public class NodeXMLTestCase { - - @Test - public void testHelloworldXML() throws ContributionReadException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNodeFromXML("src/test/resources/helloworldNode.xml"); - Assert.assertEquals("helloworld", node.getDomainName()); - List cs = node.getInstalledContributions(); - Assert.assertEquals(1, cs.size()); - Assert.assertEquals("sample-helloworld", cs.get(0)); - List compsoites = node.getDeployedComposites("sample-helloworld"); - Assert.assertEquals(1, compsoites.size()); - Assert.assertEquals("helloworld.composite", compsoites.get(0)); - } - -} diff --git a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/sample/Helloworld.java b/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/java/sample/Helloworld.java deleted file mode 100644 index ea65a1e58c..0000000000 --- a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/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/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/helloworld2.composite b/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/helloworld2.composite deleted file mode 100644 index 8c7a789380..0000000000 --- a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/helloworld2.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/helloworldNode.xml b/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/helloworldNode.xml deleted file mode 100644 index ea2f577139..0000000000 --- a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/helloworldNode.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar b/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar deleted file mode 100644 index 3e9ae79a41..0000000000 Binary files a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar and /dev/null differ diff --git a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/itest-nodes-helloworld-service-2.0-SNAPSHOT.jar b/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/itest-nodes-helloworld-service-2.0-SNAPSHOT.jar deleted file mode 100644 index 40333cab75..0000000000 Binary files a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/itest-nodes-helloworld-service-2.0-SNAPSHOT.jar and /dev/null differ diff --git a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/sample-helloworld-nodeployable.jar b/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/sample-helloworld-nodeployable.jar deleted file mode 100644 index 16dde03858..0000000000 Binary files a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/sample-helloworld-nodeployable.jar and /dev/null differ diff --git a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/sample-helloworld.jar b/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/sample-helloworld.jar deleted file mode 100644 index 50e732d50b..0000000000 Binary files a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/sample-helloworld.jar and /dev/null differ diff --git a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/sca-contribution-generated.xml b/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/sca-contribution-generated.xml deleted file mode 100644 index 8e20561dc3..0000000000 --- a/sca-java-2.x/tags/2.0-Beta1-RC3/modules/domain-node/src/test/resources/sca-contribution-generated.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - -- cgit v1.2.3