From eb1a1e010f96565ba8441f4cdc2654a31af2d570 Mon Sep 17 00:00:00 2001 From: beckerdo Date: Wed, 11 Mar 2009 16:02:30 +0000 Subject: TUSCANY-2907 Stest code git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@752484 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/test/service1Impl5.java | 45 ++++++++++++++ .../src/main/resources/TestComposite13.composite | 46 +++++++++++++++ .../src/main/resources/TestComposite14.composite | 45 ++++++++++++++ .../src/main/resources/TestComposite15.composite | 43 ++++++++++++++ .../src/main/resources/TestComposite16.composite | 48 +++++++++++++++ .../src/main/resources/TestComposite17.composite | 46 +++++++++++++++ .../src/main/resources/TestComposite18.composite | 42 +++++++++++++ .../src/main/resources/TestDuplicate1.composite | 41 +++++++++++++ .../src/main/resources/TestDuplicate2.composite | 41 +++++++++++++ .../src/main/resources/Test_ASM_0025.composite | 61 +++++++++++++++++++ .../src/main/resources/Test_ASM_0026.composite | 57 ++++++++++++++++++ .../src/main/resources/Test_ASM_0027.composite | 49 ++++++++++++++++ .../src/main/resources/Test_ASM_0028.composite | 55 +++++++++++++++++ .../src/main/resources/Test_ASM_0029.composite | 58 ++++++++++++++++++ .../src/main/resources/Test_ASM_0030.composite | 51 ++++++++++++++++ .../src/main/resources/Test_ASM_0031.composite | 68 ++++++++++++++++++++++ .../sampleTest/src/main/resources/Test_Types.xsd | 37 ++++++++++++ .../src/test/java/client/ASM_0025_TestCase.java | 58 ++++++++++++++++++ .../src/test/java/client/ASM_0026_TestCase.java | 64 ++++++++++++++++++++ .../src/test/java/client/ASM_0027_TestCase.java | 60 +++++++++++++++++++ .../src/test/java/client/ASM_0028_TestCase.java | 59 +++++++++++++++++++ .../src/test/java/client/ASM_0029_TestCase.java | 63 ++++++++++++++++++++ .../src/test/java/client/ASM_0030_TestCase.java | 57 ++++++++++++++++++ .../src/test/java/client/ASM_0031_TestCase.java | 63 ++++++++++++++++++++ 24 files changed, 1257 insertions(+) create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/main/java/test/service1Impl5.java create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite13.composite create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite14.composite create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite15.composite create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite16.composite create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite17.composite create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite18.composite create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestDuplicate1.composite create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestDuplicate2.composite create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0025.composite create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0026.composite create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0027.composite create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0028.composite create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0029.composite create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0030.composite create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0031.composite create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_Types.xsd create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0025_TestCase.java create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0026_TestCase.java create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0027_TestCase.java create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0028_TestCase.java create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0029_TestCase.java create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0030_TestCase.java create mode 100644 branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0031_TestCase.java diff --git a/branches/sca-java-1.x/stest/sampleTest/src/main/java/test/service1Impl5.java b/branches/sca-java-1.x/stest/sampleTest/src/main/java/test/service1Impl5.java new file mode 100644 index 0000000000..1719ba9405 --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/main/java/test/service1Impl5.java @@ -0,0 +1,45 @@ +/* + * 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.oasisopen.sca.annotation.*; +import org.osoa.sca.annotations.*; + +/** + * Java component implementation for business interface Service1 + * - no references + * - 3 properties + * @author MikeEdwards + * + */ +@Service(Service1.class) +public class service1Impl5 implements Service1 { + + @Property + public String serviceName = "service1"; + @Property + public String serviceData1; + @Property + public String serviceData2; + + public String operation1(String input) { + return serviceName + " operation1 invoked" + serviceData1 + serviceData2; + } + +} diff --git a/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite13.composite b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite13.composite new file mode 100644 index 0000000000..37247e24fe --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite13.composite @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite14.composite b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite14.composite new file mode 100644 index 0000000000..e62c7f6eaa --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite14.composite @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite15.composite b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite15.composite new file mode 100644 index 0000000000..e85a4ee831 --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite15.composite @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite16.composite b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite16.composite new file mode 100644 index 0000000000..25284836f8 --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite16.composite @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite17.composite b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite17.composite new file mode 100644 index 0000000000..7a562ae237 --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite17.composite @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite18.composite b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite18.composite new file mode 100644 index 0000000000..9ffea418db --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestComposite18.composite @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestDuplicate1.composite b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestDuplicate1.composite new file mode 100644 index 0000000000..d34ee0300a --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestDuplicate1.composite @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + duplicate1 + + + diff --git a/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestDuplicate2.composite b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestDuplicate2.composite new file mode 100644 index 0000000000..d8d4a3ab45 --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/TestDuplicate2.composite @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + duplicate2 + + + diff --git a/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0025.composite b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0025.composite new file mode 100644 index 0000000000..7e54a659f7 --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0025.composite @@ -0,0 +1,61 @@ + + + + + + + + + + + + + ASM_0025 + + + + + + + + service1 + + + + complex1 + complex2 + + + + + + + diff --git a/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0026.composite b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0026.composite new file mode 100644 index 0000000000..3c5a441899 --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0026.composite @@ -0,0 +1,57 @@ + + + + + + + + + + + + + ASM_0026 + + + + + + + + service1 + + + + complex1 + complex2 + + + + + diff --git a/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0027.composite b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0027.composite new file mode 100644 index 0000000000..c2ed53146f --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0027.composite @@ -0,0 +1,49 @@ + + + + + + + + + + + + + ASM_0027 + + + + + + + + service1 + + service2 + service3 + + + diff --git a/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0028.composite b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0028.composite new file mode 100644 index 0000000000..b79eefbce9 --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0028.composite @@ -0,0 +1,55 @@ + + + + + + + + + + + + + ASM_0028 + + + + + + + + + + + + randomValue + + + diff --git a/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0029.composite b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0029.composite new file mode 100644 index 0000000000..c1aaba1775 --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0029.composite @@ -0,0 +1,58 @@ + + + + + + + + + + + + + ASM_0029 + + + + + + + + service1 + + + + SomeData + MoreData + + + SomeData2 + MoreData2 + + + + + diff --git a/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0030.composite b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0030.composite new file mode 100644 index 0000000000..0ce29cdab2 --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0030.composite @@ -0,0 +1,51 @@ + + + + + + + + + + + + + ASM_0030 + + + + + + + + service1 + + + someOtherValue + + + + diff --git a/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0031.composite b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0031.composite new file mode 100644 index 0000000000..50cd134a6e --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_ASM_0031.composite @@ -0,0 +1,68 @@ + + + + + + + + + + + + + ASM_0031 + + + + + + + + service1 + + + + + + + + + + + + service2 + + + + + + + + service3 + + diff --git a/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_Types.xsd b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_Types.xsd new file mode 100644 index 0000000000..c0f488ab12 --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/main/resources/Test_Types.xsd @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + diff --git a/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0025_TestCase.java b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0025_TestCase.java new file mode 100644 index 0000000000..2a5e7afda6 --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0025_TestCase.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 client; + + +import test.ASM_0002_Client; +import testClient.TestInvocation; + +/** + * Client for ASM_0025_TestCase, which tests that where a + * has its value set by means of a child element, + * that the type of the element matches the type declared for + * the element + */ +public class ASM_0025_TestCase extends BaseJAXWSTestCase { + + + /** + *

+ * OSOA + * No @value subelement in OSOA specification + *

+ * OASIS + *

+ * ASM50028 + * If the value subelement of a component property is specified, + * the type of the property MUST be an XML Schema simple type or an + * XML schema complex type + */ + protected TestConfiguration getTestConfiguration() { + TestConfiguration config = new TestConfiguration(); + config.testName = "ASM_0025"; + config.input = "request"; + config.output = "ASM_0025 request service1 operation1 invokedcomplex1complex2"; + config.composite = "Test_ASM_0025.composite"; + config.testServiceName = "TestClient"; + config.testClass = ASM_0002_Client.class; + config.serviceInterface = TestInvocation.class; + return config; + } + +} // end class Test_ASM_0003 diff --git a/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0026_TestCase.java b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0026_TestCase.java new file mode 100644 index 0000000000..5cb2ed5241 --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0026_TestCase.java @@ -0,0 +1,64 @@ +/* + * 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_0026_TestCase, which tests that where a + * has its value set by means of a child element that is NOT a element, + * that a) the type of the element is declared as an XML Schema global + * element by its @element attribute and b) that the child element is an instance + * of that global element + */ +public class ASM_0026_TestCase extends BaseJAXWSTestCase { + + + /** + *

+ * OSOA Line 1113~1118 + * The property element may contain an optional default-property-value, which provides default + * value for the property. The default value must match the type declared for the property + * 1) a string, if type is a simple type (must match the type declared) + * 2) a complex type value matching the type declared by type + * 3) an element matching the element named by element + * 4) multiple values are permitted if many="true" is specified + *

+ * OASIS + *

+ * ASM50029 + * If a component property value is declared using a child element of the + * element, the type of the property MUST be an XML Schema global element and the + * declared child element MUST be an instance of that global element + */ + protected TestConfiguration getTestConfiguration() { + TestConfiguration config = new TestConfiguration(); + config.testName = "ASM_0026"; + config.input = "request"; + config.output = "ASM_0026 request service1 operation1 invokedcomplex1complex2"; + config.composite = "Test_ASM_0026.composite"; + config.testServiceName = "TestClient"; + config.testClass = ASM_0002_Client.class; + config.serviceInterface = TestInvocation.class; + return config; + } + +} // end class Test_ASM_0003 diff --git a/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0027_TestCase.java b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0027_TestCase.java new file mode 100644 index 0000000000..86d8f51288 --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0027_TestCase.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 client; + + +import test.ASM_0002_Client; +import testClient.TestInvocation; + +/** + * Client for ASM_0027_TestCase, which tests that where a has + * 2 or more child elements that each element has a + * unique @name attribute value + */ +public class ASM_0027_TestCase extends BaseJAXWSTestCase { + + + /** + *

+ * OSOA + * No corresponding declaration for this feature. + *

+ * OASIS + *

+ * ASM50030 + * A element MUST NOT contain two subelements with the + * same value of the @name attribute. + *

+ * Jira issue: + * https://issues.apache.org/jira/browse/TUSCANY-2863 + * + */ + protected TestConfiguration getTestConfiguration() { + TestConfiguration config = new TestConfiguration(); + config.testName = "ASM_0027"; + config.input = "request"; + config.output = "exception"; + config.composite = "Test_ASM_0027.composite"; + config.testServiceName = "TestClient"; + config.testClass = ASM_0002_Client.class; + config.serviceInterface = TestInvocation.class; + return config; + } + +} // end class Test_ASM_0027 diff --git a/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0028_TestCase.java b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0028_TestCase.java new file mode 100644 index 0000000000..e91ee2c7f3 --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0028_TestCase.java @@ -0,0 +1,59 @@ +/* + * 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_0028_TestCase, which tests a @name + * attribute matches the @name attribute of one of the elements of + * the of the of the + */ +public class ASM_0028_TestCase extends BaseJAXWSTestCase { + + + /** + *

+ * OSOA + * No corresponding statements for this feature. + *

+ * OASIS + *

+ * ASM50031 + * The name attribute of a component property MUST match the name of a property + * element in the component type of the component implementation. + *

+ * Jira issue: + * https://issues.apache.org/jira/browse/TUSCANY-2901 + */ + protected TestConfiguration getTestConfiguration() { + TestConfiguration config = new TestConfiguration(); + config.testName = "ASM_0028"; + config.input = "request"; + config.output = "exception"; + config.composite = "Test_ASM_0028.composite"; + config.testServiceName = "TestClient"; + config.testClass = ASM_0002_Client.class; + config.serviceInterface = TestInvocation.class; + return config; + } + +} // end class Test_ASM_0028 diff --git a/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0029_TestCase.java b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0029_TestCase.java new file mode 100644 index 0000000000..eae5a2f978 --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0029_TestCase.java @@ -0,0 +1,63 @@ +/* + * 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_0029_TestCase, which tests that where a + * has @many=false that there is only one child element of the + */ +public class ASM_0029_TestCase extends BaseJAXWSTestCase { + + + /** + *

+ * OSOA Line 1104~1106 + *

+ * many (optional) - whether the property is single-valued (false) or multi-valued (true). + * The default is false. In the case of a multi-valued property, it is presented to the + * implementation as a Collection of property values. + *

+ * OASIS + *

+ * ASM50032 + * If a property is single-valued, the subelement MUST NOT occur more than once. + *

+ * OSOA didn't explicitly say "MUST NOT occur more than once". + *

+ * Jira issue: + * https://issues.apache.org/jira/browse/TUSCANY-2902 + * + */ + protected TestConfiguration getTestConfiguration() { + TestConfiguration config = new TestConfiguration(); + config.testName = "ASM_0029"; + config.input = "request"; + config.output = "exception"; + config.composite = "Test_ASM_0029.composite"; + config.testServiceName = "TestClient"; + config.testClass = ASM_0002_Client.class; + config.serviceInterface = TestInvocation.class; + return config; + } + +} // end class Test_ASM_0029 diff --git a/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0030_TestCase.java b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0030_TestCase.java new file mode 100644 index 0000000000..197f9acd72 --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0030_TestCase.java @@ -0,0 +1,57 @@ +/* + * 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_0030_TestCase, which tests that a + * with a @value attribute set does not have any child elements + */ +public class ASM_0030_TestCase extends BaseJAXWSTestCase { + + + /** + *

+ * OSOA + * No @value attribute for the property in OSOA spec. + * So this TestCase is not valid. + *

+ * OASIS + *

+ * ASM50033 + * A property subelement MUST NOT be used when the @value attribute + * is used to specify the value for that property. + * + */ + protected TestConfiguration getTestConfiguration() { + TestConfiguration config = new TestConfiguration(); + config.testName = "ASM_0030"; + config.input = "request"; + config.output = "exception"; + config.composite = "Test_ASM_0030.composite"; + config.testServiceName = "TestClient"; + config.testClass = ASM_0002_Client.class; + config.serviceInterface = TestInvocation.class; + return config; + } + +} // end class Test_ASM_0030 diff --git a/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0031_TestCase.java b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0031_TestCase.java new file mode 100644 index 0000000000..5f5d68fb81 --- /dev/null +++ b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0031_TestCase.java @@ -0,0 +1,63 @@ +/* + * 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_0031_TestCase, which tests that where a + * has its @target attribute set to a valid service and the also + * contains a element with @source set to the + * and @target set to a second valid service and has @replace=true, the + * is wired to the second service only + */ +public class ASM_0031_TestCase extends BaseJAXWSTestCase { + + + /** + *

+ * OSOA + * No @replace in OSOA specification currently. + *

+ * OASIS + *

+ * ASM50034 + * If any element with its @replace attribute set to "true" has + * a particular reference specified in its @source attribute, + * the value of the @target attribute for that reference MUST be ignored + * and MUST NOT be used to define target services for that reference. + *

+ * Jira issue: + * https://issues.apache.org/jira/browse/TUSCANY-2903 + */ + protected TestConfiguration getTestConfiguration() { + TestConfiguration config = new TestConfiguration(); + config.testName = "ASM_0031"; + config.input = "request"; + config.output = "ASM_0031 request service1 operation1 invoked service3 operation1 invoked"; + config.composite = "Test_ASM_0031.composite"; + config.testServiceName = "TestClient"; + config.testClass = ASM_0002_Client.class; + config.serviceInterface = TestInvocation.class; + return config; + } + +} // end class Test_ASM_0031 -- cgit v1.2.3