diff options
Diffstat (limited to 'branches/sca-java-1.x/itest/wsdl/src/test')
4 files changed, 0 insertions, 399 deletions
diff --git a/branches/sca-java-1.x/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/HelloWorldClient.java b/branches/sca-java-1.x/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/HelloWorldClient.java deleted file mode 100644 index f4edf7bef0..0000000000 --- a/branches/sca-java-1.x/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/HelloWorldClient.java +++ /dev/null @@ -1,52 +0,0 @@ -/*
- * 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 java.io.File;
-
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
-
-import helloworld.HelloWorldService;
-
-/**
- * This client program shows how to create an SCA runtime, start it,
- * and locate and invoke a SCA component
- */
-public class HelloWorldClient {
- public static void main(String[] args) throws Exception {
-
- SCANodeFactory factory = SCANodeFactory.newInstance();
- SCANode node = factory.createSCANode(new File("src/main/resources/imports/wsdl/helloworldws.composite").toURL().toString(),
- new SCAContribution("TestContribution", new File("src/main/resources/imports/wsdl/").toURL().toString()));
- node.start();
-
- HelloWorldService hwService =
- ((SCAClient)node).getService(HelloWorldService.class, "HelloWorldServiceComponent");
-
- System.out.println("Hello " + hwService.getGreetings("World"));
-
- node.stop();
- System.out.println("Bye");
- }
-
-}
diff --git a/branches/sca-java-1.x/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/SDOWSDLTestCase.java b/branches/sca-java-1.x/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/SDOWSDLTestCase.java deleted file mode 100644 index 12441753fb..0000000000 --- a/branches/sca-java-1.x/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/SDOWSDLTestCase.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * 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 java.rmi.RemoteException; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -import bigbank.account.services.accountdata.AccountDataService; - -import com.bigbank.account.AccountFactory; -import com.bigbank.account.AccountReport; -import com.bigbank.account.AccountSummary; -import com.bigbank.account.CustomerProfileData; - -/** - * 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 SDOWSDLTestCase { - - private static SCADomain domain; - - @Test - public void testClient1a2a3a4a() throws RemoteException { - doit("Client1a2a3a4a"); - } - - @Test - public void testClient1a2a3a4b() throws RemoteException { - doit("Client1a2a3a4b"); - } - - @Test - public void testClient1a2a3b4a() throws RemoteException { - doit("Client1a2a3b4a"); - } - - @Test - public void testClient1a2a3b4b() throws RemoteException { - doit("Client1a2a3b4b"); - } - - @Test - public void testClient1a2b3a4a() throws RemoteException { - doit("Client1a2b3a4a"); - } - - @Test - public void testClient1a2b3a4b() throws RemoteException { - doit("Client1a2b3a4b"); - } - - @Test - public void testClient1a2b3b4a() throws RemoteException { - doit("Client1a2b3b4a"); - } - - @Test - public void testClient1a2b3b4b() throws RemoteException { - doit("Client1a2b3b4b"); - } - - @Test - public void testClient1b2a3a4a() throws RemoteException { - doit("Client1b2a3a4a"); - } - - @Test - public void testClient1b2a3a4b() throws RemoteException { - doit("Client1b2a3a4b"); - } - - @Test - public void testClient1b2a3b4a() throws RemoteException { - doit("Client1b2a3b4a"); - } - - @Test - public void testClient1b2a3b4b() throws RemoteException { - doit("Client1b2a3b4b"); - } - - @Test - public void testClient1b2b3a4a() throws RemoteException { - doit("Client1b2b3a4a"); - } - - @Test - public void testClient1b2b3a4b() throws RemoteException { - doit("Client1b2b3a4b"); - } - - @Test - public void testClient1b2b3b4a() throws RemoteException { - doit("Client1b2b3b4a"); - } - - @Test - public void testClient1b2b3b4b() throws RemoteException { - doit("Client1b2b3b4b"); - } - - private void doit(String compName) throws RemoteException { - AccountDataService client = domain.getService(AccountDataService.class, compName); - CustomerProfileData dataIn = AccountFactory.INSTANCE.createCustomerProfileData(); - dataIn.setAddress("home"); - dataIn.setEmail("petra@home"); - dataIn.setFirstName("petra"); - dataIn.setId(1); - dataIn.setLastName("A"); - dataIn.setLoginID("petra"); - dataIn.setPassword("ant"); - - CustomerProfileData dataOut = client.createAccount(dataIn , false, false); - - assertEquals(dataIn.getAddress(), dataOut.getAddress()); - assertEquals(dataIn.getEmail(), dataOut.getEmail()); - assertEquals(dataIn.getFirstName(), dataOut.getFirstName()); - assertEquals(dataIn.getId(), dataOut.getId()); - assertEquals(dataIn.getLastName(), dataOut.getLastName()); - assertEquals(dataIn.getLoginID(), dataOut.getLoginID()); - assertEquals(dataIn.getPassword(), dataOut.getPassword()); - - AccountReport report = client.getAccountReport(12345); - AccountSummary summary1 = (AccountSummary)report.getAccountSummaries().get(0); - assertEquals(summary1.getAccountType(), "checking"); - AccountSummary summary2 = (AccountSummary)report.getAccountSummaries().get(1); - assertEquals(summary2.getBalance(), 2000.f); - } - - @BeforeClass - public static void setUp() throws Exception { - domain = SCADomain.newInstance("SDOWSDLTest.composite"); - } - - @AfterClass - public static void tearDown() throws Exception { - domain.close(); - } - -} diff --git a/branches/sca-java-1.x/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/WSDLImportsTestCase.java b/branches/sca-java-1.x/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/WSDLImportsTestCase.java deleted file mode 100644 index 8026f93b80..0000000000 --- a/branches/sca-java-1.x/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/WSDLImportsTestCase.java +++ /dev/null @@ -1,32 +0,0 @@ -/*
- * 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 junit.framework.TestCase;
-
-/**
- * Tests out the big bank service
- *
- */
-public class WSDLImportsTestCase extends TestCase {
-
- public void testServer() throws Exception {
- HelloWorldClient.main(new String[] {""});
- }
-}
diff --git a/branches/sca-java-1.x/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/WSDLTestCase.java b/branches/sca-java-1.x/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/WSDLTestCase.java deleted file mode 100644 index fd30d69c79..0000000000 --- a/branches/sca-java-1.x/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/WSDLTestCase.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * 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(); - } -} |