From cad57e4f97ad5afd5f6e06664e97281e5aa7a77c Mon Sep 17 00:00:00 2001 From: edwardsmj Date: Fri, 16 Jan 2009 11:02:07 +0000 Subject: ASM_0016_TestCase & ASM_0017_TestCase added git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@734972 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/test/Service1Superset.java | 42 +++++++++++++++ .../src/main/java/test/service1SupersetImpl.java | 42 +++++++++++++++ .../src/main/resources/TestComposite10.composite | 47 +++++++++++++++++ .../src/main/resources/TestComposite4.composite | 6 +-- .../src/main/resources/TestComposite9.composite | 41 +++++++++++++++ .../src/main/resources/Test_ASM_0016.composite | 61 ++++++++++++++++++++++ .../src/main/resources/Test_ASM_0017.composite | 61 ++++++++++++++++++++++ .../src/test/java/client/ASM_0016_TestCase.java | 46 ++++++++++++++++ .../src/test/java/client/ASM_0017_TestCase.java | 47 +++++++++++++++++ 9 files changed, 390 insertions(+), 3 deletions(-) create mode 100644 java/sca/stest/sampleTest/src/main/java/test/Service1Superset.java create mode 100644 java/sca/stest/sampleTest/src/main/java/test/service1SupersetImpl.java create mode 100644 java/sca/stest/sampleTest/src/main/resources/TestComposite10.composite create mode 100644 java/sca/stest/sampleTest/src/main/resources/TestComposite9.composite create mode 100644 java/sca/stest/sampleTest/src/main/resources/Test_ASM_0016.composite create mode 100644 java/sca/stest/sampleTest/src/main/resources/Test_ASM_0017.composite create mode 100644 java/sca/stest/sampleTest/src/test/java/client/ASM_0016_TestCase.java create mode 100644 java/sca/stest/sampleTest/src/test/java/client/ASM_0017_TestCase.java (limited to 'java/sca/stest/sampleTest/src') diff --git a/java/sca/stest/sampleTest/src/main/java/test/Service1Superset.java b/java/sca/stest/sampleTest/src/main/java/test/Service1Superset.java new file mode 100644 index 0000000000..af9dba4ccf --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/java/test/Service1Superset.java @@ -0,0 +1,42 @@ +/* + * 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 test; + +/** + * A superset of the basic test service interface + * @author MikeEdwards + * + */ +public interface Service1Superset { + + /** + * Method for invoking testcase service + * @param input - input parameter(s) as a String + * @return - output data as a String + */ + public String operation1( String input ); + + /** + * A second method for invoking a testcase service + * @param input - input parameter(s) as a String + * @return - output data as a String + */ + public String operation2( String input ); + +} diff --git a/java/sca/stest/sampleTest/src/main/java/test/service1SupersetImpl.java b/java/sca/stest/sampleTest/src/main/java/test/service1SupersetImpl.java new file mode 100644 index 0000000000..dfb2fdaf06 --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/java/test/service1SupersetImpl.java @@ -0,0 +1,42 @@ +/* + * 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 test; + +import org.osoa.sca.annotations.*; + +/** + * Simple Java component implementation for business interface Service1Superset + * @author MikeEdwards + * + */ +@Service(Service1Superset.class) +public class service1SupersetImpl implements Service1Superset { + + @Property + public String serviceName = "service1"; + + public String operation1(String input) { + return serviceName + " operation1 invoked"; + } + + public String operation2(String input) { + return serviceName + " operation2 invoked"; + } + +} diff --git a/java/sca/stest/sampleTest/src/main/resources/TestComposite10.composite b/java/sca/stest/sampleTest/src/main/resources/TestComposite10.composite new file mode 100644 index 0000000000..286790a1b9 --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/resources/TestComposite10.composite @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/sca/stest/sampleTest/src/main/resources/TestComposite4.composite b/java/sca/stest/sampleTest/src/main/resources/TestComposite4.composite index 4aeceb4ec7..4792ad35f3 100644 --- a/java/sca/stest/sampleTest/src/main/resources/TestComposite4.composite +++ b/java/sca/stest/sampleTest/src/main/resources/TestComposite4.composite @@ -24,13 +24,13 @@ xmlns:sample="http://oasis/tests" name="TestComposite4"> - + - + @@ -38,7 +38,7 @@ - + diff --git a/java/sca/stest/sampleTest/src/main/resources/TestComposite9.composite b/java/sca/stest/sampleTest/src/main/resources/TestComposite9.composite new file mode 100644 index 0000000000..81c1e63190 --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/resources/TestComposite9.composite @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0016.composite b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0016.composite new file mode 100644 index 0000000000..08ae9416f2 --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0016.composite @@ -0,0 +1,61 @@ + + + + + + + + + + + + + ASM_0016 + + + + + + + + service1 + + + + + + + + + + + + service2 + + + diff --git a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0017.composite b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0017.composite new file mode 100644 index 0000000000..b2d45743ac --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0017.composite @@ -0,0 +1,61 @@ + + + + + + + + + + + + + ASM_0017 + + + + + + + + service1 + + + + + + + + + + + + service2 + + + diff --git a/java/sca/stest/sampleTest/src/test/java/client/ASM_0016_TestCase.java b/java/sca/stest/sampleTest/src/test/java/client/ASM_0016_TestCase.java new file mode 100644 index 0000000000..afc6e88fe1 --- /dev/null +++ b/java/sca/stest/sampleTest/src/test/java/client/ASM_0016_TestCase.java @@ -0,0 +1,46 @@ +/* + * 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 client; + + +import test.ASM_0002_Client; +import testClient.TestInvocation; + +/** + * Client for ASM_0016_TestCase, which tests that the interface declared + * by the child element of a of a + * is a compatible superset of the interface declared on the corresponding + * of the componentType of the of the + */ +public class ASM_0016_TestCase extends BaseJAXWSTestCase { + + + protected TestConfiguration getTestConfiguration() { + TestConfiguration config = new TestConfiguration(); + config.testName = "ASM_0016"; + config.input = "request"; + config.output = "ASM_0016 request service1 operation1 invoked service2 operation1 invoked"; + config.composite = "Test_ASM_0016.composite"; + config.testServiceName = "TestClient"; + config.testClass = ASM_0002_Client.class; + config.serviceInterface = TestInvocation.class; + return config; + } + +} // end class Test_ASM_0003 diff --git a/java/sca/stest/sampleTest/src/test/java/client/ASM_0017_TestCase.java b/java/sca/stest/sampleTest/src/test/java/client/ASM_0017_TestCase.java new file mode 100644 index 0000000000..e977c1a252 --- /dev/null +++ b/java/sca/stest/sampleTest/src/test/java/client/ASM_0017_TestCase.java @@ -0,0 +1,47 @@ +/* + * 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 client; + + +import test.ASM_0002_Client; +import testClient.TestInvocation; + +/** + * Client for ASM_0017_TestCase, which tests that where a + * of a has no child element, but the + * corresponding element in the componentType does have + * a binding child element, the from the componentType is + * used for the reference + */ +public class ASM_0017_TestCase extends BaseJAXWSTestCase { + + + protected TestConfiguration getTestConfiguration() { + TestConfiguration config = new TestConfiguration(); + config.testName = "ASM_0017"; + config.input = "request"; + config.output = "ASM_0017 request service1 operation1 invoked service2 operation1 invoked"; + config.composite = "Test_ASM_0017.composite"; + config.testServiceName = "TestClient"; + config.testClass = ASM_0002_Client.class; + config.serviceInterface = TestInvocation.class; + return config; + } + +} // end class Test_ASM_0003 -- cgit v1.2.3