camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1143277 - in /camel/trunk/camel-core/src/test/java/org/apache/camel: model/ processor/onexception/
Date Wed, 06 Jul 2011 07:31:05 GMT
Author: davsclaus
Date: Wed Jul  6 07:31:05 2011
New Revision: 1143277

URL: http://svn.apache.org/viewvc?rev=1143277&view=rev
Log:
CAMEL-4167: Reverted changes in unit tests that was a mistake

Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/model/LoadRouteFromXmlTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueSubRouteTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionHandleAndTransformWithDefaultErrorHandlerTest.java

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/model/LoadRouteFromXmlTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/model/LoadRouteFromXmlTest.java?rev=1143277&r1=1143276&r2=1143277&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/model/LoadRouteFromXmlTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/model/LoadRouteFromXmlTest.java
Wed Jul  6 07:31:05 2011
@@ -19,8 +19,6 @@ package org.apache.camel.model;
 import java.io.InputStream;
 
 import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueSubRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueSubRouteTest.java?rev=1143277&r1=1143276&r2=1143277&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueSubRouteTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueSubRouteTest.java
Wed Jul  6 07:31:05 2011
@@ -46,17 +46,15 @@ public class OnExceptionContinueSubRoute
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                //onException(IllegalArgumentException.class).continued(true).logContinued(true);
+                onException(IllegalArgumentException.class).continued(true).logContinued(true);
 
                 from("direct:start")
-                    .onException(IllegalArgumentException.class).continued(true).logContinued(true).end()
                     .to("mock:start")
                     .to("direct:b")
                     .to("direct:c")
                     .to("mock:result");
 
                 from("direct:b")
-                    .errorHandler(noErrorHandler())
                     .to("mock:b")
                     .throwException(new IllegalArgumentException("Forced"));
 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionHandleAndTransformWithDefaultErrorHandlerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionHandleAndTransformWithDefaultErrorHandlerTest.java?rev=1143277&r1=1143276&r2=1143277&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionHandleAndTransformWithDefaultErrorHandlerTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionHandleAndTransformWithDefaultErrorHandlerTest.java
Wed Jul  6 07:31:05 2011
@@ -17,11 +17,9 @@
 package org.apache.camel.processor.onexception;
 
 import org.apache.camel.ContextTestSupport;
-import org.apache.camel.EndpointInject;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
 
 /**
  * Unit test inspired by end user
@@ -85,28 +83,19 @@ public class OnExceptionHandleAndTransfo
                 // but we want to return a fixed text response, so we transform OUT body
and return a nice message
                 // using the simple language where we want insert the exception message
                 onException(MyFunctionalException.class)
-                        .handled(false)
+                        .handled(true)
                         .transform().simple("Error reported: ${exception.message} - cannot
process this message.");
                 // END SNIPPET: e3
 
                 from("direct:start").process(new Processor() {
                     public void process(Exchange exchange) throws Exception {
                         throw new MyFunctionalException("Out of order");
-
                     }
                 });
             }
         });
 
-
-        Exchange exch = template.request("direct:start", new Processor() {
-            public void process(Exchange exchange) {
-                exchange.getIn().setBody("Hello World");
-            }
-        });
-
-        // Object out = template.requestBody("direct:start", "Hello World");
-        Object out = exch.getOut().getBody();
+        Object out = template.requestBody("direct:start", "Hello World");
         assertEquals("Error reported: Out of order - cannot process this message.", out);
     }
 



Mime
View raw message