camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1095348 - /camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerLetterTest.java
Date Wed, 20 Apr 2011 10:24:58 GMT
Author: davsclaus
Date: Wed Apr 20 10:24:58 2011
New Revision: 1095348

URL: http://svn.apache.org/viewvc?rev=1095348&view=rev
Log:
CAMEL-3882: Polished freemarker example. Thanks to Fernando for patch.

Modified:
    camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerLetterTest.java

Modified: camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerLetterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerLetterTest.java?rev=1095348&r1=1095347&r2=1095348&view=diff
==============================================================================
--- camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerLetterTest.java
(original)
+++ camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerLetterTest.java
Wed Apr 20 10:24:58 2011
@@ -31,11 +31,13 @@ public class FreemarkerLetterTest extend
     // START SNIPPET: e1
     private Exchange createLetter() {
         Exchange exchange = context.getEndpoint("direct:a").createExchange();
+
         Message msg = exchange.getIn();
         msg.setHeader("firstName", "Claus");
         msg.setHeader("lastName", "Ibsen");
         msg.setHeader("item", "Camel in Action");
         msg.setBody("PS: Next beer is on me, James");
+
         return exchange;
     }
 
@@ -43,7 +45,8 @@ public class FreemarkerLetterTest extend
     public void testFreemarkerLetter() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMessageCount(1);
-        mock.expectedBodiesReceived("Dear Ibsen, Claus\n\nThanks for the order of Camel in
Action.\n\nRegards Camel Riders Bookstore\nPS: Next beer is on me, James");
+        mock.expectedBodiesReceived("Dear Ibsen, Claus\n\nThanks for the order of Camel in
Action."
+                + "\n\nRegards Camel Riders Bookstore\nPS: Next beer is on me, James");
 
         template.send("direct:a", createLetter());
 
@@ -53,7 +56,9 @@ public class FreemarkerLetterTest extend
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("direct:a").to("freemarker:org/apache/camel/component/freemarker/letter.ftl").to("mock:result");
+                from("direct:a")
+                    .to("freemarker:org/apache/camel/component/freemarker/letter.ftl")
+                    .to("mock:result");
             }
         };
     }



Mime
View raw message