You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2009/06/08 10:52:50 UTC
svn commit: r782563 - in /tuscany/java/sca/itest/nodes/one-node-test: ./
src/ src/main/ src/main/java/ src/test/ src/test/java/ src/test/java/itest/
target/ target/classes/ target/classes/itest/ target/test-classes/
target/test-classes/itest/
Author: antelder
Date: Mon Jun 8 08:52:50 2009
New Revision: 782563
URL: http://svn.apache.org/viewvc?rev=782563&view=rev
Log:
Add an itest for a single node using multiple contributions. This is just lik ethe tow nodes test but just using one node instead of two. Doesn't work yet till the new endpoint changes go in
Added:
tuscany/java/sca/itest/nodes/one-node-test/ (with props)
tuscany/java/sca/itest/nodes/one-node-test/pom.xml
tuscany/java/sca/itest/nodes/one-node-test/src/
tuscany/java/sca/itest/nodes/one-node-test/src/main/
tuscany/java/sca/itest/nodes/one-node-test/src/main/java/
tuscany/java/sca/itest/nodes/one-node-test/src/test/
tuscany/java/sca/itest/nodes/one-node-test/src/test/java/
tuscany/java/sca/itest/nodes/one-node-test/src/test/java/itest/
tuscany/java/sca/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java
tuscany/java/sca/itest/nodes/one-node-test/target/
tuscany/java/sca/itest/nodes/one-node-test/target/classes/
tuscany/java/sca/itest/nodes/one-node-test/target/classes/itest/
tuscany/java/sca/itest/nodes/one-node-test/target/test-classes/
tuscany/java/sca/itest/nodes/one-node-test/target/test-classes/itest/
tuscany/java/sca/itest/nodes/one-node-test/target/test-classes/itest/OneNodeTestCase.class (with props)
Propchange: tuscany/java/sca/itest/nodes/one-node-test/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Jun 8 08:52:50 2009
@@ -0,0 +1,20 @@
+target
+work
+dojo
+*.iws
+*.ipr
+*.iml
+derby.log
+maven.log
+maven-eclipse.xml
+build.xml
+build-dependency.xml
+velocity.log*
+junit*.properties
+surefire*.properties
+.project
+.classpath
+.settings
+.deployables
+.wtpmodules
+.externalToolBuilders
Added: tuscany/java/sca/itest/nodes/one-node-test/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/nodes/one-node-test/pom.xml?rev=782563&view=auto
==============================================================================
--- tuscany/java/sca/itest/nodes/one-node-test/pom.xml (added)
+++ tuscany/java/sca/itest/nodes/one-node-test/pom.xml Mon Jun 8 08:52:50 2009
@@ -0,0 +1,48 @@
+<?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.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-one-nodes-test</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes One Nodes Test</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
Added: tuscany/java/sca/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java?rev=782563&view=auto
==============================================================================
--- tuscany/java/sca/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java (added)
+++ tuscany/java/sca/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java Mon Jun 8 08:52:50 2009
@@ -0,0 +1,70 @@
+/*
+ * 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 static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class OneNodeTestCase{
+
+ private static Node node;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ 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"));
+ 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"));
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
Added: tuscany/java/sca/itest/nodes/one-node-test/target/test-classes/itest/OneNodeTestCase.class
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/nodes/one-node-test/target/test-classes/itest/OneNodeTestCase.class?rev=782563&view=auto
==============================================================================
Binary file - no diff available.
Propchange: tuscany/java/sca/itest/nodes/one-node-test/target/test-classes/itest/OneNodeTestCase.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream