Author: slaws
Date: Wed Dec 3 02:17:21 2008
New Revision: 722833
URL: http://svn.apache.org/viewvc?rev=722833&view=rev
Log:
TUSCANY-2686 - Thanks for the patch Yiwen. Constraining type vtests. I don;t
believe we exploit constraining type information just yet but the tests are
inplace in the case that we decide to implement this feature.The negative test
needs a little work still.
Added:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/CService.java
(with props)
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/DService.java
(with props)
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.java
(with props)
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.java
(with props)
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/constrainingtype.composite
(with props)
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/noconstrainingtype.composite
(with props)
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.componentType
(with props)
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.constrainingType
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.componentType
(with props)
Modified:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/typefile.composite
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/test/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/CompomnentTypeFileTestCase.java
Added:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/CService.java
URL:
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/CService.java?rev=722833&view=auto
==============================================================================
---
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/CService.java
(added)
+++
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/CService.java
Wed Dec 3 02:17:21 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.ctypefile;
+
+/**
+ * Simple Remotable Service
+ */
+public interface CService {
+
+ public String getState();
+ public String getSomeProperty();
+
+}
Propchange:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/CService.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/CService.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/DService.java
URL:
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/DService.java?rev=722833&view=auto
==============================================================================
---
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/DService.java
(added)
+++
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/DService.java
Wed Dec 3 02:17:21 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.ctypefile;
+
+/**
+ * Simple Remotable Service
+ */
+public interface DService {
+
+ public String getState();
+ public String getSomeProperty();
+
+}
Propchange:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/DService.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/DService.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.java
URL:
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.java?rev=722833&view=auto
==============================================================================
---
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.java
(added)
+++
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.java
Wed Dec 3 02:17:21 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.ctypefile.impl;
+
+import org.apache.tuscany.sca.vtest.assembly.ctypefile.CService;
+
+public class CServiceImpl implements CService {
+
+ //@Property
+ protected String someProperty = "test";
+
+ public String getState() {
+ return "SomeStateFromB";
+ }
+
+ public String getSomeProperty() {
+ return someProperty;
+ }
+
+}
+
Propchange:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.java
URL:
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.java?rev=722833&view=auto
==============================================================================
---
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.java
(added)
+++
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.java
Wed Dec 3 02:17:21 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.ctypefile.impl;
+
+import org.apache.tuscany.sca.vtest.assembly.ctypefile.DService;
+
+public class DServiceImpl implements DService {
+
+ //@Property
+ protected String someProperty = "test";
+
+ public String getState() {
+ return "SomeStateFromB";
+ }
+
+ public String getSomeProperty() {
+ return someProperty;
+ }
+
+}
+
Propchange:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/constrainingtype.composite
URL:
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/constrainingtype.composite?rev=722833&view=auto
==============================================================================
---
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/constrainingtype.composite
(added)
+++
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/constrainingtype.composite
Wed Dec 3 02:17:21 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-typefile-Composite">
+
+ <component name="CComponent">
+ <implementation.java
class="org.apache.tuscany.sca.vtest.assembly.ctypefile.impl.CServiceImpl"/>
+ </component>
+
+</composite>
Propchange:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/constrainingtype.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/constrainingtype.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/constrainingtype.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/noconstrainingtype.composite
URL:
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/noconstrainingtype.composite?rev=722833&view=auto
==============================================================================
---
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/noconstrainingtype.composite
(added)
+++
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/noconstrainingtype.composite
Wed Dec 3 02:17:21 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-typefile-Composite">
+
+ <component name="DComponent">
+ <implementation.java
class="org.apache.tuscany.sca.vtest.assembly.ctypefile.impl.DServiceImpl"/>
+ </component>
+
+</composite>
Propchange:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/noconstrainingtype.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/noconstrainingtype.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/noconstrainingtype.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.componentType
URL:
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.componentType?rev=722833&view=auto
==============================================================================
---
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.componentType
(added)
+++
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.componentType
Wed Dec 3 02:17:21 2008
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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"
+ targetNamespace="http://assembly-tests"
+ constrainingType="xmlns:CT">
+
+ <service name="CService">
+ <interface.java
interface="org.apache.tuscany.sca.vtest.assembly.ctypefile.CService"/>
+ </service>
+
+</componentType>
\ No newline at end of file
Propchange:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.componentType
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.componentType
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.componentType
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.constrainingType
URL:
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.constrainingType?rev=722833&view=auto
==============================================================================
---
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.constrainingType
(added)
+++
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/CServiceImpl.constrainingType
Wed Dec 3 02:17:21 2008
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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.
+-->
+<constrainingType
+ xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://assembly-tests"
+ name="CT">
+ <service name="CService">
+ <interface.java
interface="org.apache.tuscany.sca.vtest.assembly.ctypefile.CService"/>
+ </service>
+</constrainingType>
Added:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.componentType
URL:
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.componentType?rev=722833&view=auto
==============================================================================
---
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.componentType
(added)
+++
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.componentType
Wed Dec 3 02:17:21 2008
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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"
+ targetNamespace="http://assembly-tests"
+ constrainingType="xmlns:DT">
+
+ <service name="DService">
+ <interface.java
interface="org.apache.tuscany.sca.vtest.assembly.ctypefile.DService"/>
+ </service>
+
+</componentType>
\ No newline at end of file
Propchange:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.componentType
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.componentType
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/org/apache/tuscany/sca/vtest/assembly/ctypefile/impl/DServiceImpl.componentType
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/typefile.composite
URL:
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/typefile.composite?rev=722833&r1=722832&r2=722833&view=diff
==============================================================================
---
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/typefile.composite
(original)
+++
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/main/resources/typefile.composite
Wed Dec 3 02:17:21 2008
@@ -33,8 +33,8 @@
<property name="someProperty">compositeValue</property>
</component>
- <!-- component name="BComponent2">
+ <component name="BComponent2">
<implementation.java
class="org.apache.tuscany.sca.vtest.assembly.ctypefile.impl.BServiceImpl"/>
- </component-->
+ </component>
</composite>
Modified:
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/test/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/CompomnentTypeFileTestCase.java
URL:
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/test/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/CompomnentTypeFileTestCase.java?rev=722833&r1=722832&r2=722833&view=diff
==============================================================================
---
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/test/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/CompomnentTypeFileTestCase.java
(original)
+++
tuscany/branches/sca-java-1.x/vtest/assembly/ctypefile/src/test/java/org/apache/tuscany/sca/vtest/assembly/ctypefile/CompomnentTypeFileTestCase.java
Wed Dec 3 02:17:21 2008
@@ -31,23 +31,25 @@
*/
public class CompomnentTypeFileTestCase {
- protected static String compositeName = "typefile.composite";
+ //protected static String compositeName = "typefile.composite";
protected static AService aService = null;
protected static BService bService2 = null;
+ protected static CService cService = null;
+ protected static DService dService = null;
- @BeforeClass
- public static void init() throws Exception {
+ //@BeforeClass
+ public static void init(String compositeName) throws Exception {
try {
System.out.println("Setting up");
ServiceFinder.init(compositeName);
- aService = ServiceFinder.getService(AService.class,
"AComponent/AService");
- bService2 = ServiceFinder.getService(BService.class,
"BComponent2/BService");
+ //aService = ServiceFinder.getService(AService.class,
"AComponent/AService");
+ //bService2 = ServiceFinder.getService(BService.class,
"BComponent2/BService");
} catch (Exception ex) {
ex.printStackTrace();
}
}
- @AfterClass
+ //@AfterClass
public static void destroy() throws Exception {
System.out.println("Cleaning up");
@@ -74,7 +76,11 @@
*/
@Test
public void typeFile1() throws Exception {
+ init("typefile.composite");
+ aService = ServiceFinder.getService(AService.class,
"AComponent/AService");
+ bService2 = ServiceFinder.getService(BService.class,
"BComponent2/BService");
Assert.assertSame("SomeStateFromB", aService.getState());
+ destroy();
}
/**
@@ -89,8 +95,12 @@
*/
@Test
public void typeFile2() throws Exception {
+ init("typefile.composite");
+ aService = ServiceFinder.getService(AService.class,
"AComponent/AService");
+ bService2 = ServiceFinder.getService(BService.class,
"BComponent2/BService");
Assert.assertSame("SomeStateFromB", aService.getState());
Assert.assertSame("SomeStateFromB", aService.getState2());
+ destroy();
}
/**
@@ -101,11 +111,73 @@
*/
@Test
public void typeFile3() throws Exception {
+ init("typefile.composite");
+ aService = ServiceFinder.getService(AService.class,
"AComponent/AService");
+ bService2 = ServiceFinder.getService(BService.class,
"BComponent2/BService");
Assert.assertEquals("compositeValue", aService.getBProperty());
+ destroy();
}
public void typeFile31() throws Exception {
+ init("typefile.composite");
+ aService = ServiceFinder.getService(AService.class,
"AComponent/AService");
+ bService2 = ServiceFinder.getService(BService.class,
"BComponent2/BService");
Assert.assertEquals("componentTypeValue", bService2.getSomeProperty());
+ destroy();
}
+
+ /**
+ * Lines 2204-2205:
+ * <p>
+ * A constrainingType can be applied to an implementation. In this case,
+ * the implementation's componentType has a constrainingType attribute set
to
+ * the QName of the constrainingType.
+ * <p>
+ * ASM40002
+ * <p>
+ * If present, the @constrainingType attribute of a <componentType/>
element
+ * MUST reference a <constrainingType/> element in the Domain through its
QName.
+ * <p>
+ * Description of how the OSOA function differs from the OASIS function:
+ * <p>
+ * The OASIS spec explicitly requires the <constrainingType/> element,
+ * whereas the OSOA spec implies the <constrainingType/> element is needed.
+ * <p>
+ */
+ @Test
+ public void ASM40002_positive() throws Exception {
+ System.out.println("Running ASM40002 positive test");
+ init("constrainingtype.composite");
+ cService = ServiceFinder.getService(CService.class,
"CComponent/CService");
+ cService.getSomeProperty();
+ destroy();
+ }
+
+ /**
+ * Lines 2204-2205:
+ * <p>
+ * A constrainingType can be applied to an implementation. In this case,
+ * the implementation's componentType has a constrainingType attribute set
to
+ * the QName of the constrainingType.
+ * <p>
+ * ASM40002
+ * <p>
+ * If present, the @constrainingType attribute of a <componentType/>
element
+ * MUST reference a <constrainingType/> element in the Domain through its
QName.
+ * <p>
+ * Description of how the OSOA function differs from the OASIS function:
+ * <p>
+ * The OASIS spec explicitly requires the <constrainingType/> element,
+ * whereas the OSOA spec implies the <constrainingType/> element is needed.
+ * <p>
+ */
+ @Test
+ public void ASM40002_negative() throws Exception {
+ System.out.println("Running ASM40002 negative test");
+ init("noconstrainingtype.composite");
+ dService = ServiceFinder.getService(DService.class,
"DComponent/DService");
+ dService.getSomeProperty();
+ destroy();
+ }
}