summaryrefslogtreecommitdiffstats
path: root/java/sca/stest/sampleTest/src
diff options
context:
space:
mode:
authoredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2009-02-26 14:03:59 +0000
committeredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2009-02-26 14:03:59 +0000
commit92f75403bb036edf56630c954b05787b943478f6 (patch)
treee923dc241bafaeb4cd69afa92e0d89ba4bba86bc /java/sca/stest/sampleTest/src
parentc78da6739626a3529e01c220760d90ec8df0beff (diff)
Added Test_ASM_6005, Test_ASM_6006
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@748156 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/stest/sampleTest/src')
-rw-r--r--java/sca/stest/sampleTest/src/main/resources/TestComposite16.composite2
-rw-r--r--java/sca/stest/sampleTest/src/main/resources/TestComposite19.composite52
-rw-r--r--java/sca/stest/sampleTest/src/main/resources/TestComposite20.composite58
-rw-r--r--java/sca/stest/sampleTest/src/main/resources/Test_ASM_6005.composite48
-rw-r--r--java/sca/stest/sampleTest/src/main/resources/Test_ASM_6006.composite55
-rw-r--r--java/sca/stest/sampleTest/src/test/java/client/ASM_6005_TestCase.java45
-rw-r--r--java/sca/stest/sampleTest/src/test/java/client/ASM_6006_TestCase.java45
7 files changed, 304 insertions, 1 deletions
diff --git a/java/sca/stest/sampleTest/src/main/resources/TestComposite16.composite b/java/sca/stest/sampleTest/src/main/resources/TestComposite16.composite
index a7296c76e2..6dc3a81cc6 100644
--- a/java/sca/stest/sampleTest/src/main/resources/TestComposite16.composite
+++ b/java/sca/stest/sampleTest/src/main/resources/TestComposite16.composite
@@ -17,7 +17,7 @@
* specific language governing permissions and limitations
* under the License.
-->
-<!-- A composite which multiple <service/> subelements with the same name and no references -->
+<!-- A composite which has multiple <service/> subelements with the same @name and no references -->
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
targetNamespace="http://oasis/tests"
xmlns:sample="http://oasis/tests"
diff --git a/java/sca/stest/sampleTest/src/main/resources/TestComposite19.composite b/java/sca/stest/sampleTest/src/main/resources/TestComposite19.composite
new file mode 100644
index 0000000000..e14f9ed0cb
--- /dev/null
+++ b/java/sca/stest/sampleTest/src/main/resources/TestComposite19.composite
@@ -0,0 +1,52 @@
+<?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 single <service/> subelement and multiple <reference/>
+ subelements with the same @name value -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://oasis/tests"
+ xmlns:sample="http://oasis/tests"
+ name="TestComposite19">
+
+ <service name="Service1" promote="TestComponent1/Service1">
+ <interface.java interface="test.Service1"></interface.java>
+ </service>
+
+ <property name="serviceName" type="string"/>
+
+ <component name="TestComponent1">
+ <implementation.java class="test.service1Impl4"/>
+ <service name="Service1">
+ <interface.java interface="test.Service1"/>
+ </service>
+ <property name="serviceName" source="$serviceName"/>
+ <reference name="reference1" multiplicity="0..n">
+ <interface.java interface="test.Service1"/>
+ </reference>
+ </component>
+
+ <reference name="Reference1" promote="TestComponent1/reference1" multiplicity="0..n">
+ <interface.java interface="test.Service1"/>
+ </reference>
+
+ <reference name="Reference1" promote="TestComponent1/reference1" multiplicity="0..n">
+ <interface.java interface="test.Service1"/>
+ </reference>
+
+</composite>
diff --git a/java/sca/stest/sampleTest/src/main/resources/TestComposite20.composite b/java/sca/stest/sampleTest/src/main/resources/TestComposite20.composite
new file mode 100644
index 0000000000..46de7a90aa
--- /dev/null
+++ b/java/sca/stest/sampleTest/src/main/resources/TestComposite20.composite
@@ -0,0 +1,58 @@
+<?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 is in error
+ since its @promote attribute is not the URI of a <component/> <reference/>
+ within the <composite/> -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://oasis/tests"
+ xmlns:sample="http://oasis/tests"
+ name="TestComposite20">
+
+ <service name="Service1" promote="Composite20Component1/Service1">
+ <interface.java interface="test.Service1"/>
+ </service>
+
+ <property name="serviceName" type="string"/>
+
+ <component name="Composite20Component1">
+ <implementation.java class="test.service1Impl2"/>
+ <service name="Service1">
+ <interface.java interface="test.Service1"/>
+ </service>
+ <property name="serviceName" source="$serviceName"/>
+ <reference name="reference1"/>
+ </component>
+
+ <component name="Composite20Component2">
+ <implementation.java class="test.service1Impl2"/>
+ <service name="Service1">
+ <interface.java interface="test.Service1"/>
+ </service>
+ <property name="serviceName">Composite11-C2</property>
+ <reference name="reference1"/>
+ </component>
+
+ <!-- @promote deliberately incorrect - component names are non-existent -->
+ <reference name="Reference1"
+ promote="Composite20Componentz/reference1 Composite20Componenty/reference1">
+ <interface.java interface="test.Service1"/>
+ </reference>
+
+</composite>
diff --git a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6005.composite b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6005.composite
new file mode 100644
index 0000000000..c292a5ffda
--- /dev/null
+++ b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6005.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.
+-->
+<!-- Tests that the @name attribute of a <composite/> <reference/> element
+is unique amongst the @name attributes of all the <reference/> elements of
+that <composite/> -->
+<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_6005">
+
+ <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_6005</property>
+ </component>
+
+ <!-- Component which uses a composite which has a single <service/> subelement
+ and which has 2 <reference/> subelements with the same name - references
+ are 0..n multiplicity and so do not require wiring -->
+ <component name="TestComponent1">
+ <implementation.composite name="tns:TestComposite19"/>
+ <service name="Service1"/>
+ <property name="serviceName">service1</property>
+ </component>
+
+</composite>
diff --git a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6006.composite b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6006.composite
new file mode 100644
index 0000000000..5de5f4bbf0
--- /dev/null
+++ b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6006.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 the @promote attribute of a <composite/> <reference/> contains
+ one or more URIs that each point to a <reference/> of a <component/> in the
+ <composite/> -->
+<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_6006">
+
+ <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_6006</property>
+ </component>
+
+ <!-- Component which uses a composite which has a single <service/> subelement
+ and which has 2 <reference/> subelements with the same name - references
+ are 0..n multiplicity and so do not require wiring -->
+ <component name="TestComponent1">
+ <implementation.composite name="tns:TestComposite20"/>
+ <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>
diff --git a/java/sca/stest/sampleTest/src/test/java/client/ASM_6005_TestCase.java b/java/sca/stest/sampleTest/src/test/java/client/ASM_6005_TestCase.java
new file mode 100644
index 0000000000..adf8bd937a
--- /dev/null
+++ b/java/sca/stest/sampleTest/src/test/java/client/ASM_6005_TestCase.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 client;
+
+
+import test.ASM_0002_Client;
+import testClient.TestInvocation;
+
+/**
+ * Client for ASM_6005_TestCase, which tests that the the @name attribute
+ * of a <composite/> <reference/> element is unique amongst the @name
+ * attributes of all the <reference/> elements of that <composite/>
+ */
+public class ASM_6005_TestCase extends BaseJAXWSTestCase {
+
+
+ protected TestConfiguration getTestConfiguration() {
+ TestConfiguration config = new TestConfiguration();
+ config.testName = "ASM_6005";
+ config.input = "request";
+ config.output = "exception";
+ config.composite = "Test_ASM_6005.composite";
+ config.testServiceName = "TestClient";
+ config.testClass = ASM_0002_Client.class;
+ config.serviceInterface = TestInvocation.class;
+ return config;
+ }
+
+} // end class Test_ASM_6004
diff --git a/java/sca/stest/sampleTest/src/test/java/client/ASM_6006_TestCase.java b/java/sca/stest/sampleTest/src/test/java/client/ASM_6006_TestCase.java
new file mode 100644
index 0000000000..bd0ea10bea
--- /dev/null
+++ b/java/sca/stest/sampleTest/src/test/java/client/ASM_6006_TestCase.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 client;
+
+
+import test.ASM_0002_Client;
+import testClient.TestInvocation;
+
+/**
+ * Client for ASM_6006_TestCase, which tests that the @promote attribute of a
+ * <composite/> <reference/> contains one or more URIs that each point to a
+ * <reference/> of a <component/> in the <composite/>
+ */
+public class ASM_6006_TestCase extends BaseJAXWSTestCase {
+
+
+ protected TestConfiguration getTestConfiguration() {
+ TestConfiguration config = new TestConfiguration();
+ config.testName = "ASM_6006";
+ config.input = "request";
+ config.output = "exception";
+ config.composite = "Test_ASM_6006.composite";
+ config.testServiceName = "TestClient";
+ config.testClass = ASM_0002_Client.class;
+ config.serviceInterface = TestInvocation.class;
+ return config;
+ }
+
+} // end class Test_ASM_6004