camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jans...@apache.org
Subject svn commit: r755341 - in /camel/trunk: camel-core/src/test/java/org/apache/camel/processor/NormalizerTest.java components/camel-spring/src/test/resources/org/apache/camel/spring/processor/normalizer.xml
Date Tue, 17 Mar 2009 18:34:07 GMT
Author: janstey
Date: Tue Mar 17 18:34:06 2009
New Revision: 755341

URL: http://svn.apache.org/viewvc?rev=755341&view=rev
Log:
Make the normalizer example look a bit nicer

Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/NormalizerTest.java
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/normalizer.xml

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/NormalizerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/NormalizerTest.java?rev=755341&r1=755340&r2=755341&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/NormalizerTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/NormalizerTest.java Tue
Mar 17 18:34:06 2009
@@ -18,15 +18,10 @@
 
 import javax.naming.Context;
 
-import org.apache.camel.Body;
 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;
-import org.apache.camel.language.XPath;
 import org.apache.camel.util.jndi.JndiContext;
-import static org.apache.camel.component.mock.MockEndpoint.expectsMessageCount;
 
 public class NormalizerTest extends ContextTestSupport {
    
@@ -64,9 +59,12 @@
             public void configure() {
                 // START SNIPPET: example                
                 // we need to normalize two types of incoming messages
-                from("direct:start").choice()
-                  .when().xpath("/employee").to("bean:normalizer?method=employeeToPerson").to("mock:result")
-                  .when().xpath("/customer").to("bean:normalizer?method=customerToPerson").to("mock:result");
              
+                from("direct:start")
+                  .choice()
+                    .when().xpath("/employee").to("bean:normalizer?method=employeeToPerson")
+                    .when().xpath("/customer").to("bean:normalizer?method=customerToPerson")
+                  .end()
+                  .to("mock:result");               
                 // END SNIPPET: example
             }
         };

Modified: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/normalizer.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/normalizer.xml?rev=755341&r1=755340&r2=755341&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/normalizer.xml
(original)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/normalizer.xml
Tue Mar 17 18:34:06 2009
@@ -30,14 +30,13 @@
         <when>
           <xpath>/employee</xpath>
           <to uri="bean:normalizer?method=employeeToPerson"/>
-          <to uri="mock:result"/>
         </when>
         <when>
           <xpath>/customer</xpath>
           <to uri="bean:normalizer?method=customerToPerson"/>
-          <to uri="mock:result"/>
         </when>
       </choice>
+      <to uri="mock:result"/>
     </route> 
   </camelContext>
 



Mime
View raw message