From c53b2ffb0c71ea25e3a71adeaa946a205975bbed Mon Sep 17 00:00:00 2001 From: antelder Date: Fri, 4 Dec 2009 11:30:31 +0000 Subject: Add some separate client and service classes to run the test manually in eclipse git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@887161 13f79535-47bb-0310-9956-ffa450edef68 --- .../itest/nodes/two-nodes-two-vms-test/pom.xml | 5 ++ .../src/test/java/itest/Client.java | 55 +++++++++++++++++++++ .../src/test/java/itest/Service.java | 57 ++++++++++++++++++++++ 3 files changed, 117 insertions(+) create mode 100644 sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java create mode 100644 sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java diff --git a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/pom.xml b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/pom.xml index 1ffccd9fd5..4605e62ce4 100644 --- a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/pom.xml +++ b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/pom.xml @@ -29,6 +29,11 @@ Apache Tuscany SCA iTest Nodes Two Nodes Two VMs Test + + org.apache.tuscany.sca + tuscany-domain-node + 2.0-SNAPSHOT + org.apache.tuscany.sca tuscany-endpoint-tribes diff --git a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java new file mode 100644 index 0000000000..22bf1c4ecc --- /dev/null +++ b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java @@ -0,0 +1,55 @@ +/* + * 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; + +import org.apache.tuscany.sca.domain.node.DomainNode; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +/** + * This shows how to test the Calculator service component. + */ +public class Client { + + private static DomainNode clientNode; + + @BeforeClass + public static void setUpBeforeClass() throws Exception { +// NodeFactory factory = NodeFactory.newInstance(); +// +// serviceNode = factory.createNode(new File("client-config.xml").toURI().toURL()); +// serviceNode.start(); + + clientNode = new DomainNode("tribes:default", new String []{"../helloworld-client/target/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar"}); + } + + @Test + public void testNothing() throws Exception { + + } + + @AfterClass + public static void tearDownAfterClass() throws Exception { + if (clientNode != null) { + clientNode.stop(); + } + } +} diff --git a/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java new file mode 100644 index 0000000000..28a47ae175 --- /dev/null +++ b/sca-java-2.x/trunk/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java @@ -0,0 +1,57 @@ +/* + * 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; + +import org.apache.tuscany.sca.domain.node.DomainNode; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +/** + * This shows how to test the Calculator service component. + */ +public class Service { + +// private static Node serviceNode; + private static DomainNode serviceNode; + + @BeforeClass + public static void setUpBeforeClass() throws Exception { +// NodeFactory factory = NodeFactory.newInstance(); +// +// serviceNode = factory.createNode(new File("server-config.xml").toURI().toURL()); +// serviceNode.start(); + + serviceNode = new DomainNode("tribes:default", new String[]{"../helloworld-service/target/classes"}); + + } + + @Test + public void testNothing() throws Exception { + + } + + @AfterClass + public static void tearDownAfterClass() throws Exception { + if (serviceNode != null) { + serviceNode.stop(); + } + } +} -- cgit v1.2.3