diff options
Diffstat (limited to 'sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org')
16 files changed, 971 insertions, 0 deletions
diff --git a/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_001_TestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_001_TestCase.java new file mode 100644 index 0000000000..27ff4da34b --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_001_TestCase.java @@ -0,0 +1,87 @@ +/* + * 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.itest; + +import static org.junit.Assert.assertEquals; + +//import org.apache.tuscany.sca.node.equinox.launcher.Contribution; +//import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher; +import org.apache.tuscany.sca.node.Contribution; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.Ignore; + +import org.apache.tuscany.sca.itest.TestInvocation; + +/** + * Client for Async_001_TestCase + * Async service invocation test #001 + * Tests that an async service can be invoked over the JMS Binding + */ +public class Async_001_TestCase { + + //protected NodeLauncher launcher; + protected Node node; + + private String testName = this.getClass().getSimpleName().substring(0, 9); + private String input = "request"; + private String[] output = new String[] { "Async_001 request service1 operation1 invoked asynchronously" }; + private String composite = "Test_" + testName + ".composite"; + private String[] contributionNames = new String[] { "Async_001" }; + + @Before + public void setUp() throws Exception { + + final NodeFactory nf = NodeFactory.newInstance(); + String here = ASM_0002_Client.class.getProtectionDomain().getCodeSource().getLocation().toString(); + // Create the node using the pattern "name of composite file to start" / Contribution to use + node = nf.createNode(this.composite, new Contribution("test", here)); + + node.start(); + } + + @After + public void tearDown() throws Exception { + node.stop(); + } + + @Test + public void testReference() { + TestInvocation test = node.getService(TestInvocation.class, "TestClient/TestInvocation"); + try { + final String response = test.invokeTest(this.input); + System.out.println(response); + assertEquals(this.output[0], response); + } catch (Throwable t) { + assertEquals("exception", this.output[0]); + } // end try + } // end testReference + + /** + * Dummy method to ensure that things work with JUnit 3 eg within Eclipse Ganymede + */ + @Ignore + @Test + public void testFoo() throws Exception { + } + +} // end class Async_001_TestCase diff --git a/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_002_TestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_002_TestCase.java new file mode 100644 index 0000000000..d18b8d3b73 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_002_TestCase.java @@ -0,0 +1,85 @@ +/* + * 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.itest; + +import static org.junit.Assert.assertEquals; + +//import org.apache.tuscany.sca.node.equinox.launcher.Contribution; +//import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher; +import org.apache.tuscany.sca.node.Contribution; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.Ignore; + +import org.apache.tuscany.sca.itest.TestInvocation; + +/** + * Client for Async_002_TestCase + * Async service invocation test #001 + * Tests that an async service can be invoked over the SCA Binding + */ +public class Async_002_TestCase { + + //protected NodeLauncher launcher; + protected Node node; + + private String input = "request"; + private String[] output = new String[] { "Async_002 request service1 operation1 invoked asynchronously" }; + private String composite = "Test_Async_002.composite"; + + @Before + public void setUp() throws Exception { + + final NodeFactory nf = NodeFactory.newInstance(); + String here = ASM_0002_Client.class.getProtectionDomain().getCodeSource().getLocation().toString(); + // Create the node using the pattern "name of composite file to start" / Contribution to use + node = nf.createNode(this.composite, new Contribution("test", here)); + + node.start(); + } + + @After + public void tearDown() throws Exception { + node.stop(); + } + + @Test + public void testReference() { + TestInvocation test = node.getService(TestInvocation.class, "TestClient/TestInvocation"); + try { + final String response = test.invokeTest(this.input); + System.out.println(response); + assertEquals(this.output[0], response); + } catch (Throwable t) { + assertEquals("exception", this.output[0]); + } // end try + } // end testReference + + /** + * Dummy method to ensure that things work with JUnit 3 eg within Eclipse Ganymede + */ + @Ignore + @Test + public void testFoo() throws Exception { + } + +} // end class Async_001_TestCase diff --git a/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_003_TestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_003_TestCase.java new file mode 100644 index 0000000000..fafe522da8 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_003_TestCase.java @@ -0,0 +1,85 @@ +/* + * 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.itest; + +import static org.junit.Assert.assertEquals; + +//import org.apache.tuscany.sca.node.equinox.launcher.Contribution; +//import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher; +import org.apache.tuscany.sca.node.Contribution; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.Ignore; + +import org.apache.tuscany.sca.itest.TestInvocation; + +/** + * Client for Async_003_TestCase + * Async service invocation test #003 + * Tests that an async service can be invoked over the Web services Binding + */ +public class Async_003_TestCase { + + //protected NodeLauncher launcher; + protected Node node; + + private String input = "request"; + private String[] output = new String[] { "Async_003 request service1 operation1 invoked asynchronously" }; + private String composite = "Test_Async_003.composite"; + + @Before + public void setUp() throws Exception { + + final NodeFactory nf = NodeFactory.newInstance(); + String here = ASM_0002_Client.class.getProtectionDomain().getCodeSource().getLocation().toString(); + // Create the node using the pattern "name of composite file to start" / Contribution to use + node = nf.createNode(this.composite, new Contribution("test", here)); + + node.start(); + } + + @After + public void tearDown() throws Exception { + node.stop(); + } + + @Test + public void testReference() { + TestInvocation test = node.getService(TestInvocation.class, "TestClient/TestInvocation"); + try { + final String response = test.invokeTest(this.input); + System.out.println(response); + assertEquals(this.output[0], response); + } catch (Throwable t) { + assertEquals("exception", this.output[0]); + } // end try + } // end testReference + + /** + * Dummy method to ensure that things work with JUnit 3 eg within Eclipse Ganymede + */ + @Ignore + @Test + public void testFoo() throws Exception { + } + +} // end class Async_001_TestCase diff --git a/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1DistributedSyncServiceTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1DistributedSyncServiceTestCase.java new file mode 100644 index 0000000000..6b7bf1b8b0 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1DistributedSyncServiceTestCase.java @@ -0,0 +1,58 @@ +/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1DistributedSyncServiceTestCase {
+
+ private static final URI DOMAIN = URI.create("uri:Test1DistributedTestCase?bind=127.0.0.1:8765");
+ protected static Node clientNode, serviceNode;
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ serviceNode = TuscanyRuntime.runComposite(DOMAIN, "test1SyncService.composite", "target/classes");
+ clientNode = TuscanyRuntime.runComposite(DOMAIN, "test1Client.composite", "target/classes");
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ if (clientNode != null) clientNode.stop();
+ if (serviceNode != null) serviceNode.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = clientNode.getService(Service1.class, "Client");
+ assertEquals("Service1NonAsyncServerImpl.operation1 foo" +
+ "Service1NonAsyncServerImpl.operation1 fooTypeOne" +
+ "Service1NonAsyncServerImpl.operation1 fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1DistributedTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1DistributedTestCase.java new file mode 100644 index 0000000000..d506441220 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1DistributedTestCase.java @@ -0,0 +1,60 @@ +/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+@Ignore
+public class Test1DistributedTestCase {
+
+ private static final URI DOMAIN = URI.create("uri:Test1DistributedTestCase?bind=127.0.0.1:8765");
+ protected Node clientNode, serviceNode;
+
+ @Before
+ public void setUp() throws Exception {
+ clientNode = TuscanyRuntime.runComposite(DOMAIN, "test1Client.composite", "target/classes");
+ serviceNode = TuscanyRuntime.runComposite(DOMAIN, "test1AsyncService.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ if (clientNode != null) clientNode.stop();
+ if (serviceNode != null) serviceNode.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = clientNode.getService(Service1.class, "Client");
+ assertEquals("Service1AsyncServerImpl2.operation1Async foo" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeOne" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsBytesTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsBytesTestCase.java new file mode 100644 index 0000000000..3ec19f5140 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsBytesTestCase.java @@ -0,0 +1,56 @@ +/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+@Ignore
+public class Test1JmsBytesTestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1jmsbytes.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1AsyncServerImpl2.operation1Async foo" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeOne" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsBytesXmlTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsBytesXmlTestCase.java new file mode 100644 index 0000000000..76bcd3b631 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsBytesXmlTestCase.java @@ -0,0 +1,54 @@ +/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1JmsBytesXmlTestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1jmsbytesxml.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1AsyncServerImpl2.operation1Async foo" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeOne" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsObjectTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsObjectTestCase.java new file mode 100644 index 0000000000..09b6fa5ba1 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsObjectTestCase.java @@ -0,0 +1,54 @@ +/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1JmsObjectTestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1jmsobject.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1AsyncServerImpl2.operation1Async foo" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeOne" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTestCase.java new file mode 100644 index 0000000000..46006f77ac --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTestCase.java @@ -0,0 +1,54 @@ +/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1JmsTestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1jms.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1AsyncServerImpl2.operation1Async foo" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeOne" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTextTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTextTestCase.java new file mode 100644 index 0000000000..1c760b1ad5 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTextTestCase.java @@ -0,0 +1,54 @@ +/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1JmsTextTestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1jmstext.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1AsyncServerImpl2.operation1Async foo" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeOne" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTextXmlTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTextXmlTestCase.java new file mode 100644 index 0000000000..79f3ee69bb --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTextXmlTestCase.java @@ -0,0 +1,54 @@ +/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1JmsTextXmlTestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1jmstextxml.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ if (node != null) node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1AsyncServerImpl2.operation1Async foo" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeOne" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceJMSTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceJMSTestCase.java new file mode 100644 index 0000000000..1c0cbbafa2 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceJMSTestCase.java @@ -0,0 +1,54 @@ +/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1NonAsyncServiceJMSTestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1NonAsyncServiceJMS.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1NonAsyncServerImpl.operation1 foo" +
+ "Service1NonAsyncServerImpl.operation1 fooTypeOne" +
+ "Service1NonAsyncServerImpl.operation1 fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceTestCase.java new file mode 100644 index 0000000000..b7084a61f8 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceTestCase.java @@ -0,0 +1,54 @@ +/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1NonAsyncServiceTestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1NonAsyncService.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1NonAsyncServerImpl.operation1 foo" +
+ "Service1NonAsyncServerImpl.operation1 fooTypeOne" +
+ "Service1NonAsyncServerImpl.operation1 fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceWSTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceWSTestCase.java new file mode 100644 index 0000000000..f7c7544cfa --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceWSTestCase.java @@ -0,0 +1,54 @@ +/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1NonAsyncServiceWSTestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1NonAsyncServiceWS.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1NonAsyncServerImpl.operation1 foo" +
+ "Service1NonAsyncServerImpl.operation1 fooTypeOne" +
+ "Service1NonAsyncServerImpl.operation1 fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1TestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1TestCase.java new file mode 100644 index 0000000000..3c293b2dc8 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1TestCase.java @@ -0,0 +1,54 @@ +/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1TestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1AsyncServerImpl2.operation1Async foo" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeOne" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1WSTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1WSTestCase.java new file mode 100644 index 0000000000..9fe28c855a --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta4-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1WSTestCase.java @@ -0,0 +1,54 @@ +/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1WSTestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1ws.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1AsyncServerImpl2.operation1Async foo" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeOne" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
|