Author: edwardsmj
Date: Thu Feb 26 15:28:20 2009
New Revision: 748180

URL: http://svn.apache.org/viewvc?rev=748180&view=rev
Log:
Created Test_ASM_6007, Test_ASM_6008

Added:
    
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite21.composite
    
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite22.composite
    tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6007.composite
    tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6008.composite
    
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_6007_TestCase.java
    
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_6008_TestCase.java
Modified:
    tuscany/java/sca/stest/sampleTest/   (props changed)

Propchange: tuscany/java/sca/stest/sampleTest/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Feb 26 15:28:20 2009
@@ -2,3 +2,4 @@
 .settings
 .classpath
 .project
+maven-eclipse.xml

Added: 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite21.composite
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite21.composite?rev=748180&view=auto
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite21.composite 
(added)
+++ 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite21.composite 
Thu Feb 26 15:28:20 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.    
+-->
+<!-- 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>

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

Added: 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6007.composite
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6007.composite?rev=748180&view=auto
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6007.composite 
(added)
+++ 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_6007.composite 
Thu Feb 26 15:28:20 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 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>

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

Added: 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_6007_TestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_6007_TestCase.java?rev=748180&view=auto
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_6007_TestCase.java 
(added)
+++ 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_6007_TestCase.java 
Thu Feb 26 15:28:20 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_6007_TestCase, which 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  
+ */
+public class ASM_6007_TestCase extends BaseJAXWSTestCase {
+
+ 
+    protected TestConfiguration getTestConfiguration() {
+       TestConfiguration config = new TestConfiguration();
+       config.testName                 = "ASM_6007";
+       config.input                    = "request";
+       config.output                   = "ASM_6007 request service1 operation1 
invoked service2 operation1 invoked";
+       config.composite                = "Test_ASM_6007.composite";
+       config.testServiceName  = "TestClient";
+       config.testClass                = ASM_0002_Client.class;
+       config.serviceInterface = TestInvocation.class;
+       return config;
+    }
+    
+} // end class Test_ASM_6007

Added: 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_6008_TestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_6008_TestCase.java?rev=748180&view=auto
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_6008_TestCase.java 
(added)
+++ 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_6008_TestCase.java 
Thu Feb 26 15:28:20 2009
@@ -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_6008_TestCase, which 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  
+ */
+public class ASM_6008_TestCase extends BaseJAXWSTestCase {
+
+ 
+    protected TestConfiguration getTestConfiguration() {
+       TestConfiguration config = new TestConfiguration();
+       config.testName                 = "ASM_6008";
+       config.input                    = "request";
+       config.output                   = "exception";
+       config.composite                = "Test_ASM_6008.composite";
+       config.testServiceName  = "TestClient";
+       config.testClass                = ASM_0002_Client.class;
+       config.serviceInterface = TestInvocation.class;
+       return config;
+    }
+    
+} // end class Test_ASM_6008


Reply via email to