From d601dd983c9e3d74af1e408565952ef7da6af656 Mon Sep 17 00:00:00 2001 From: antelder Date: Thu, 7 Aug 2008 08:43:53 +0000 Subject: Apply patch from Ramkumar Ramalingam for TUSCANY-2532: Test case failure in itest/validation DoesntProcessHeadersTestCase git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@683553 13f79535-47bb-0310-9956-ffa450edef68 --- .../InvalidJMSDeliveryMode/service.composite | 36 +++++++++++++ .../InvalidJMSPriority/service.composite | 36 +++++++++++++ .../MissingComponentTypeFile/OSGiTestService.jar | Bin 1325 -> 1325 bytes .../PropertyShouldSpecifySR/OSGiTestService.jar | Bin 1325 -> 1325 bytes .../jms/InvalidJMSDeliveryModeTestCase.java | 60 +++++++++++++++++++++ .../binding/jms/InvalidJMSPriorityTestCase.java | 60 +++++++++++++++++++++ 6 files changed, 192 insertions(+) create mode 100644 java/sca/itest/validation/src/main/resources/bindingjms/InvalidJMSDeliveryMode/service.composite create mode 100644 java/sca/itest/validation/src/main/resources/bindingjms/InvalidJMSPriority/service.composite create mode 100644 java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java create mode 100644 java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java diff --git a/java/sca/itest/validation/src/main/resources/bindingjms/InvalidJMSDeliveryMode/service.composite b/java/sca/itest/validation/src/main/resources/bindingjms/InvalidJMSDeliveryMode/service.composite new file mode 100644 index 0000000000..145aea9fbc --- /dev/null +++ b/java/sca/itest/validation/src/main/resources/bindingjms/InvalidJMSDeliveryMode/service.composite @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + diff --git a/java/sca/itest/validation/src/main/resources/bindingjms/InvalidJMSPriority/service.composite b/java/sca/itest/validation/src/main/resources/bindingjms/InvalidJMSPriority/service.composite new file mode 100644 index 0000000000..c52da84a0c --- /dev/null +++ b/java/sca/itest/validation/src/main/resources/bindingjms/InvalidJMSPriority/service.composite @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + diff --git a/java/sca/itest/validation/src/main/resources/impl/osgi/MissingComponentTypeFile/OSGiTestService.jar b/java/sca/itest/validation/src/main/resources/impl/osgi/MissingComponentTypeFile/OSGiTestService.jar index 94a99a787b..69dc459ad3 100644 Binary files a/java/sca/itest/validation/src/main/resources/impl/osgi/MissingComponentTypeFile/OSGiTestService.jar and b/java/sca/itest/validation/src/main/resources/impl/osgi/MissingComponentTypeFile/OSGiTestService.jar differ diff --git a/java/sca/itest/validation/src/main/resources/impl/osgi/PropertyShouldSpecifySR/OSGiTestService.jar b/java/sca/itest/validation/src/main/resources/impl/osgi/PropertyShouldSpecifySR/OSGiTestService.jar index df69e5a8c2..5471ffc02a 100644 Binary files a/java/sca/itest/validation/src/main/resources/impl/osgi/PropertyShouldSpecifySR/OSGiTestService.jar and b/java/sca/itest/validation/src/main/resources/impl/osgi/PropertyShouldSpecifySR/OSGiTestService.jar differ diff --git a/java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java new file mode 100644 index 0000000000..52dc7e5795 --- /dev/null +++ b/java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java @@ -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.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.logging.impl.DefaultLoggingMonitorImpl; + +import domain.CustomCompositeBuilder; + +/** + * This shows how to test the Calculator service component. + */ +public class InvalidJMSDeliveryModeTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/bindingjms/InvalidJMSDeliveryMode/service.composite", + "TestContribution", "src/main/resources/bindingjms/InvalidJMSDeliveryMode/"); + } 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("InvalidJMSDeliveryMode", problem.getMessageId()); + } +} diff --git a/java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java new file mode 100644 index 0000000000..a93df290c3 --- /dev/null +++ b/java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java @@ -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.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.logging.impl.DefaultLoggingMonitorImpl; + +import domain.CustomCompositeBuilder; + +/** + * This shows how to test the Calculator service component. + */ +public class InvalidJMSPriorityTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/bindingjms/InvalidJMSPriority/service.composite", + "TestContribution", "src/main/resources/bindingjms/InvalidJMSPriority/"); + } 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("InvalidJMSPriority", problem.getMessageId()); + } +} -- cgit v1.2.3