summaryrefslogtreecommitdiffstats
path: root/java/sca/itest/nodes
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-06-10 16:02:08 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-06-10 16:02:08 +0000
commit6c09087064a842ce1638329c489491529f657284 (patch)
tree6e0faf4ca97442d4ed5c57eed9600b38a1c646e6 /java/sca/itest/nodes
parentffd6e619347c34dd97d5df0ce964d219b154bf38 (diff)
Change the file separator
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@783408 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/itest/nodes')
-rw-r--r--java/sca/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java16
-rw-r--r--java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java16
2 files changed, 17 insertions, 15 deletions
diff --git a/java/sca/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java b/java/sca/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java
index 573da860fb..f05851a117 100644
--- a/java/sca/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java
+++ b/java/sca/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java
@@ -6,15 +6,15 @@
* 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.
+ * under the License.
*/
package itest;
@@ -42,20 +42,20 @@ public class OneNodeTestCase{
System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled", "false");
NodeFactory factory = NodeFactory.newInstance();
node = factory.createNode(
- new Contribution("service", "..\\helloworld-service\\target\\itest-nodes-helloworld-service-2.0-SNAPSHOT.jar"),
- new Contribution("client", "..\\helloworld-client\\target\\itest-nodes-helloworld-client-2.0-SNAPSHOT.jar"));
+ new Contribution("service", "../helloworld-service/target/itest-nodes-helloworld-service-2.0-SNAPSHOT.jar"),
+ new Contribution("client", "../helloworld-client/target/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar"));
node.start();
}
@Test
public void testCalculator() throws Exception {
-
+
// Ideally this would use the SCAClient API but leaving that tillwe have the basics working
-
+
Helloworld service = node.getService(Helloworld.class, "HelloworldService");
assertNotNull(service);
assertEquals("Hello Petra", service.sayHello("Petra"));
-
+
Helloworld client = node.getService(Helloworld.class, "HelloworldClient");
assertNotNull(client);
assertEquals("Hi Hello Petra", client.sayHello("Petra"));
diff --git a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java b/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java
index 80b71cab29..4659b717fb 100644
--- a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java
+++ b/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java
@@ -6,15 +6,15 @@
* 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.
+ * under the License.
*/
package itest;
@@ -23,6 +23,8 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import itest.nodes.Helloworld;
+import java.io.File;
+
import org.apache.tuscany.sca.node.Contribution;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
@@ -44,9 +46,9 @@ public class TwoNodesTestCase{
public static void setUpBeforeClass() throws Exception {
System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled", "false");
NodeFactory factory = NodeFactory.newInstance();
- serviceNode = factory.createNode(new Contribution("service", "..\\helloworld-service\\target\\itest-nodes-helloworld-service-2.0-SNAPSHOT.jar"));
+ serviceNode = factory.createNode(new Contribution("service", new File("../helloworld-service/target/itest-nodes-helloworld-service-2.0-SNAPSHOT.jar").toURI().toString()));
serviceNode.start();
- clientNode = factory.createNode(new Contribution("client", "..\\helloworld-client\\target\\itest-nodes-helloworld-client-2.0-SNAPSHOT.jar"));
+ clientNode = factory.createNode(new Contribution("client", new File("../helloworld-client/target/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar").toURI().toString()));
clientNode.start();
}
@@ -55,7 +57,7 @@ public class TwoNodesTestCase{
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"));
@@ -67,7 +69,7 @@ public class TwoNodesTestCase{
Helloworld service = scaClient.getService(Helloworld.class, "HelloworldService", null);
assertNotNull(service);
assertEquals("Hello Petra", service.sayHello("Petra"));
-
+
Helloworld client = scaClient.getService(Helloworld.class, "HelloworldClient", null);
assertNotNull(client);
assertEquals("Hi Hello Petra", client.sayHello("Petra"));