Author: edwardsmj
Date: Thu Feb 26 14:03:59 2009
New Revision: 748156

URL: http://svn.apache.org/viewvc?rev=748156&view=rev
Log:
Added Test_ASM_6005, Test_ASM_6006

Added:
    
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite19.composite
    
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite20.composite
    tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6005.composite
    tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6006.composite
    
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_6005_TestCase.java
    
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_6006_TestCase.java
Modified:
    
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite16.composite

Modified: 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite16.composite
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite16.composite?rev=748156&r1=748155&r2=748156&view=diff
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite16.composite 
(original)
+++ 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite16.composite 
Thu Feb 26 14:03:59 2009
@@ -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";

Added: 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite19.composite
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite19.composite?rev=748156&view=auto
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite19.composite 
(added)
+++ 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite19.composite 
Thu Feb 26 14:03:59 2009
@@ -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>

Added: 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite20.composite
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite20.composite?rev=748156&view=auto
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite20.composite 
(added)
+++ 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite20.composite 
Thu Feb 26 14:03:59 2009
@@ -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>

Added: 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6005.composite
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6005.composite?rev=748156&view=auto
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6005.composite 
(added)
+++ 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6005.composite 
Thu Feb 26 14:03:59 2009
@@ -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>

Added: 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6006.composite
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6006.composite?rev=748156&view=auto
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6006.composite 
(added)
+++ 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6006.composite 
Thu Feb 26 14:03:59 2009
@@ -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>

Added: 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_6005_TestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_6005_TestCase.java?rev=748156&view=auto
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_6005_TestCase.java 
(added)
+++ 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_6005_TestCase.java 
Thu Feb 26 14:03:59 2009
@@ -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

Added: 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_6006_TestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_6006_TestCase.java?rev=748156&view=auto
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_6006_TestCase.java 
(added)
+++ 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_6006_TestCase.java 
Thu Feb 26 14:03:59 2009
@@ -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


Reply via email to