You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sl...@apache.org on 2008/04/23 11:55:07 UTC
svn commit: r650810 [1/2] - in /incubator/tuscany/java/sca:
itest/validation/src/main/java/calculator/
itest/validation/src/main/resources/ComponentReferenceTargetNotFound/
itest/validation/src/main/resources/MultipleBindingsForService/
itest/validatio...
Author: slaws
Date: Wed Apr 23 02:55:00 2008
New Revision: 650810
URL: http://svn.apache.org/viewvc?rev=650810&view=rev
Log:
TUSCANY-2260 - More validation tests. Thanks for the patch Hasan
Added:
incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/AddServiceImplWithServiceName.java (with props)
incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/PropertyService.java (with props)
incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/PropertyServiceImpl.java (with props)
incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/SubtractServiceImplWithServiceName.java (with props)
incubator/tuscany/java/sca/itest/validation/src/main/resources/ComponentReferenceTargetNotFound/
incubator/tuscany/java/sca/itest/validation/src/main/resources/ComponentReferenceTargetNotFound/Calculator.composite (with props)
incubator/tuscany/java/sca/itest/validation/src/main/resources/MultipleBindingsForService/
incubator/tuscany/java/sca/itest/validation/src/main/resources/MultipleBindingsForService/Calculator.composite (with props)
incubator/tuscany/java/sca/itest/validation/src/main/resources/PromotedReferenceNotFound/
incubator/tuscany/java/sca/itest/validation/src/main/resources/PromotedReferenceNotFound/Calculator.composite (with props)
incubator/tuscany/java/sca/itest/validation/src/main/resources/PromotedServiceNotFound/
incubator/tuscany/java/sca/itest/validation/src/main/resources/PromotedServiceNotFound/Calculator.composite (with props)
incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/
incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/Calculator.composite (with props)
incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/CalculatorNullMustSupply.composite (with props)
incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/CalculatorOverrideManyAttribute.composite (with props)
incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleComponentInterface/
incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleComponentInterface/Calculator.composite (with props)
incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleInterface/
incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleInterface/Calculator.composite (with props)
incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleMultiplicity/
incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleMultiplicity/Calculator.composite (with props)
incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceNotFound/
incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceNotFound/Calculator.composite (with props)
incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceWithoutTargets/
incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceWithoutTargets/Calculator.composite (with props)
incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ComponentReferenceTargetNotFoundTestCase.java (with props)
incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/MultipleBindingsForServiceTestCase.java (with props)
incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PromotedReferenceNotFoundTestCase.java (with props)
incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PromotedServiceNotFoundTestCase.java (with props)
incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyAttributeMustSupplyNullTestCase.java (with props)
incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyAttributeTestCase.java (with props)
incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyOverrideManyAttributeTestCase.java (with props)
incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ReferenceIncompatibleComponentInterfaceTestCase.java (with props)
incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ReferenceIncompatibleInterfaceTestCase.java (with props)
incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ReferenceIncompatibleMultiplicityTestCase.java (with props)
incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ReferenceNotFoundTestCase.java (with props)
incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ReferenceWithoutTargetsTestCase.java (with props)
Modified:
incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeConfigurationBuilderImpl.java
incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeWireBuilderImpl.java
incubator/tuscany/java/sca/modules/assembly/src/main/resources/assembly-validation-messages_en.properties
Added: incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/AddServiceImplWithServiceName.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/AddServiceImplWithServiceName.java?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/AddServiceImplWithServiceName.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/AddServiceImplWithServiceName.java Wed Apr 23 02:55:00 2008
@@ -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 calculator;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.osoa.sca.annotations.Property;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * An implementation of the Add service
+ */
+@Service(AddService.class)
+public class AddServiceImplWithServiceName implements AddService {
+
+ @Property(name="serviceName")
+ protected String serviceName = "addService";
+
+ public double add(double n1, double n2) {
+ Logger logger = Logger.getLogger("calculator");
+ logger.log(Level.FINEST, "Adding " + n1 + " and " + n2);
+ return n1 + n2;
+ }
+
+ public String getServiceName(){
+ return serviceName;
+ }
+
+}
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/AddServiceImplWithServiceName.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/AddServiceImplWithServiceName.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/PropertyService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/PropertyService.java?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/PropertyService.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/PropertyService.java Wed Apr 23 02:55:00 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 calculator;
+
+/**
+ * The Property service interface
+ */
+public interface PropertyService {
+
+ String getFirstName();
+ String getLastName();
+
+}
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/PropertyService.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/PropertyService.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/PropertyServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/PropertyServiceImpl.java?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/PropertyServiceImpl.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/PropertyServiceImpl.java Wed Apr 23 02:55:00 2008
@@ -0,0 +1,41 @@
+/*
+ * 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 calculator;
+
+import org.osoa.sca.annotations.Property;
+
+/**
+ * An implementation of the Property service
+ */
+public class PropertyServiceImpl implements PropertyService {
+
+ @Property(name="firstName", required=false)
+ protected String firstName;
+
+ @Property(name="lastName", required=true)
+ protected String lastName;
+
+ public String getFirstName(){
+ return firstName;
+ }
+
+ public String getLastName(){
+ return lastName;
+ }
+}
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/PropertyServiceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/PropertyServiceImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/SubtractServiceImplWithServiceName.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/SubtractServiceImplWithServiceName.java?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/SubtractServiceImplWithServiceName.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/SubtractServiceImplWithServiceName.java Wed Apr 23 02:55:00 2008
@@ -0,0 +1,37 @@
+/*
+ * 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 calculator;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * An implementation of the subtract service.
+ */
+@Service(SubtractService.class)
+public class SubtractServiceImplWithServiceName implements SubtractService {
+
+ public double subtract(double n1, double n2) {
+ Logger logger = Logger.getLogger("calculator");
+ logger.log(Level.FINEST, "Subtracting " + n1 + " from " + n2);
+ return n1 - n2;
+ }
+
+}
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/SubtractServiceImplWithServiceName.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/SubtractServiceImplWithServiceName.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/ComponentReferenceTargetNotFound/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/ComponentReferenceTargetNotFound/Calculator.composite?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/ComponentReferenceTargetNotFound/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/ComponentReferenceTargetNotFound/Calculator.composite Wed Apr 23 02:55:00 2008
@@ -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.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="Calculator">
+
+ <component name="CalculatorServiceComponent">
+ <implementation.java class="calculator.CalculatorServiceImpl"/>
+ <reference name="addService" target="AddServiceComponent_one" />
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" />
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="AddServiceComponent">
+ <implementation.java class="calculator.AddServiceImpl"/>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl"/>
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl"/>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl"/>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ComponentReferenceTargetNotFound/Calculator.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ComponentReferenceTargetNotFound/Calculator.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ComponentReferenceTargetNotFound/Calculator.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/MultipleBindingsForService/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/MultipleBindingsForService/Calculator.composite?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/MultipleBindingsForService/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/MultipleBindingsForService/Calculator.composite Wed Apr 23 02:55:00 2008
@@ -0,0 +1,53 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="Calculator">
+
+ <component name="CalculatorServiceComponent">
+ <implementation.java class="calculator.CalculatorServiceImpl"/>
+ <reference name="addService" target="AddServiceComponent" />
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" />
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="AddServiceComponent">
+ <service name="AddService">
+ <binding.sca name="addBinding"/>
+ <binding.sca name="addBinding"/>
+ </service>
+ <implementation.java class="calculator.AddServiceImplWithServiceName"/>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImplWithServiceName"/>
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl"/>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl"/>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/MultipleBindingsForService/Calculator.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/MultipleBindingsForService/Calculator.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/MultipleBindingsForService/Calculator.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/PromotedReferenceNotFound/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/PromotedReferenceNotFound/Calculator.composite?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/PromotedReferenceNotFound/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/PromotedReferenceNotFound/Calculator.composite Wed Apr 23 02:55:00 2008
@@ -0,0 +1,51 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="Calculator">
+
+ <reference name="promotedAddReference" promote="AddService/addService"/>
+
+ <component name="CalculatorServiceComponent">
+ <implementation.java class="calculator.CalculatorServiceImpl"/>
+ <reference name="addService" target="AddServiceComponent"/>
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" />
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="AddServiceComponent">
+ <implementation.java class="calculator.AddServiceImpl"/>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl"/>
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl"/>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl"/>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/PromotedReferenceNotFound/Calculator.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/PromotedReferenceNotFound/Calculator.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/PromotedReferenceNotFound/Calculator.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/PromotedServiceNotFound/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/PromotedServiceNotFound/Calculator.composite?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/PromotedServiceNotFound/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/PromotedServiceNotFound/Calculator.composite Wed Apr 23 02:55:00 2008
@@ -0,0 +1,51 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="Calculator">
+
+ <service name="promotedAddService" promote="AddServiceComponent_one"/>
+
+ <component name="CalculatorServiceComponent">
+ <implementation.java class="calculator.CalculatorServiceImpl"/>
+ <reference name="addService" target="AddServiceComponent"/>
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" />
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="AddServiceComponent">
+ <implementation.java class="calculator.AddServiceImpl"/>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl"/>
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl"/>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl"/>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/PromotedServiceNotFound/Calculator.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/PromotedServiceNotFound/Calculator.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/PromotedServiceNotFound/Calculator.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/Calculator.composite?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/Calculator.composite Wed Apr 23 02:55:00 2008
@@ -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.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="Calculator">
+
+ <component name="CalculatorServiceComponent">
+ <implementation.java class="calculator.CalculatorServiceImpl"/>
+ <reference name="addService" target="AddServiceComponent" />
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" />
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="AddServiceComponent">
+ <implementation.java class="calculator.AddServiceImpl"/>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl"/>
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl"/>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl"/>
+ </component>
+
+ <component name="PropertyServiceComponent">
+ <property name="firstName" type="xsd:anyURI" mustSupply="true">Simon</property>
+ <property name="lastName" type="xsd:anyURI">Laws</property>
+ <implementation.java class="calculator.PropertyServiceImpl"/>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/Calculator.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/Calculator.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/Calculator.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/CalculatorNullMustSupply.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/CalculatorNullMustSupply.composite?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/CalculatorNullMustSupply.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/CalculatorNullMustSupply.composite Wed Apr 23 02:55:00 2008
@@ -0,0 +1,53 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="Calculator">
+
+ <component name="CalculatorServiceComponent">
+ <implementation.java class="calculator.CalculatorServiceImpl"/>
+ <reference name="addService" target="AddServiceComponent" />
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" />
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="AddServiceComponent">
+ <implementation.java class="calculator.AddServiceImpl"/>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl"/>
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl"/>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl"/>
+ </component>
+
+ <component name="PropertyServiceComponent">
+ <implementation.java class="calculator.PropertyServiceImpl"/>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/CalculatorNullMustSupply.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/CalculatorNullMustSupply.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/CalculatorNullMustSupply.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/CalculatorOverrideManyAttribute.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/CalculatorOverrideManyAttribute.composite?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/CalculatorOverrideManyAttribute.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/CalculatorOverrideManyAttribute.composite Wed Apr 23 02:55:00 2008
@@ -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.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="Calculator">
+
+ <component name="CalculatorServiceComponent">
+ <implementation.java class="calculator.CalculatorServiceImpl"/>
+ <reference name="addService" target="AddServiceComponent" />
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" />
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="AddServiceComponent">
+ <implementation.java class="calculator.AddServiceImpl"/>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl"/>
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl"/>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl"/>
+ </component>
+
+ <component name="PropertyServiceComponent">
+ <property name="lastName" type="xsd:anyURI" many="true">Laws</property>
+ <implementation.java class="calculator.PropertyServiceImpl"/>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/CalculatorOverrideManyAttribute.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/CalculatorOverrideManyAttribute.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyAttribute/CalculatorOverrideManyAttribute.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleComponentInterface/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleComponentInterface/Calculator.composite?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleComponentInterface/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleComponentInterface/Calculator.composite Wed Apr 23 02:55:00 2008
@@ -0,0 +1,51 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="Calculator">
+
+ <component name="CalculatorServiceComponent">
+ <implementation.java class="calculator.CalculatorServiceImpl"/>
+ <reference name="addService" target="AddServiceComponent">
+ <interface.java interface="calculator.SubtractService"/>
+ </reference>
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" />
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="AddServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl"/>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl"/>
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl"/>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl"/>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleComponentInterface/Calculator.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleComponentInterface/Calculator.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleComponentInterface/Calculator.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleInterface/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleInterface/Calculator.composite?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleInterface/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleInterface/Calculator.composite Wed Apr 23 02:55:00 2008
@@ -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.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="Calculator">
+
+ <component name="CalculatorServiceComponent">
+ <implementation.java class="calculator.CalculatorServiceImpl"/>
+ <reference name="addService" target="SubtractServiceComponent" />
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" />
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="AddServiceComponent">
+ <implementation.java class="calculator.AddServiceImpl"/>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl"/>
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl"/>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl"/>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleInterface/Calculator.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleInterface/Calculator.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleInterface/Calculator.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleMultiplicity/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleMultiplicity/Calculator.composite?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleMultiplicity/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleMultiplicity/Calculator.composite Wed Apr 23 02:55:00 2008
@@ -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.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="Calculator">
+
+ <component name="CalculatorServiceComponent">
+ <implementation.java class="calculator.CalculatorServiceImpl"/>
+ <reference name="addService" multiplicity="1..n" target="AddServiceComponent" />
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" />
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="AddServiceComponent">
+ <implementation.java class="calculator.AddServiceImpl"/>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl"/>
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl"/>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl"/>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleMultiplicity/Calculator.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleMultiplicity/Calculator.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceIncompatibleMultiplicity/Calculator.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceNotFound/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceNotFound/Calculator.composite?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceNotFound/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceNotFound/Calculator.composite Wed Apr 23 02:55:00 2008
@@ -0,0 +1,50 @@
+<?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://sample"
+ xmlns:sample="http://sample"
+ name="Calculator">
+
+ <component name="CalculatorServiceComponent">
+ <implementation.java class="calculator.CalculatorServiceImpl"/>
+ <reference name="addService_one" target="AddServiceComponent" />
+ <reference name="addService" target="AddServiceComponent" />
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" />
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="AddServiceComponent">
+ <implementation.java class="calculator.AddServiceImpl"/>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl"/>
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl"/>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl"/>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceNotFound/Calculator.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceNotFound/Calculator.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceNotFound/Calculator.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceWithoutTargets/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceWithoutTargets/Calculator.composite?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceWithoutTargets/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceWithoutTargets/Calculator.composite Wed Apr 23 02:55:00 2008
@@ -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.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="Calculator">
+
+ <component name="CalculatorServiceComponent">
+ <implementation.java class="calculator.CalculatorServiceImpl"/>
+ <reference name="addService"/>
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" />
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="AddServiceComponent">
+ <implementation.java class="calculator.AddServiceImpl"/>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl"/>
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl"/>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl"/>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceWithoutTargets/Calculator.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceWithoutTargets/Calculator.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ReferenceWithoutTargets/Calculator.composite
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ComponentReferenceTargetNotFoundTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ComponentReferenceTargetNotFoundTestCase.java?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ComponentReferenceTargetNotFoundTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ComponentReferenceTargetNotFoundTestCase.java Wed Apr 23 02:55:00 2008
@@ -0,0 +1,69 @@
+/*
+ * 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 calculator;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.MonitorFactory;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode2Factory.SCAContribution;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class ComponentReferenceTargetNotFoundTestCase extends TestCase {
+
+ private CalculatorService calculatorService;
+ private SCANode2 node;
+
+ @Override
+ protected void setUp() throws Exception {
+ SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+ node = nodeFactory.createSCANode(new File("src/main/resources/ComponentReferenceTargetNotFound/Calculator.composite").toURL().toString(),
+ new SCAContribution("TestContribution",
+ new File("src/main/resources/ComponentReferenceTargetNotFound").toURL().toString()));
+ node.start();
+ calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+ public void testCalculator() throws Exception {
+ ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
+ MonitorFactory monitorFactory = registry.getExtensionPoint(MonitorFactory.class);
+ Monitor monitor = monitorFactory.createMonitor();
+ Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+
+ assertNotNull(problem);
+ assertEquals("ComponentReferenceTargetNotFound", problem.getMessageId());
+
+ }
+}
Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ComponentReferenceTargetNotFoundTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ComponentReferenceTargetNotFoundTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/MultipleBindingsForServiceTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/MultipleBindingsForServiceTestCase.java?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/MultipleBindingsForServiceTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/MultipleBindingsForServiceTestCase.java Wed Apr 23 02:55:00 2008
@@ -0,0 +1,69 @@
+/*
+ * 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 calculator;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.MonitorFactory;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode2Factory.SCAContribution;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class MultipleBindingsForServiceTestCase extends TestCase {
+
+ private CalculatorService calculatorService;
+ private SCANode2 node;
+
+ @Override
+ protected void setUp() throws Exception {
+ SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+ node = nodeFactory.createSCANode(new File("src/main/resources/MultipleBindingsForService/Calculator.composite").toURL().toString(),
+ new SCAContribution("TestContribution",
+ new File("src/main/resources/MultipleBindingsForService").toURL().toString()));
+ node.start();
+ calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+ public void testCalculator() throws Exception {
+ ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
+ MonitorFactory monitorFactory = registry.getExtensionPoint(MonitorFactory.class);
+ Monitor monitor = monitorFactory.createMonitor();
+ Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+
+ assertNotNull(problem);
+ assertEquals("MultipleBindingsForService", problem.getMessageId());
+
+ }
+}
Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/MultipleBindingsForServiceTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/MultipleBindingsForServiceTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PromotedReferenceNotFoundTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PromotedReferenceNotFoundTestCase.java?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PromotedReferenceNotFoundTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PromotedReferenceNotFoundTestCase.java Wed Apr 23 02:55:00 2008
@@ -0,0 +1,69 @@
+/*
+ * 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 calculator;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.MonitorFactory;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode2Factory.SCAContribution;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class PromotedReferenceNotFoundTestCase extends TestCase {
+
+ private CalculatorService calculatorService;
+ private SCANode2 node;
+
+ @Override
+ protected void setUp() throws Exception {
+ SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+ node = nodeFactory.createSCANode(new File("src/main/resources/PromotedReferenceNotFound/Calculator.composite").toURL().toString(),
+ new SCAContribution("TestContribution",
+ new File("src/main/resources/PromotedReferenceNotFound").toURL().toString()));
+ node.start();
+ calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+ public void testCalculator() throws Exception {
+ ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
+ MonitorFactory monitorFactory = registry.getExtensionPoint(MonitorFactory.class);
+ Monitor monitor = monitorFactory.createMonitor();
+ Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+
+ assertNotNull(problem);
+ assertEquals("PromotedReferenceNotFound", problem.getMessageId());
+
+ }
+}
Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PromotedReferenceNotFoundTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PromotedReferenceNotFoundTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PromotedServiceNotFoundTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PromotedServiceNotFoundTestCase.java?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PromotedServiceNotFoundTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PromotedServiceNotFoundTestCase.java Wed Apr 23 02:55:00 2008
@@ -0,0 +1,69 @@
+/*
+ * 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 calculator;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.MonitorFactory;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode2Factory.SCAContribution;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class PromotedServiceNotFoundTestCase extends TestCase {
+
+ private CalculatorService calculatorService;
+ private SCANode2 node;
+
+ @Override
+ protected void setUp() throws Exception {
+ SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+ node = nodeFactory.createSCANode(new File("src/main/resources/PromotedServiceNotFound/Calculator.composite").toURL().toString(),
+ new SCAContribution("TestContribution",
+ new File("src/main/resources/PromotedServiceNotFound").toURL().toString()));
+ node.start();
+ calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+ public void testCalculator() throws Exception {
+ ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
+ MonitorFactory monitorFactory = registry.getExtensionPoint(MonitorFactory.class);
+ Monitor monitor = monitorFactory.createMonitor();
+ Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+
+ assertNotNull(problem);
+ assertEquals("PromotedServiceNotFound", problem.getMessageId());
+
+ }
+}
Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PromotedServiceNotFoundTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PromotedServiceNotFoundTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyAttributeMustSupplyNullTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyAttributeMustSupplyNullTestCase.java?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyAttributeMustSupplyNullTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyAttributeMustSupplyNullTestCase.java Wed Apr 23 02:55:00 2008
@@ -0,0 +1,69 @@
+/*
+ * 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 calculator;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.MonitorFactory;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode2Factory.SCAContribution;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class PropertyAttributeMustSupplyNullTestCase extends TestCase {
+
+ private CalculatorService calculatorService;
+ private SCANode2 node;
+
+ @Override
+ protected void setUp() throws Exception {
+ SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+ node = nodeFactory.createSCANode(new File("src/main/resources/PropertyAttribute/CalculatorNullMustSupply.composite").toURL().toString(),
+ new SCAContribution("TestContribution",
+ new File("src/main/resources/PropertyAttribute").toURL().toString()));
+ node.start();
+ calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+ public void testCalculator() throws Exception {
+ ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
+ MonitorFactory monitorFactory = registry.getExtensionPoint(MonitorFactory.class);
+ Monitor monitor = monitorFactory.createMonitor();
+ Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+
+ assertNotNull(problem);
+ assertEquals("PropertyMustSupplyNull", problem.getMessageId());
+
+ }
+}
Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyAttributeMustSupplyNullTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyAttributeMustSupplyNullTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyAttributeTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyAttributeTestCase.java?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyAttributeTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyAttributeTestCase.java Wed Apr 23 02:55:00 2008
@@ -0,0 +1,69 @@
+/*
+ * 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 calculator;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.MonitorFactory;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode2Factory.SCAContribution;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class PropertyAttributeTestCase extends TestCase {
+
+ private CalculatorService calculatorService;
+ private SCANode2 node;
+
+ @Override
+ protected void setUp() throws Exception {
+ SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+ node = nodeFactory.createSCANode(new File("src/main/resources/PropertyAttribute/Calculator.composite").toURL().toString(),
+ new SCAContribution("TestContribution",
+ new File("src/main/resources/PropertyAttribute").toURL().toString()));
+ node.start();
+ calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+ public void testCalculator() throws Exception {
+ ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
+ MonitorFactory monitorFactory = registry.getExtensionPoint(MonitorFactory.class);
+ Monitor monitor = monitorFactory.createMonitor();
+ Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+
+ assertNotNull(problem);
+ assertEquals("PropertyMustSupplyIncompatible", problem.getMessageId());
+
+ }
+}
Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyAttributeTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyAttributeTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyOverrideManyAttributeTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyOverrideManyAttributeTestCase.java?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyOverrideManyAttributeTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyOverrideManyAttributeTestCase.java Wed Apr 23 02:55:00 2008
@@ -0,0 +1,69 @@
+/*
+ * 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 calculator;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.MonitorFactory;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode2Factory.SCAContribution;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class PropertyOverrideManyAttributeTestCase extends TestCase {
+
+ private CalculatorService calculatorService;
+ private SCANode2 node;
+
+ @Override
+ protected void setUp() throws Exception {
+ SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+ node = nodeFactory.createSCANode(new File("src/main/resources/PropertyAttribute/CalculatorOverrideManyAttribute.composite").toURL().toString(),
+ new SCAContribution("TestContribution",
+ new File("src/main/resources/PropertyAttribute").toURL().toString()));
+ node.start();
+ calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+ public void testCalculator() throws Exception {
+ ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
+ MonitorFactory monitorFactory = registry.getExtensionPoint(MonitorFactory.class);
+ Monitor monitor = monitorFactory.createMonitor();
+ Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+
+ assertNotNull(problem);
+ assertEquals("PropertyOverrideManyAttribute", problem.getMessageId());
+
+ }
+}
Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyOverrideManyAttributeTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyOverrideManyAttributeTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ReferenceIncompatibleComponentInterfaceTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ReferenceIncompatibleComponentInterfaceTestCase.java?rev=650810&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ReferenceIncompatibleComponentInterfaceTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ReferenceIncompatibleComponentInterfaceTestCase.java Wed Apr 23 02:55:00 2008
@@ -0,0 +1,69 @@
+/*
+ * 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 calculator;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.MonitorFactory;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode2Factory.SCAContribution;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class ReferenceIncompatibleComponentInterfaceTestCase extends TestCase {
+
+ private CalculatorService calculatorService;
+ private SCANode2 node;
+
+ @Override
+ protected void setUp() throws Exception {
+ SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+ node = nodeFactory.createSCANode(new File("src/main/resources/ReferenceIncompatibleComponentInterface/Calculator.composite").toURL().toString(),
+ new SCAContribution("TestContribution",
+ new File("src/main/resources/ReferenceIncompatibleComponentInterface").toURL().toString()));
+ node.start();
+ calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+ public void testCalculator() throws Exception {
+ ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
+ MonitorFactory monitorFactory = registry.getExtensionPoint(MonitorFactory.class);
+ Monitor monitor = monitorFactory.createMonitor();
+ Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+
+ assertNotNull(problem);
+ assertEquals("ReferenceIncompatibleComponentInterface", problem.getMessageId());
+
+ }
+}
Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ReferenceIncompatibleComponentInterfaceTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ReferenceIncompatibleComponentInterfaceTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date