diff options
author | edwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68> | 2009-02-26 15:28:20 +0000 |
---|---|---|
committer | edwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68> | 2009-02-26 15:28:20 +0000 |
commit | 2d2b2e620205ad208887eb0499a9e47b4f2d29ce (patch) | |
tree | 8174773aa16273ff569471097b573f4bad8739fe /java/sca/stest/sampleTest/src/main/resources | |
parent | 92f75403bb036edf56630c954b05787b943478f6 (diff) |
Created Test_ASM_6007, Test_ASM_6008
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@748180 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/stest/sampleTest/src/main/resources')
4 files changed, 218 insertions, 0 deletions
diff --git a/java/sca/stest/sampleTest/src/main/resources/TestComposite21.composite b/java/sca/stest/sampleTest/src/main/resources/TestComposite21.composite new file mode 100644 index 0000000000..f0d6162e25 --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/resources/TestComposite21.composite @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * 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. +--> +<!-- A composite which has a <composite/> <reference/> that declares an interface + which is a superset of the interface declared by the <component/> <reference/> + promoted by the composite reference --> +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" + targetNamespace="http://oasis/tests" + xmlns:sample="http://oasis/tests" + name="TestComposite21">
+ + <service name="Service1" promote="Composite21Component1/Service1"> + <interface.java interface="test.Service1"/> + </service> + + <property name="serviceName" type="string"/>
+ + <component name="Composite21Component1"> + <implementation.java class="test.service1Impl2"/> + <service name="Service1">
+ <interface.java interface="test.Service1"/>
+ </service> + <property name="serviceName" source="$serviceName"/> + <reference name="reference1"/> + </component> + + <!-- reference declares a superset interface --> + <reference name="Reference1" promote="Composite21Component1/reference1"> + <interface.java interface="test.Service1Superset"/> + </reference> + +</composite> diff --git a/java/sca/stest/sampleTest/src/main/resources/TestComposite22.composite b/java/sca/stest/sampleTest/src/main/resources/TestComposite22.composite new file mode 100644 index 0000000000..79c07fb678 --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/resources/TestComposite22.composite @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * 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. +--> +<!-- A composite which has a <composite/> <reference/> that has no interface + declared that promotes 2 <component/> <reference/>s that have different + interfaces declared on them --> +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" + targetNamespace="http://oasis/tests" + xmlns:sample="http://oasis/tests" + name="TestComposite22">
+ + <service name="Service1" promote="Composite22Component1/Service1"> + <interface.java interface="test.Service1"/> + </service> + + <property name="serviceName" type="string"/>
+ + <component name="Composite22Component1"> + <implementation.java class="test.service1Impl2"/> + <service name="Service1">
+ <interface.java interface="test.Service1"/>
+ </service> + <property name="serviceName" source="$serviceName"/> + <reference name="reference1"> + <interface.java interface="test.Service1"/> + </reference> + </component> + + <component name="Composite22Component2"> + <implementation.java class="test.service1Impl2"/> + <service name="Service1"> + <interface.java interface="test.Service1"/> + </service> + <property name="serviceName">Composite11-C2</property> + <reference name="reference1"> + <interface.java interface="test.Service1Superset"/> + </reference> + </component> + + <!-- @promote deliberately incorrect - component names are non-existent --> + <reference name="Reference1" + promote="Composite22Component1/reference1 Composite22Component2/reference1"> + </reference> + +</composite> diff --git a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6007.composite b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6007.composite new file mode 100644 index 0000000000..a67b19a52d --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6007.composite @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<!-- Tests that a <composite/> <reference/> can declare an <interface/>
+ that is a compatible superset of the <interface/> declared by each
+ <component/> <reference/> promoted by the composite reference -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://oasis/tests"
+ xmlns:tns="http://oasis/tests"
+ xmlns:test="http://oasis/tests"
+ name="TEST_ASM_6007">
+
+ <component name="TestClient">
+ <implementation.composite name="tns:TestClient_0002"/>
+ <service name="TestInvocation">
+ <interface.java interface="test.TestInvocation"/>
+ <binding.ws/>
+ </service>
+ <reference name="reference1" target="TestComponent1/Service1" />
+ <property name="testName">ASM_6007</property>
+ </component>
+
+ <!-- Component which uses a composite which has a <reference/> element which
+ declares a superset interface -->
+ <component name="TestComponent1">
+ <implementation.composite name="tns:TestComposite21"/>
+ <service name="Service1"/>
+ <property name="serviceName">service1</property>
+ <reference name="Reference1" target="TestComponent2/Service1"/>
+ </component>
+
+ <!-- Implementation of the superset service -->
+ <component name="TestComponent2">
+ <implementation.composite name="tns:TestComposite9"/>
+ <service name="Service1"/>
+ <property name="serviceName">service2</property>
+ </component>
+
+</composite>
diff --git a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6008.composite b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6008.composite new file mode 100644 index 0000000000..afc490cb67 --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6008.composite @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<!-- Tests that where a <composite/> <reference/> has no <interface/> subelement,
+ and that <reference/> promotes 2 or more <component/> <reference/>s, that the
+ <interface/> declared on each of the <component/> <reference/>s are the same -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://oasis/tests"
+ xmlns:tns="http://oasis/tests"
+ xmlns:test="http://oasis/tests"
+ name="TEST_ASM_6008">
+
+ <component name="TestClient">
+ <implementation.composite name="tns:TestClient_0002"/>
+ <service name="TestInvocation">
+ <interface.java interface="test.TestInvocation"/>
+ <binding.ws/>
+ </service>
+ <reference name="reference1" target="TestComponent1/Service1" />
+ <property name="testName">ASM_6008</property>
+ </component>
+
+ <!-- Component which uses a composite which has a <reference/> element which
+ promotes multiple component references which use different interfaces -->
+ <component name="TestComponent1">
+ <implementation.composite name="tns:TestComposite22"/>
+ <service name="Service1"/>
+ <property name="serviceName">service1</property>
+ <reference name="Reference1" target="TestComponent2/Service1"/>
+ </component>
+
+ <component name="TestComponent2">
+ <implementation.composite name="tns:TestComposite1"/>
+ <service name="Service1"/>
+ <property name="serviceName">service2</property>
+ </component>
+
+</composite>
|