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/05/21 16:32:29 UTC

svn commit: r658706 [6/8] - in /incubator/tuscany/java/sca: itest/validation/ itest/validation/src/main/java/binding/ itest/validation/src/main/java/binding/ejb/ itest/validation/src/main/java/binding/ejb/account/ itest/validation/src/main/java/binding...

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,58 @@
+/*
+ * 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 binding.jms;
+
+import junit.framework.TestCase;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import domain.CustomCompositeBuilder;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class MissingResponseActivationSpecTestCase extends TestCase {
+
+	private CustomCompositeBuilder customDomain;
+
+    @Override
+    protected void setUp() throws Exception 
+    {
+    	customDomain = CustomCompositeBuilder.getInstance();
+        try {
+        	customDomain.loadContribution("src/main/resources/bindingjms/MissingResponseActivationSpec/service.composite", 
+        			"TestContribution", "src/main/resources/bindingjms/MissingResponseActivationSpec/");
+        } catch (Exception ex){
+            //throw ex;
+        }
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        //node.stop();
+    }
+
+    public void testCalculator() {
+    	Monitor monitor = customDomain.getMonitorInstance();
+    	Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+        
+    	assertNotNull(problem);
+        assertEquals("MissingResponseActivationSpec", problem.getMessageId()); 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,58 @@
+/*
+ * 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 binding.jms;
+
+import junit.framework.TestCase;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import domain.CustomCompositeBuilder;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class MissingResponseConnectionFactoryTestCase extends TestCase {
+
+	private CustomCompositeBuilder customDomain;
+
+    @Override
+    protected void setUp() throws Exception 
+    {
+    	customDomain = CustomCompositeBuilder.getInstance();
+        try {
+        	customDomain.loadContribution("src/main/resources/bindingjms/MissingResponseConnectionFactory/service.composite", 
+        			"TestContribution", "src/main/resources/bindingjms/MissingResponseConnectionFactory/");
+        } catch (Exception ex){
+            //throw ex;
+        }
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        //node.stop();
+    }
+
+    public void testCalculator() {
+    	Monitor monitor = customDomain.getMonitorInstance();
+    	Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+        
+    	assertNotNull(problem);
+        assertEquals("MissingResponseConnectionFactory", problem.getMessageId()); 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,58 @@
+/*
+ * 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 binding.jms;
+
+import junit.framework.TestCase;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import domain.CustomCompositeBuilder;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class MustStartWithSchemaTestCase extends TestCase {
+
+	private CustomCompositeBuilder customDomain;
+
+    @Override
+    protected void setUp() throws Exception 
+    {
+    	customDomain = CustomCompositeBuilder.getInstance();
+        try {
+        	customDomain.loadContribution("src/main/resources/bindingjms/MustStartWithSchema/service.composite", 
+        			"TestContribution", "src/main/resources/bindingjms/MustStartWithSchema/");
+        } catch (Exception ex){
+            //throw ex;
+        }
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        //node.stop();
+    }
+
+    public void testCalculator() {
+    	Monitor monitor = customDomain.getMonitorInstance();
+    	Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+        
+    	assertNotNull(problem);
+        assertEquals("MustStartWithSchema", problem.getMessageId()); 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,58 @@
+/*
+ * 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 binding.jms;
+
+import junit.framework.TestCase;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import domain.CustomCompositeBuilder;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class UnknownTokenInURITestCase extends TestCase {
+
+	private CustomCompositeBuilder customDomain;
+
+    @Override
+    protected void setUp() throws Exception 
+    {
+    	customDomain = CustomCompositeBuilder.getInstance();
+        try {
+        	customDomain.loadContribution("src/main/resources/bindingjms/UnknownTokenInURI/service.composite", 
+        			"TestContribution", "src/main/resources/bindingjms/UnknownTokenInURI/");
+        } catch (Exception ex){
+            //throw ex;
+        }
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        //node.stop();
+    }
+
+    public void testCalculator() {
+    	Monitor monitor = customDomain.getMonitorInstance();
+    	Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+        
+    	assertNotNull(problem);
+        assertEquals("UnknownTokenInURI", problem.getMessageId()); 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,60 @@
+/*
+ * 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 binding.wsxml;
+
+import junit.framework.TestCase;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+
+import domain.CustomCompositeBuilder;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class InvalidWsdlElementAttrTestCase extends TestCase {
+	
+	private CustomCompositeBuilder customDomain;
+    
+    @Override
+    protected void setUp() throws Exception 
+    {
+    	customDomain = CustomCompositeBuilder.getInstance();
+        try {
+        	customDomain.loadContribution("src/main/resources/binding/wsxml/InvalidWsdlElementAttr/Calculator.composite", 
+        			"TestContribution", "src/main/resources/binding/wsxml/InvalidWsdlElementAttr/");
+        } catch (Exception ex){
+            //throw ex;
+        }
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        //node.stop();
+    }
+
+    public void testCalculator() {
+    	Monitor monitor = customDomain.getMonitorInstance();
+    	Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+        
+    	assertNotNull(problem);
+        assertEquals("InvalidWsdlElementAttr", problem.getMessageId());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,60 @@
+/*
+ * 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 binding.wsxml;
+
+import junit.framework.TestCase;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+
+import domain.CustomCompositeBuilder;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class MustUseWsdlBindingTestCase extends TestCase {
+	
+	private CustomCompositeBuilder customDomain;
+    
+    @Override
+    protected void setUp() throws Exception 
+    {
+    	customDomain = CustomCompositeBuilder.getInstance();
+        try {
+        	customDomain.loadContribution("src/main/resources/binding/wsxml/MustUseWsdlBinding/Calculator.composite", 
+        			"TestContribution", "src/main/resources/binding/wsxml/MustUseWsdlBinding/");
+        } catch (Exception ex){
+            //throw ex;
+        }
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        //node.stop();
+    }
+
+    public void testCalculator() {
+    	Monitor monitor = customDomain.getMonitorInstance();
+    	Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+        
+    	assertNotNull(problem);
+        assertEquals("MustUseWsdlBinding", problem.getMessageId());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,79 @@
+/*
+ * 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.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;
+
+import calculator.warning.CalculatorService;
+
+/**
+ * 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());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,76 @@
+/*
+ * 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.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;
+
+import calculator.warning.CalculatorService;
+
+/**
+ * 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());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,65 @@
+/*
+ * 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.impl.DefaultLoggingMonitorImpl;
+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 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());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,66 @@
+/*
+ * 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.impl.DefaultLoggingMonitorImpl;
+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 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());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,73 @@
+/*
+ * 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.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;
+
+import calculator.warning.CalculatorService;
+
+/**
+ * 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());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,73 @@
+/*
+ * 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.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;
+
+import calculator.warning.CalculatorService;
+
+/**
+ * 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());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,73 @@
+/*
+ * 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.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;
+
+import calculator.warning.CalculatorService;
+
+/**
+ * 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());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java Wed May 21 07:32:22 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.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.impl.DefaultLoggingMonitorImpl;
+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;
+
+import calculator.warning.CalculatorService;
+
+/**
+ * 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());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,73 @@
+/*
+ * 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.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;
+
+import calculator.warning.CalculatorService;
+
+/**
+ * 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());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,81 @@
+/*
+ * 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.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.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 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());
+        */
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,73 @@
+/*
+ * 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.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;
+
+import calculator.warning.CalculatorService;
+
+/**
+ * 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());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,73 @@
+/*
+ * 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.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;
+
+import calculator.warning.CalculatorService;
+
+/**
+ * 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());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,73 @@
+/*
+ * 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.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;
+
+import calculator.warning.CalculatorService;
+
+/**
+ * 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());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,73 @@
+/*
+ * 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.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;
+
+import calculator.warning.CalculatorService;
+
+/**
+ * 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());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,73 @@
+/*
+ * 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.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;
+
+import calculator.warning.CalculatorService;
+
+/**
+ * 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());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java?rev=658706&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java Wed May 21 07:32:22 2008
@@ -0,0 +1,73 @@
+/*
+ * 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.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;
+
+import calculator.warning.CalculatorService;
+
+/**
+ * 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());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date