summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning')
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java77
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java74
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java65
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java66
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java71
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java71
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java71
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java67
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java71
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java74
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java71
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java71
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java71
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java71
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java71
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java71
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java71
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java71
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java71
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ReferenceNotFoundTestCase.java71
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java71
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java71
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java67
-rw-r--r--branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java67
24 files changed, 0 insertions, 1693 deletions
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java
deleted file mode 100644
index 84c77ae297..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-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()));
-
- try {
- node.start();
- } catch (Exception ex){
- // do nothing - the SCA binding throws and exception here
- // because the interface for the reference is not remotable
- }
- 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();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("ComponentReferenceTargetNotFound", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java
deleted file mode 100644
index ff1bd6cb09..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-import org.apache.tuscany.sca.node.impl.NodeImpl;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class DuplicateComponentNameTestCase 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/DuplicateComponentName/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
- new File("src/main/resources/DuplicateComponentName").toURL().toString()));
- /*
- node = SCANode2Factory.createSCANodeWithComposite("DuplicateComponentName/Calculator.composite");
- */
- 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();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("DuplicateComponentName", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java
deleted file mode 100644
index 65dab38ee3..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-import org.apache.tuscany.sca.node.impl.NodeImpl;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class DuplicateImplementationPropertyNameTestCase extends TestCase {
- private SCANode2 node;
-
- @Override
- protected void setUp() throws Exception {
- SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/DuplicateImplementationPropertyName/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
- new File("src/main/resources/DuplicateImplementationPropertyName").toURL().toString()));
- }
-
- @Override
- protected void tearDown() throws Exception {
- }
-
- public void testCalculator() throws Exception {
- ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("DuplicateImplementationPropertyName", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java
deleted file mode 100644
index 6c10d1279c..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-import org.apache.tuscany.sca.node.impl.NodeImpl;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class DuplicateImplementationReferenceNameTestCase extends TestCase {
-
- private SCANode2 node;
-
- @Override
- protected void setUp() throws Exception {
- SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/DuplicateImplementationReferenceName/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
- new File("src/main/resources/DuplicateImplementationReferenceName").toURL().toString()));
- }
-
- @Override
- protected void tearDown() throws Exception {
- }
-
- public void testCalculator() throws Exception {
- ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("DuplicateImplementationReferenceName", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java
deleted file mode 100644
index 4531564ccb..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-import org.apache.tuscany.sca.node.impl.NodeImpl;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class DuplicatePropertyNameTestCase 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/DuplicatePropertyName/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
- new File("src/main/resources/DuplicatePropertyName").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();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("DuplicateComponentPropertyName", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java
deleted file mode 100644
index 3b024c58c7..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-import org.apache.tuscany.sca.node.impl.NodeImpl;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class DuplicateReferenceNameTestCase 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/DuplicateReferenceName/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
- new File("src/main/resources/DuplicateReferenceName").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();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("DuplicateComponentReferenceName", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java
deleted file mode 100644
index 4f54b023f4..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-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();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("MultipleBindingsForService", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java
deleted file mode 100644
index 14af754860..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-import org.apache.tuscany.sca.node.impl.NodeImpl;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class NoComponentImplementationTestCase 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/NoComponentImplementation/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
- new File("src/main/resources/NoComponentImplementation").toURL().toString()));
- }
-
- @Override
- protected void tearDown() throws Exception {
- }
-
- public void testCalculator() throws Exception {
- ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("NoComponentImplementation", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java
deleted file mode 100644
index 2f2e87f9af..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-import org.apache.tuscany.sca.node.impl.NodeImpl;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class NoCompositeNamespaceTestCase 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/NoCompositeNamespace/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
- new File("src/main/resources/NoCompositeNamespace").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();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("NoCompositeNamespace", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java
deleted file mode 100644
index eb1f514240..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class NoMatchingBindingTestCase extends TestCase {
-
- private CalculatorService calculatorService;
- private SCANode2 node;
-
- @Override
- protected void setUp() throws Exception {
- try {
- SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/NoMatchingBinding/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
- new File("src/main/resources/NoMatchingBinding").toURL().toString()));
-
- node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
- } catch (Exception ex){
- // do nothing
- return;
- }
- Assert.fail();
- }
-
- @Override
- protected void tearDown() throws Exception {
- node.stop();
- }
-
- public void testCalculator() throws Exception {
- /*
- ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("NoMatchingBinding", problem.getMessageId());
- */
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java
deleted file mode 100644
index 07c75decbc..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-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();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("PromotedReferenceNotFound", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java
deleted file mode 100644
index 26c988c1c1..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-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();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("PromotedServiceNotFound", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java
deleted file mode 100644
index 3753fc278c..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-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();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("PropertyMustSupplyNull", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java
deleted file mode 100644
index 08e5a9861b..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-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();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("PropertyMustSupplyIncompatible", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java
deleted file mode 100644
index 4af2675c09..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-import org.apache.tuscany.sca.node.impl.NodeImpl;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class PropertyNotFoundTestCase 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/PropertyNotFound/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
- new File("src/main/resources/PropertyNotFound").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();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("PropertyNotFound", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java
deleted file mode 100644
index 11fde0a73d..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-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();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("PropertyOverrideManyAttribute", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java
deleted file mode 100644
index 19b04e6940..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-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();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("ReferenceIncompatibleComponentInterface", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java
deleted file mode 100644
index 3180539898..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-import org.apache.tuscany.sca.node.impl.NodeImpl;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class ReferenceIncompatibleInterfaceTestCase 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/ReferenceIncompatibleInterface/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
- new File("src/main/resources/ReferenceIncompatibleInterface").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();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("ReferenceIncompatibleInterface", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java
deleted file mode 100644
index 87ae0f0e3c..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-import org.apache.tuscany.sca.node.impl.NodeImpl;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class ReferenceIncompatibleMultiplicityTestCase 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/ReferenceIncompatibleMultiplicity/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
- new File("src/main/resources/ReferenceIncompatibleMultiplicity").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();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("ReferenceIncompatibleMultiplicity", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ReferenceNotFoundTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ReferenceNotFoundTestCase.java
deleted file mode 100644
index 4856ba507f..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ReferenceNotFoundTestCase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-import org.apache.tuscany.sca.node.impl.NodeImpl;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class ReferenceNotFoundTestCase 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/ReferenceNotFound/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
- new File("src/main/resources/ReferenceNotFound").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();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("ReferenceNotFound", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java
deleted file mode 100644
index f456ae40af..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-import org.apache.tuscany.sca.node.impl.NodeImpl;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class ReferenceWithoutTargetsTestCase 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/ReferenceWithoutTargets/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
- new File("src/main/resources/ReferenceWithoutTargets").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();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("ReferenceWithoutTargets", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java
deleted file mode 100644
index 51adc22848..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-import org.apache.tuscany.sca.node.impl.NodeImpl;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class ServiceNotFoundForComponentServiceTestCase 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/ServiceNotFoundForComponentService/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
- new File("src/main/resources/ServiceNotFoundForComponentService").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();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("ServiceNotFoundForComponentService", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java
deleted file mode 100644
index 918108c275..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-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.logging.impl.DefaultLoggingMonitorImpl;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-import org.apache.tuscany.sca.node.impl.NodeImpl;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class UnresolvedComponentImplementationTestCase 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/UnresolvedComponentImplementation/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
- new File("src/main/resources/UnresolvedComponentImplementation").toURL().toString()));
- }
-
- @Override
- protected void tearDown() throws Exception {
- }
-
- public void testCalculator() throws Exception {
- ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("UnresolvedComponentImplementation", problem.getMessageId());
-
- }
-}
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java
deleted file mode 100644
index 93edfa2e21..0000000000
--- a/branches/sca-java-1.3.1/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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.warning;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class XSDValidationTestCase extends TestCase {
-
- private CalculatorService calculatorService;
- private SCANode2 node;
- private Exception startUpException;
-
- @Override
- protected void setUp() throws Exception {
- SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
- try {
- node = nodeFactory.createSCANode(new File("src/main/resources/XsdValidation/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
- new File("src/main/resources/XsdValidation").toURL().toString()));
- node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
- } catch (Exception ex){
- startUpException = ex;
- }
- }
-
- @Override
- protected void tearDown() throws Exception {
- if (node != null){
- node.stop();
- }
- }
-
-
- public void testCalculator() throws Exception {
-
- assertEquals("org.osoa.sca.ServiceRuntimeException: Unexpected <binding> element found. It should appear inside a <service> or <reference> element.", startUpException.getMessage());
-
- }
-
-}