Author: slaws
Date: Wed Nov 19 05:06:58 2008
New Revision: 718951

URL: http://svn.apache.org/viewvc?rev=718951&view=rev
Log:
TUSCANY-2675 Patch from Jun Guo to start adding assembly spec vtests. Thanks 
Jun Guo

Added:
    
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/DService.java
   (with props)
    
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EEService.java
   (with props)
    
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EService.java
   (with props)
    
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.componentType
   (with props)
    
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.java
   (with props)
    
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.componentType
   (with props)
    
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.java
   (with props)
    
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.componentType
   (with props)
    
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.java
   (with props)
    
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomponenttype.composite
   (with props)
    
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomposite.composite
   (with props)
    
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/notcompatibleinterface.composite
   (with props)
    
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/notmatchofservicename.composite
   (with props)
Modified:
    
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/test/java/org/apache/tuscany/sca/vtest/assembly/component/ComponentTestCase.java

Added: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/DService.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/DService.java?rev=718951&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/DService.java
 (added)
+++ 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/DService.java
 Wed Nov 19 05:06:58 2008
@@ -0,0 +1,29 @@
+/*
+ * 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 org.apache.tuscany.sca.vtest.assembly.component;
+
+/**
+ * simple service
+ */
+public interface DService {
+
+    public String sayHello();
+    
+    
+}

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/DService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/DService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EEService.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EEService.java?rev=718951&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EEService.java
 (added)
+++ 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EEService.java
 Wed Nov 19 05:06:58 2008
@@ -0,0 +1,31 @@
+/*
+ * 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 org.apache.tuscany.sca.vtest.assembly.component;
+
+/**
+ * simple service
+ *
+ */
+public interface EEService {
+       
+       public String method1()  ;
+       
+       public String method3()  ;
+
+}

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EEService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EEService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EService.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EService.java?rev=718951&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EService.java
 (added)
+++ 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EService.java
 Wed Nov 19 05:06:58 2008
@@ -0,0 +1,31 @@
+/*
+ * 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 org.apache.tuscany.sca.vtest.assembly.component;
+
+/**
+ * simple service
+ *
+ */
+public interface EService {
+       
+       public String method1()  ;
+       
+       public String method2()  ;
+
+}

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/EService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.componentType
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.componentType?rev=718951&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.componentType
 (added)
+++ 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.componentType
 Wed Nov 19 05:06:58 2008
@@ -0,0 +1,32 @@
+<?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.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0";>
+
+  
+  <service name="AService">
+     <interface.java 
interface="org.apache.tuscany.sca.vtest.assembly.component.AService"/> 
+  </service>
+
+  <service name="AService">
+     <interface.java 
interface="org.apache.tuscany.sca.vtest.assembly.component.BService"/> 
+  </service>
+ 
+
+</componentType>              
\ No newline at end of file

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.componentType
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.componentType
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.componentType
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.java?rev=718951&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.java
 (added)
+++ 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.java
 Wed Nov 19 05:06:58 2008
@@ -0,0 +1,51 @@
+/*
+ * 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 org.apache.tuscany.sca.vtest.assembly.component.impl;
+
+import org.apache.tuscany.sca.vtest.assembly.component.AService;
+import org.apache.tuscany.sca.vtest.assembly.component.BService;
+import org.osoa.sca.annotations.Property;
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * service implementation of AService and BService
+ *
+ */
[EMAIL PROTECTED](interfaces={AService.class, BService.class})
+public class ABServiceImpl implements AService, BService{
+
+    public String getState() {
+        return "OK";
+    }
+    
+    public String getBProperty() {
+        return "";
+    }
+
+    public String getB2Property() {
+        return "";
+    }
+    
+    
+    public String getSomeProperty() {
+        return "SomeProperty";
+    }
+       
+}

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/ABServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.componentType
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.componentType?rev=718951&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.componentType
 (added)
+++ 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.componentType
 Wed Nov 19 05:06:58 2008
@@ -0,0 +1,31 @@
+<?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.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0";>
+
+  <implementation.java 
class="org.apache.tuscany.sca.vtest.assembly.component.impl.DServiceImpl"/>
+  
+  <service name="DService">
+     <interface.java 
interface="org.apache.tuscany.sca.vtest.assembly.component.DService"/> 
+  </service> 
+  
+
+ 
+
+</componentType>              
\ No newline at end of file

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.componentType
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.componentType
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.componentType
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.java?rev=718951&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.java
 (added)
+++ 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.java
 Wed Nov 19 05:06:58 2008
@@ -0,0 +1,29 @@
+/*
+ * 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 org.apache.tuscany.sca.vtest.assembly.component.impl;
+
+public class DServiceImpl {
+
+    public String sayHello() {
+        return "hello";
+    }
+    
+}
+

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/DServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.componentType
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.componentType?rev=718951&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.componentType
 (added)
+++ 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.componentType
 Wed Nov 19 05:06:58 2008
@@ -0,0 +1,31 @@
+<?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.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0";>
+
+  <implementation.java 
class="org.apache.tuscany.sca.vtest.assembly.component.impl.EServiceImpl"/>
+  
+  <service name="EEService">
+     <interface.java 
interface="org.apache.tuscany.sca.vtest.assembly.component.EService"/> 
+  </service>
+  
+
+ 
+
+</componentType>              
\ No newline at end of file

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.componentType
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.componentType
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.componentType
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.java?rev=718951&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.java
 (added)
+++ 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.java
 Wed Nov 19 05:06:58 2008
@@ -0,0 +1,38 @@
+/*
+ * 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 org.apache.tuscany.sca.vtest.assembly.component.impl;
+
+import org.apache.tuscany.sca.vtest.assembly.component.EService;
+import org.osoa.sca.annotations.Service;
+
+
[EMAIL PROTECTED](EService.class)
+public class EServiceImpl {
+
+       public String method1()  {
+               
+               return "method1" ;
+       }
+       
+       public String method2()  {
+               
+               return "method2" ;
+       }
+       
+}

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/java/org/apache/tuscany/sca/vtest/assembly/component/impl/EServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomponenttype.composite
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomponenttype.composite?rev=718951&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomponenttype.composite
 (added)
+++ 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomponenttype.composite
 Wed Nov 19 05:06:58 2008
@@ -0,0 +1,29 @@
+<?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";
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema";
+       targetNamespace="http://assembly-tests";
+       name="Assemby-component--Composite">
+
+    <component name="ABComponent">
+           <implementation.java 
class="org.apache.tuscany.sca.vtest.assembly.component.impl.ABServiceImpl"/>
+    </component>
+
+</composite>

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomponenttype.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomponenttype.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomponenttype.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomposite.composite
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomposite.composite?rev=718951&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomposite.composite
 (added)
+++ 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomposite.composite
 Wed Nov 19 05:06:58 2008
@@ -0,0 +1,47 @@
+<?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";
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema";
+       targetNamespace="http://assembly-tests";
+       name="Assemby-component-servicewithinterface-Composite">
+
+       
+    <component name="CDComponent">
+    
+       <implementation.java 
class="org.apache.tuscany.sca.vtest.assembly.component.impl.CServiceImpl"/>
+       
+        <service name="CServiceImpl">
+           <interface.java 
interface="org.apache.tuscany.sca.vtest.assembly.component.CService"/>          
 
+        </service>  
+        
+        
+        <service name="CServiceImpl">
+           <interface.java 
interface="org.apache.tuscany.sca.vtest.assembly.component.DService"/>
+           
+        </service>
+        
+        
+       
+        
+        
+    </component>
+    
+</composite>
\ No newline at end of file

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomposite.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomposite.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/nonuniqueservicenameincomposite.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/notcompatibleinterface.composite
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/notcompatibleinterface.composite?rev=718951&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/notcompatibleinterface.composite
 (added)
+++ 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/notcompatibleinterface.composite
 Wed Nov 19 05:06:58 2008
@@ -0,0 +1,38 @@
+<?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";
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema";
+       targetNamespace="http://assembly-tests";
+       name="Assemby-component-servicewithinterface-Composite">
+
+    <component name="EEComponent">
+        <implementation.java 
class="org.apache.tuscany.sca.vtest.assembly.component.impl.EServiceImpl"/>
+        
+        
+        <service name="EEService">
+           <interface.java 
interface="org.apache.tuscany.sca.vtest.assembly.component.EEService"/>
+           
+        </service>
+        
+        
+        
+    </component>
+    
+</composite>

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/notcompatibleinterface.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/notcompatibleinterface.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/notcompatibleinterface.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/notmatchofservicename.composite
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/notmatchofservicename.composite?rev=718951&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/notmatchofservicename.composite
 (added)
+++ 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/notmatchofservicename.composite
 Wed Nov 19 05:06:58 2008
@@ -0,0 +1,36 @@
+<?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";
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema";
+       targetNamespace="http://assembly-tests";
+       name="Assemby-component-servicewithinterface-Composite">
+
+    <component name="DComponent1">
+        <implementation.java 
class="org.apache.tuscany.sca.vtest.assembly.component.impl.DServiceImpl"/>
+                
+        <service name="DService1">
+           <interface.java 
interface="org.apache.tuscany.sca.vtest.assembly.component.DService"/>
+           
+        </service>      
+        
+        
+    </component>
+    
+</composite>

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/notmatchofservicename.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/notmatchofservicename.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/main/resources/notmatchofservicename.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/test/java/org/apache/tuscany/sca/vtest/assembly/component/ComponentTestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/component/src/test/java/org/apache/tuscany/sca/vtest/assembly/component/ComponentTestCase.java?rev=718951&r1=718950&r2=718951&view=diff
==============================================================================
--- 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/test/java/org/apache/tuscany/sca/vtest/assembly/component/ComponentTestCase.java
 (original)
+++ 
tuscany/branches/sca-java-1.x/vtest/assembly/component/src/test/java/org/apache/tuscany/sca/vtest/assembly/component/ComponentTestCase.java
 Wed Nov 19 05:06:58 2008
@@ -33,6 +33,7 @@
 
     private void initDomain(String compositePath) {
         System.out.println("Setting up");
+        
         ServiceFinder.init(compositePath);
     }
 
@@ -40,6 +41,8 @@
         System.out.println("Cleaning up");
         ServiceFinder.cleanup();
     }
+    
+    
 
     /**
      * Lines 92-96:
@@ -72,7 +75,7 @@
     /**
      * Lines 142-143:
      * <p>
-     * name (required) – the name of the component. The name must be unique
+     * name (required) ?the name of the component. The name must be unique
      * across all the components in the composite.
      */
     @Test(expected = ServiceRuntimeException.class)
@@ -146,5 +149,82 @@
         cleanupDomain();
     }
     
+    /**
+     * Lines 599-601:
+     * <p>
+     * ASM50001
+     * <p>
+     * The @name attribute of a <service/> child element of a <componentType/> 
MUST 
+     * be unique amongst the service elements of that <componentType/>
+     * 
+     */
+    @Test(expected=ServiceRuntimeException.class)
+    @Ignore("TUSCANY-2675")
+    public void ASM50001() throws Exception {          
+       initDomain("nonuniqueservicenameincomponenttype.composite");
+       AService service = ServiceFinder.getService(AService.class, 
"ABComponent/AService");
+       Assert.assertEquals("OK", service.getState());          
+       cleanupDomain();
+    }
+    
+    /**
+     * Lines 695-697:
+     * <p>
+     * ASM50002
+     * <p>
+     * The @name attribute of a service element of a <component/> MUST be 
unique amongst 
+     * the service elements of that <component/>
+     * 
+     */
+    @Test(expected=ServiceRuntimeException.class)
+    public void ASM50002() throws Exception {
+       initDomain("nonuniqueservicenameincomposite.composite");
+       DService service = ServiceFinder.getService(DService.class, 
"CDComponent/CServiceImpl");
+        Assert.assertEquals("hello", service.sayHello());
+       cleanupDomain();
+    }
+    
+    /**
+     * Lines 697-699:
+     * <p>
+     * ASM50003
+     * <p>
+     * OSOA
+     * The @name attribute of a service element of a <component/> MUST match 
the 
+     * @name attribute of a service element of the componentType of the 
<implementation/> child element of the component.
+     * <p>
+     * OASIS
+     * the name of the service has to match a name of a service defined by the 
implementation
+     * 
+     */
+    @Test(expected=ServiceRuntimeException.class)
+    public void ASM50003() throws Exception {
+       initDomain("notmatchofservicename.composite");
+       DService service = ServiceFinder.getService(DService.class, 
"DComponent1/DService1");
+        Assert.assertEquals("hello", service.sayHello());      
+       cleanupDomain();
+    }
+    
+    /**
+     * Lines 709-715:
+     * <p>
+     * ASM50004
+     * <p>      
+     * If a <service/> element has an interface subelement specified, the 
interface MUST 
+     * provide a compatible subset of the interface declared on the 
componentType of the 
+     * implementation. 
+     */
+    @Test(expected=ServiceRuntimeException.class)
+    public void ASM50004() throws Exception {
+       //for this case, if you remove the method3() in the EEService
+       //the EEService will be a compatible subset of EService.
+       initDomain("notcompatibleinterface.composite");         
+       EEService service = ServiceFinder.getService(EEService.class, 
"EEComponent/EEService");
+        Assert.assertEquals("method1", service.method1());
+       cleanupDomain();
+    }
+    
+    
+    
     
 }


Reply via email to