diff options
Diffstat (limited to 'branches/sca-java-1.3.1/itest/validation/src/test/java/impl')
23 files changed, 0 insertions, 1438 deletions
diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/AttributeUnrecognizedNamespaceTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/AttributeUnrecognizedNamespaceTestCase.java deleted file mode 100644 index 9d97e3611a..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/AttributeUnrecognizedNamespaceTestCase.java +++ /dev/null @@ -1,60 +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 impl.bpel; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class AttributeUnrecognizedNamespaceTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - @Override - protected void setUp() throws Exception - { - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/bpel/AttributeUnrecognizedNamespace/helloworld.composite", - "TestContribution", "src/main/resources/impl/bpel/AttributeUnrecognizedNamespace/"); - } catch (Exception ex){ - //throw ex; - } - } - - @Override - protected void tearDown() throws Exception { - //nothing to do - } - - public void testCalculator() { - Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); - - assertNotNull(problem); - assertEquals("AttributeUnrecognizedNamespace", problem.getMessageId()); - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/AttributeWithoutNamespaceTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/AttributeWithoutNamespaceTestCase.java deleted file mode 100644 index 80c15dc444..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/AttributeWithoutNamespaceTestCase.java +++ /dev/null @@ -1,60 +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 impl.bpel; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class AttributeWithoutNamespaceTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - @Override - protected void setUp() throws Exception - { - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/bpel/AttributeWithoutNamespace/helloworld.composite", - "TestContribution", "src/main/resources/impl/bpel/AttributeWithoutNamespace/"); - } catch (Exception ex){ - //throw ex; - } - } - - @Override - protected void tearDown() throws Exception { - //nothing to do - } - - public void testCalculator() { - Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); - - assertNotNull(problem); - assertEquals("AttributeWithoutNamespace", problem.getMessageId()); - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/BPELProcessNotFoundTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/BPELProcessNotFoundTestCase.java deleted file mode 100644 index 81e8aecfeb..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/BPELProcessNotFoundTestCase.java +++ /dev/null @@ -1,60 +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 impl.bpel; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class BPELProcessNotFoundTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - @Override - protected void setUp() throws Exception - { - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/bpel/BPELProcessNotFound/helloworld.composite", - "TestContribution", "src/main/resources/impl/bpel/BPELProcessNotFound/"); - } catch (Exception ex){ - //throw ex; - } - } - - @Override - protected void tearDown() throws Exception { - //nothing to do - } - - public void testCalculator() { - Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); - - assertNotNull(problem); - assertEquals("BPELProcessNotFound", problem.getMessageId()); - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/CannotResolveWSDLReferenceTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/CannotResolveWSDLReferenceTestCase.java deleted file mode 100644 index fb0c525aea..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/CannotResolveWSDLReferenceTestCase.java +++ /dev/null @@ -1,60 +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 impl.bpel; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class CannotResolveWSDLReferenceTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - @Override - protected void setUp() throws Exception - { - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/bpel/CannotResolveWSDLReference/helloworld.composite", - "TestContribution", "src/main/resources/impl/bpel/CannotResolveWSDLReference/"); - } catch (Exception ex){ - //throw ex; - } - } - - @Override - protected void tearDown() throws Exception { - //nothing to do - } - - public void testCalculator() { - Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); - - assertNotNull(problem); - assertEquals("CannotResolveWSDLReference", problem.getMessageId()); - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/MyRolePartnerRoleNullTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/MyRolePartnerRoleNullTestCase.java deleted file mode 100644 index 445629457e..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/MyRolePartnerRoleNullTestCase.java +++ /dev/null @@ -1,60 +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 impl.bpel; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class MyRolePartnerRoleNullTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - @Override - protected void setUp() throws Exception - { - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/bpel/MyRolePartnerRoleNull/helloworld.composite", - "TestContribution", "src/main/resources/impl/bpel/MyRolePartnerRoleNull/"); - } catch (Exception ex){ - //throw ex; - } - } - - @Override - protected void tearDown() throws Exception { - //nothing to do - } - - public void testCalculator() { - Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); - - assertNotNull(problem); - assertEquals("MyRolePartnerRoleNull", problem.getMessageId()); - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java deleted file mode 100644 index 00b904ae65..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java +++ /dev/null @@ -1,59 +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 impl.bpel; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class PartnerLinkHasBothAttrTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - @Override - protected void setUp() throws Exception - { - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/bpel/PartnerLinkHasBothAttr/helloworld.composite", - "TestContribution", "src/main/resources/impl/bpel/PartnerLinkHasBothAttr/"); - } catch (Exception ex){ - //throw ex; - } - } - - @Override - protected void tearDown() throws Exception { - //nothing to do - } - - public void testCalculator() { - Monitor monitor = customDomain.getMonitorInstance(); - assertTrue(((DefaultLoggingMonitorImpl)monitor).isMessageLogged("PartnerLinkHasBothAttr")); - /*Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); - assertNotNull(problem); - assertEquals("PartnerLinkHasBothAttr", problem.getMessageId());*/ - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/PartnerLinkNoMatchingTypeTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/PartnerLinkNoMatchingTypeTestCase.java deleted file mode 100644 index b7a4ee6fef..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/PartnerLinkNoMatchingTypeTestCase.java +++ /dev/null @@ -1,60 +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 impl.bpel; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class PartnerLinkNoMatchingTypeTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - @Override - protected void setUp() throws Exception - { - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/bpel/PartnerLinkNoMatchingType/helloworld.composite", - "TestContribution", "src/main/resources/impl/bpel/PartnerLinkNoMatchingType/"); - } catch (Exception ex){ - //throw ex; - } - } - - @Override - protected void tearDown() throws Exception { - //nothing to do - } - - public void testCalculator() { - Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); - - assertNotNull(problem); - assertEquals("PartnerLinkNoMatchingType", problem.getMessageId()); - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/PartnerLinkTypeNoRolesTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/PartnerLinkTypeNoRolesTestCase.java deleted file mode 100644 index 32d3211f36..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/bpel/PartnerLinkTypeNoRolesTestCase.java +++ /dev/null @@ -1,60 +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 impl.bpel; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class PartnerLinkTypeNoRolesTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - @Override - protected void setUp() throws Exception - { - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/bpel/PartnerLinkTypeNoRoles/helloworld.composite", - "TestContribution", "src/main/resources/impl/bpel/PartnerLinkTypeNoRoles/"); - } catch (Exception ex){ - //throw ex; - } - } - - @Override - protected void tearDown() throws Exception { - //nothing to do - } - - public void testCalculator() { - Monitor monitor = customDomain.getMonitorInstance(); - assertTrue(((DefaultLoggingMonitorImpl)monitor).isMessageLogged("PartnerLinkTypeNoRoles")); - /*Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); - assertNotNull(problem); - assertEquals("PartnerLinkTypeNoRoles", problem.getMessageId());*/ - - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/java/ClassNotFoundExceptionTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/java/ClassNotFoundExceptionTestCase.java deleted file mode 100644 index 3a7745722a..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/java/ClassNotFoundExceptionTestCase.java +++ /dev/null @@ -1,60 +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 impl.java; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class ClassNotFoundExceptionTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - @Override - protected void setUp() throws Exception - { - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/java/ClassNotFoundException/Calculator.composite", - "TestContribution", "src/main/resources/impl/java/ClassNotFoundException/"); - } catch (Exception ex){ - //throw ex; - } - } - - @Override - protected void tearDown() throws Exception { - //nothing to do - } - - public void testCalculator() { - Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); - - assertNotNull(problem); - assertEquals("ClassNotFoundException", problem.getMessageId()); - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/java/ContributionResolveExceptionTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/java/ContributionResolveExceptionTestCase.java deleted file mode 100644 index 59fc3ce79c..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/java/ContributionResolveExceptionTestCase.java +++ /dev/null @@ -1,61 +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 impl.java; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class ContributionResolveExceptionTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - @Override - protected void setUp() throws Exception - { - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/java/ContributionResolveException/Calculator.composite", - "TestContribution", "src/main/resources/impl/java/ContributionResolveException/"); - } catch (Exception ex){ - //throw ex; - } - } - - @Override - protected void tearDown() throws Exception { - //nothing to do - } - - public void testCalculator() { - Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); - - - assertNotNull(problem); - assertEquals("ContributionResolveException", problem.getMessageId()); - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/osgi/CouldNotLocateOSGiBundleTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/osgi/CouldNotLocateOSGiBundleTestCase.java deleted file mode 100644 index 6f54ad140c..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/osgi/CouldNotLocateOSGiBundleTestCase.java +++ /dev/null @@ -1,64 +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 impl.osgi; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; -import org.apache.tuscany.sca.osgi.runtime.OSGiRuntime; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class CouldNotLocateOSGiBundleTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - @Override - protected void setUp() throws Exception - { - //OSGiTestBundles.createBundle("src/main/resources/impl/osgi/MissingComponentTypeFile/OSGiTestService.jar", OSGiTestInterface.class, OSGiTestImpl.class); - - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/osgi/CouldNotLocateOSGiBundle/osgitest.composite", - "TestContribution", "src/main/resources/impl/osgi/CouldNotLocateOSGiBundle/"); - } catch (Exception ex){ - //throw ex; - } - } - - @Override - protected void tearDown() throws Exception { - //nothing to do - OSGiRuntime.stop(); - } - - public void testCalculator() { - Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); - - assertNotNull(problem); - assertEquals("CouldNotLocateOSGiBundle", problem.getMessageId()); - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/osgi/MissingComponentTypeFileTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/osgi/MissingComponentTypeFileTestCase.java deleted file mode 100644 index 3d75fa8ccc..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/osgi/MissingComponentTypeFileTestCase.java +++ /dev/null @@ -1,64 +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 impl.osgi; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; -import org.apache.tuscany.sca.osgi.runtime.OSGiRuntime; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class MissingComponentTypeFileTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - @Override - protected void setUp() throws Exception - { - OSGiTestBundles.createBundle("src/main/resources/impl/osgi/MissingComponentTypeFile/OSGiTestService.jar", OSGiTestInterface.class, OSGiTestImpl.class); - - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/osgi/MissingComponentTypeFile/osgitest.composite", - "TestContribution", "src/main/resources/impl/osgi/MissingComponentTypeFile/"); - } catch (Exception ex){ - //throw ex; - } - } - - @Override - protected void tearDown() throws Exception { - //nothing to do - OSGiRuntime.stop(); - } - - public void testCalculator() { - Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); - - assertNotNull(problem); - assertEquals("MissingComponentTypeFile", problem.getMessageId()); - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/osgi/OSGiTestBundles.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/osgi/OSGiTestBundles.java deleted file mode 100644 index 398c028dd8..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/osgi/OSGiTestBundles.java +++ /dev/null @@ -1,111 +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 impl.osgi; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.net.URL; -import java.util.jar.JarOutputStream; -import java.util.jar.Manifest; -import java.util.zip.ZipEntry; - - -/** - * - * Utility class to create OSGi bundles - * - * @version $Rev$ $Date$ - */ -public class OSGiTestBundles { - - public static void createBundle(String jarName, - Class<?> interfaceClass, Class<?> implClass) throws Exception { - - ByteArrayOutputStream out = new ByteArrayOutputStream(); - - String EOL = System.getProperty("line.separator"); - - String packageName = interfaceClass.getPackage().getName(); - String bundleName = interfaceClass.getName(); - - String manifestStr = "Manifest-Version: 1.0" + EOL - + "Bundle-ManifestVersion: 2" + EOL + "Bundle-Name: " - + bundleName + EOL + "Bundle-SymbolicName: " + bundleName + EOL - + "Bundle-Version: " + "1.0.0" + EOL - + "Bundle-Localization: plugin" + EOL; - - StringBuilder manifestBuf = new StringBuilder(); - manifestBuf.append(manifestStr); - manifestBuf.append("Export-Package: " + packageName + EOL); - manifestBuf.append("Import-Package: org.osgi.framework" + EOL); - manifestBuf.append("Bundle-Activator: " + implClass.getName() + EOL); - - ByteArrayInputStream manifestStream = new ByteArrayInputStream(manifestBuf.toString().getBytes()); - Manifest manifest = new Manifest(); - manifest.read(manifestStream); - - - JarOutputStream jarOut = new JarOutputStream(out, manifest); - - String interfaceClassName = interfaceClass.getName().replaceAll("\\.", - "/") - + ".class"; - - URL url = interfaceClass.getClassLoader().getResource( - interfaceClassName); - String path = url.getPath(); - - ZipEntry ze = new ZipEntry(interfaceClassName); - - jarOut.putNextEntry(ze); - FileInputStream file = new FileInputStream(path); - byte[] fileContents = new byte[file.available()]; - file.read(fileContents); - jarOut.write(fileContents); - - String implClassName = implClass.getName().replaceAll("\\.", - "/") - + ".class"; - - url = implClass.getClassLoader().getResource(implClassName); - path = url.getPath(); - - ze = new ZipEntry(implClassName); - - jarOut.putNextEntry(ze); - file = new FileInputStream(path); - fileContents = new byte[file.available()]; - file.read(fileContents); - jarOut.write(fileContents); - - file.close(); - - jarOut.close(); - out.close(); - - FileOutputStream fileOut = new FileOutputStream(jarName); - fileOut.write(out.toByteArray()); - fileOut.close(); - - - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/osgi/PropertyShouldSpecifySRTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/osgi/PropertyShouldSpecifySRTestCase.java deleted file mode 100644 index 117a94337a..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/osgi/PropertyShouldSpecifySRTestCase.java +++ /dev/null @@ -1,64 +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 impl.osgi; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; -import org.apache.tuscany.sca.osgi.runtime.OSGiRuntime; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class PropertyShouldSpecifySRTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - @Override - protected void setUp() throws Exception - { - OSGiTestBundles.createBundle("src/main/resources/impl/osgi/PropertyShouldSpecifySR/OSGiTestService.jar", OSGiTestInterface.class, OSGiTestImpl.class); - - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/osgi/PropertyShouldSpecifySR/osgitest.composite", - "TestContribution", "src/main/resources/impl/osgi/PropertyShouldSpecifySR/"); - } catch (Exception ex){ - //throw ex; - } - } - - @Override - protected void tearDown() throws Exception { - //nothing to do - OSGiRuntime.stop(); - } - - public void testCalculator() { - Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); - - assertNotNull(problem); - assertEquals("PropertyShouldSpecifySR", problem.getMessageId()); - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/resource/CouldNotResolveLocationTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/resource/CouldNotResolveLocationTestCase.java deleted file mode 100644 index 14ba8e992e..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/resource/CouldNotResolveLocationTestCase.java +++ /dev/null @@ -1,59 +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 impl.resource; - -import junit.framework.Assert; -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class CouldNotResolveLocationTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - protected void setUp() throws Exception - { - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/resource/CouldNotResolveLocation/resource.composite", - "TestContribution", "src/main/resources/impl/resource/CouldNotResolveLocation/"); - } catch (Exception ex){ - //throw ex; - } - } - - protected void tearDown() throws Exception { - //nothing to do - } - - public void testCalculator() { - Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); - - Assert.assertNotNull(problem); - Assert.assertEquals("CouldNotResolveLocation", problem.getMessageId()); - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/resource/LocationAttributeMissingTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/resource/LocationAttributeMissingTestCase.java deleted file mode 100644 index 461895f824..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/resource/LocationAttributeMissingTestCase.java +++ /dev/null @@ -1,60 +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 impl.resource; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class LocationAttributeMissingTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - @Override - protected void setUp() throws Exception - { - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/resource/LocationAttributeMissing/resource.composite", - "TestContribution", "src/main/resources/impl/resource/LocationAttributeMissing/"); - } catch (Exception ex){ - //throw ex; - } - } - - @Override - protected void tearDown() throws Exception { - //nothing to do - } - - public void testCalculator() { - Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); - - assertNotNull(problem); - assertEquals("LocationAttributeMissing", problem.getMessageId()); - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/spring/ContributionResolveExceptionTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/spring/ContributionResolveExceptionTestCase.java deleted file mode 100644 index 9b7dbef3dd..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/spring/ContributionResolveExceptionTestCase.java +++ /dev/null @@ -1,57 +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 impl.spring; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class ContributionResolveExceptionTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - @Override - protected void setUp() throws Exception - { - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/spring/ContributionResolveException/SpringHelloWorld.composite", - "TestContribution", "src/main/resources/impl/spring/ContributionResolveException/"); - } catch (Exception ex){ - //throw ex; - } - } - - @Override - protected void tearDown() throws Exception { - //node.stop(); - } - - public void testCalculator() { - Monitor monitor = customDomain.getMonitorInstance(); - assertTrue(((DefaultLoggingMonitorImpl)monitor).isMessageLogged("ContributionResolveException")); - //assertEquals("ContributionResolveException", problem.getMessageId()); - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/spring/LocationAttributeMissingTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/spring/LocationAttributeMissingTestCase.java deleted file mode 100644 index cd38b53f66..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/spring/LocationAttributeMissingTestCase.java +++ /dev/null @@ -1,60 +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 impl.spring; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class LocationAttributeMissingTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - @Override - protected void setUp() throws Exception - { - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/spring/LocationAttributeMissing/SpringHelloWorld.composite", - "TestContribution", "src/main/resources/impl/spring/LocationAttributeMissing/"); - } 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("LocationAttributeMissing", problem.getMessageId()); - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/spring/UnableToResolveComponentTypeTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/spring/UnableToResolveComponentTypeTestCase.java deleted file mode 100644 index 83550ae58d..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/spring/UnableToResolveComponentTypeTestCase.java +++ /dev/null @@ -1,60 +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 impl.spring; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class UnableToResolveComponentTypeTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - @Override - protected void setUp() throws Exception - { - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/spring/UnableToResolveComponentType/SpringHelloWorld.composite", - "TestContribution", "src/main/resources/impl/spring/UnableToResolveComponentType/"); - } 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("UnableToResolveComponentType", problem.getMessageId()); - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/widget/CouldNotResolveLocationTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/widget/CouldNotResolveLocationTestCase.java deleted file mode 100644 index d098bb4bf8..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/widget/CouldNotResolveLocationTestCase.java +++ /dev/null @@ -1,59 +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 impl.widget; - -import junit.framework.Assert; -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class CouldNotResolveLocationTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - protected void setUp() throws Exception - { - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/widget/CouldNotResolveLocation/widget.composite", - "TestContribution", "src/main/resources/impl/widget/CouldNotResolveLocation/"); - } catch (Exception ex){ - //throw ex; - } - } - - protected void tearDown() throws Exception { - //nothing to do - } - - public void testCalculator() { - Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); - - Assert.assertNotNull(problem); - Assert.assertEquals("CouldNotResolveLocation", problem.getMessageId()); - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/widget/LocationAttributeMissingTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/widget/LocationAttributeMissingTestCase.java deleted file mode 100644 index 2f85d8ed4a..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/widget/LocationAttributeMissingTestCase.java +++ /dev/null @@ -1,60 +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 impl.widget; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class LocationAttributeMissingTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - @Override - protected void setUp() throws Exception - { - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/widget/LocationAttributeMissing/widget.composite", - "TestContribution", "src/main/resources/impl/widget/LocationAttributeMissing/"); - } catch (Exception ex){ - //throw ex; - } - } - - @Override - protected void tearDown() throws Exception { - //nothing to do - } - - public void testCalculator() { - Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); - - assertNotNull(problem); - assertEquals("LocationAttributeMissing", problem.getMessageId()); - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/xquery/CouldNotLocateFileTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/xquery/CouldNotLocateFileTestCase.java deleted file mode 100644 index f90fc3b83f..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/xquery/CouldNotLocateFileTestCase.java +++ /dev/null @@ -1,60 +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 impl.xquery; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class CouldNotLocateFileTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - @Override - protected void setUp() throws Exception - { - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/xquery/CouldNotLocateFile/HelloWorld.composite", - "TestContribution", "src/main/resources/impl/xquery/CouldNotLocateFile/"); - } 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("CouldNotLocateFile", problem.getMessageId()); - } -} diff --git a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/xquery/LocationAttributeMissingTestCase.java b/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/xquery/LocationAttributeMissingTestCase.java deleted file mode 100644 index 01450a8836..0000000000 --- a/branches/sca-java-1.3.1/itest/validation/src/test/java/impl/xquery/LocationAttributeMissingTestCase.java +++ /dev/null @@ -1,60 +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 impl.xquery; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; - -import domain.CustomCompositeBuilder; - -/** - * This shows how to test the Calculator service component. - */ -public class LocationAttributeMissingTestCase extends TestCase { - - private CustomCompositeBuilder customDomain; - - @Override - protected void setUp() throws Exception - { - customDomain = CustomCompositeBuilder.getInstance(); - try { - customDomain.loadContribution("src/main/resources/impl/xquery/LocationAttributeMissing/HelloWorld.composite", - "TestContribution", "src/main/resources/impl/xquery/LocationAttributeMissing/"); - } 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("LocationAttributeMissing", problem.getMessageId()); - } -} |