You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2011/03/21 09:13:29 UTC

svn commit: r1083697 - in /camel/trunk/components/camel-spring/src/test: java/org/apache/camel/spring/processor/onexception/ resources/org/apache/camel/spring/processor/onexception/

Author: ningjiang
Date: Mon Mar 21 08:13:29 2011
New Revision: 1083697

URL: http://svn.apache.org/viewvc?rev=1083697&view=rev
Log:
CAMEL-3791,CAMLE-3792 Added tests in camel-spring

Added:
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalMessageTest.java   (with props)
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalMessageTest.xml   (with props)

Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalMessageTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalMessageTest.java?rev=1083697&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalMessageTest.java (added)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalMessageTest.java Mon Mar 21 08:13:29 2011
@@ -0,0 +1,34 @@
+/**
+ * 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 org.apache.camel.spring.processor.onexception;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.processor.OnExceptionContinueToRouteTest;
+import org.apache.camel.processor.onexception.OnExceptionUseOriginalMessageTest;
+
+import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
+
+/**
+ * @version 
+ */
+public class SpringOnExceptionUseOriginalMessageTest extends OnExceptionUseOriginalMessageTest {
+
+    protected CamelContext createCamelContext() throws Exception {
+        return createSpringCamelContext(this, "org/apache/camel/spring/processor/OnExceptionUseOriginalMessageTest.xml");
+    }
+
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalMessageTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalMessageTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalMessageTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalMessageTest.xml?rev=1083697&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalMessageTest.xml (added)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalMessageTest.xml Mon Mar 21 08:13:29 2011
@@ -0,0 +1,51 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+    ">
+
+   
+
+    <bean id="proc" class="org.apache.camel.processor.onexception.OnExceptionUseOriginalMessageTest$MyProcessor"/>
+ 
+    <camelContext xmlns="http://camel.apache.org/schema/spring">
+
+        <onException useOriginalMessage="true">
+            <exception>java.lang.IllegalArgumentException</exception>
+            <handled><constant>true</constant></handled>
+            <to uri="sead:test"/>
+        </onException>
+
+        <route>
+            <from uri="direct:a"/>
+            <inOut/>
+            <process ref="proc"/>
+        </route>
+
+        <route>
+            <from uri="sead:test"/>
+            <to uri="mock:middle" />
+            <to uri="mock:end" />
+        </route>
+
+    </camelContext>
+
+</beans>

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalMessageTest.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalMessageTest.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalMessageTest.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml