Author: edwardsmj
Date: Mon Jan  5 06:20:02 2009
New Revision: 731582

URL: http://svn.apache.org/viewvc?rev=731582&view=rev
Log:
Tweaked ASM_0002_TestCase.
Added ASM_0005_TestCase

Added:
    tuscany/java/sca/stest/sampleTest/src/main/java/test/TestInvocation.class   
(with props)
    
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite2.composite
    tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0005.composite
    
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_0005_TestCase.java
Modified:
    tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0002.composite
    
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_0002_TestCase.java

Added: tuscany/java/sca/stest/sampleTest/src/main/java/test/TestInvocation.class
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/main/java/test/TestInvocation.class?rev=731582&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
tuscany/java/sca/stest/sampleTest/src/main/java/test/TestInvocation.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite2.composite
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite2.composite?rev=731582&view=auto
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite2.composite 
(added)
+++ 
tuscany/java/sca/stest/sampleTest/src/main/resources/TestComposite2.composite 
Mon Jan  5 06:20:02 2009
@@ -0,0 +1,43 @@
+<?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.    
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
+           targetNamespace="http://oasis/tests";
+           xmlns:sample="http://oasis/tests";
+           name="TestComposite2">
+           
+       <service name="Service1" promote="TestComponent1/Service1">
+               <interface.java interface="test.Service1"></interface.java>
+       </service>
+       
+       <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.service1Impl"/>
+        <service name="Service1">
+               <interface.java interface="test.Service1"></interface.java>
+        </service>
+        <property name="serviceName" source="$serviceName"/>
+    </component>
+
+</composite>

Modified: 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0002.composite
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0002.composite?rev=731582&r1=731581&r2=731582&view=diff
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0002.composite 
(original)
+++ 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0002.composite 
Mon Jan  5 06:20:02 2009
@@ -17,6 +17,10 @@
  * specific language governing permissions and limitations
  * under the License.    
 -->
+<!--
+ ASM_0002_TestCase tests that component with a single reference can be wired 
to a single
+ component service in the same composite.
+-->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
            targetNamespace="http://oasis/tests";
            xmlns:tns="http://oasis/tests";

Added: 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0005.composite
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0005.composite?rev=731582&view=auto
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0005.composite 
(added)
+++ 
tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0005.composite 
Mon Jan  5 06:20:02 2009
@@ -0,0 +1,49 @@
+<?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.    
+-->
+<!-- Test that a component with multiple <service/> elements must have unique 
@name attributes for each 
+     service - negative test that has a component with 2 services with the 
same name   -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
+           targetNamespace="http://oasis/tests";
+           xmlns:tns="http://oasis/tests";
+           xmlns:sample="http://oasis/tests";
+           name="TEST_ASM_0005">
+           
+    <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_0005</property>
+    </component>
+
+    <component name="TestComponent1">
+               <implementation.composite name="tns:TestComposite2"/>
+        <service name="Service1">
+               <interface.java interface="test.Service1"></interface.java>
+        </service>
+        <service name="Service1">
+               <interface.java interface="test.Service1"></interface.java>
+        </service>
+        <property name="serviceName">service1</property>
+    </component>
+    
+</composite>

Modified: 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_0002_TestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_0002_TestCase.java?rev=731582&r1=731581&r2=731582&view=diff
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_0002_TestCase.java 
(original)
+++ 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_0002_TestCase.java 
Mon Jan  5 06:20:02 2009
@@ -23,7 +23,7 @@
 import testClient.TestInvocation;
 
 /**
- * A generic test client based on Tuscany APIs
+ * ASM_0002_TestCase
  */
 public class ASM_0002_TestCase extends BaseJAXWSTestCase {
 

Added: 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_0005_TestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_0005_TestCase.java?rev=731582&view=auto
==============================================================================
--- 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_0005_TestCase.java 
(added)
+++ 
tuscany/java/sca/stest/sampleTest/src/test/java/client/ASM_0005_TestCase.java 
Mon Jan  5 06:20:02 2009
@@ -0,0 +1,44 @@
+/*
+ * 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_0005_TestCase, which checks that a component with multiple 
<service/>
+ * elements with the same @name attribute is an error
+ */
+public class ASM_0005_TestCase extends BaseJAXWSTestCase {
+
+ 
+    protected TestConfiguration getTestConfiguration() {
+       TestConfiguration config = new TestConfiguration();
+       config.testName                 = "ASM_0005";
+       config.input                    = "request";
+       config.output                   = "exception";
+       config.composite                = "Test_ASM_0005.composite";
+       config.testServiceName  = "TestClient";
+       config.testClass                = ASM_0002_Client.class;
+       config.serviceInterface = TestInvocation.class;
+       return config;
+    }
+    
+} // end class Test_ASM_0003


Reply via email to