From 3a569a2f00bf172cddfd567149774ee808a2a242 Mon Sep 17 00:00:00 2001 From: nash Date: Wed, 30 Mar 2011 19:50:51 +0000 Subject: Create branch for 1.6.2 git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1087059 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tuscany/sca/itest/WSDLTestCase.java | 146 +++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 sca-java-1.x/branches/sca-java-1.6.2/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/WSDLTestCase.java (limited to 'sca-java-1.x/branches/sca-java-1.6.2/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/WSDLTestCase.java') diff --git a/sca-java-1.x/branches/sca-java-1.6.2/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/WSDLTestCase.java b/sca-java-1.x/branches/sca-java-1.6.2/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/WSDLTestCase.java new file mode 100644 index 0000000000..fd30d69c79 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.6.2/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/WSDLTestCase.java @@ -0,0 +1,146 @@ +/* + * 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 junit.framework.Assert.assertEquals; +import helloworld.HelloWorldService; + +import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +/** + * Tests all the combinations of wiring services, components, and references + * which use either interface.java or interface.wsdl. The tests use a service + * (1) wired to a components (2) wired to another component (3) wired to a + * reference (4). Each of those uses either interface.java (a) or interface.wsdl + * (b). This results in 16 different combinations 1a2a3a4a thru 1b2b3b4b. + */ +public class WSDLTestCase { + + private static SCADomain domain; + + @Test + public void testClient1a2a3a4a() { + HelloWorldService client = domain.getService(HelloWorldService.class, "Client1a2a3a4a"); + assertEquals("Hi petra", client.getGreetings("petra")); + } + + @Test + public void testClient1a2a3a4b() { + HelloWorldService client = domain.getService(HelloWorldService.class, "Client1a2a3a4b"); + assertEquals("Hi petra", client.getGreetings("petra")); + } + + @Test + public void testClient1a2a3b4a() { + HelloWorldService client = domain.getService(HelloWorldService.class, "Client1a2a3b4a"); + assertEquals("Hi petra", client.getGreetings("petra")); + } + + @Test + public void testClient1a2a3b4b() { + HelloWorldService client = domain.getService(HelloWorldService.class, "Client1a2a3b4b"); + assertEquals("Hi petra", client.getGreetings("petra")); + } + + @Test + public void testClient1a2b3a4a() { + HelloWorldService client = domain.getService(HelloWorldService.class, "Client1a2b3a4a"); + assertEquals("Hi petra", client.getGreetings("petra")); + } + + @Test + public void testClient1a2b3a4b() { + HelloWorldService client = domain.getService(HelloWorldService.class, "Client1a2b3a4b"); + assertEquals("Hi petra", client.getGreetings("petra")); + } + + @Test + public void testClient1a2b3b4a() { + HelloWorldService client = domain.getService(HelloWorldService.class, "Client1a2b3b4a"); + assertEquals("Hi petra", client.getGreetings("petra")); + } + + @Test + public void testClient1a2b3b4b() { + HelloWorldService client = domain.getService(HelloWorldService.class, "Client1a2b3b4b"); + assertEquals("Hi petra", client.getGreetings("petra")); + } + + @Test + public void testClient1b2a3a4a() { + HelloWorldService client = domain.getService(HelloWorldService.class, "Client1b2a3a4a"); + assertEquals("Hi petra", client.getGreetings("petra")); + } + + @Test + public void testClient1b2a3a4b() { + HelloWorldService client = domain.getService(HelloWorldService.class, "Client1b2a3a4b"); + assertEquals("Hi petra", client.getGreetings("petra")); + } + + @Test + public void testClient1b2a3b4a() { + HelloWorldService client = domain.getService(HelloWorldService.class, "Client1b2a3b4a"); + assertEquals("Hi petra", client.getGreetings("petra")); + } + + @Test + public void testClient1b2a3b4b() { + HelloWorldService client = domain.getService(HelloWorldService.class, "Client1b2a3b4b"); + assertEquals("Hi petra", client.getGreetings("petra")); + } + + @Test + public void testClient1b2b3a4a() { + HelloWorldService client = domain.getService(HelloWorldService.class, "Client1b2b3a4a"); + assertEquals("Hi petra", client.getGreetings("petra")); + } + + @Test + public void testClient1b2b3a4b() { + HelloWorldService client = domain.getService(HelloWorldService.class, "Client1b2b3a4b"); + assertEquals("Hi petra", client.getGreetings("petra")); + } + + @Test + public void testClient1b2b3b4a() { + HelloWorldService client = domain.getService(HelloWorldService.class, "Client1b2b3b4a"); + assertEquals("Hi petra", client.getGreetings("petra")); + } + + @Test + public void testClient1b2b3b4b() { + HelloWorldService client = domain.getService(HelloWorldService.class, "Client1b2b3b4b"); + assertEquals("Hi petra", client.getGreetings("petra")); + } + + @BeforeClass + public static void init() throws Throwable { + domain = SCADomain.newInstance("WSDLTest.composite"); + } + + @AfterClass + public static void destroy() throws Exception { + domain.close(); + } +} -- cgit v1.2.3