summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2008-08-07 08:43:53 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2008-08-07 08:43:53 +0000
commitd601dd983c9e3d74af1e408565952ef7da6af656 (patch)
tree920697042a42e15f6c5a57218c66053706ee2268 /java
parent317553ec8c18237b5705de626d4a16677ac31452 (diff)
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
Diffstat (limited to '')
-rw-r--r--java/sca/itest/validation/src/main/resources/bindingjms/InvalidJMSDeliveryMode/service.composite36
-rw-r--r--java/sca/itest/validation/src/main/resources/bindingjms/InvalidJMSPriority/service.composite36
-rw-r--r--java/sca/itest/validation/src/main/resources/impl/osgi/MissingComponentTypeFile/OSGiTestService.jarbin1325 -> 1325 bytes
-rw-r--r--java/sca/itest/validation/src/main/resources/impl/osgi/PropertyShouldSpecifySR/OSGiTestService.jarbin1325 -> 1325 bytes
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java60
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java60
6 files changed, 192 insertions, 0 deletions
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ name="RPCComposite">
+
+ <component name="HelloWorldService">
+ <implementation.java class="binding.jms.HelloWorldServiceImpl"/>
+ <service name="HelloWorldService">
+ <binding.jms initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory" jndiURL="tcp://localhost:61616">
+ <destination name="DestQueueA" create="always"/>
+ <response>
+ <destination name="RespQueueA" create="always"/>
+ </response>
+ <headers JMSType="jms" JMSDeliveryMode="NON_PERSISTENTS" JMSPriority="8"/>
+ </binding.jms>
+ </service>
+ </component>
+
+</composite>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ name="RPCComposite">
+
+ <component name="HelloWorldService">
+ <implementation.java class="binding.jms.HelloWorldServiceImpl"/>
+ <service name="HelloWorldService">
+ <binding.jms initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory" jndiURL="tcp://localhost:61616">
+ <destination name="DestQueueA" create="always"/>
+ <response>
+ <destination name="RespQueueA" create="always"/>
+ </response>
+ <headers JMSType="jms" JMSDeliveryMode="NON_PERSISTENT" JMSPriority="20"/>
+ </binding.jms>
+ </service>
+ </component>
+
+</composite>
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
--- 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
Binary files 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
--- 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
Binary files 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());
+ }
+}