camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1333074 - /camel/trunk/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java
Date Wed, 02 May 2012 15:15:12 GMT
Author: davsclaus
Date: Wed May  2 15:15:11 2012
New Revision: 1333074

URL: http://svn.apache.org/viewvc?rev=1333074&view=rev
Log:
Added test based on user forum issue

Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java?rev=1333074&r1=1333073&r2=1333074&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java
Wed May  2 15:15:11 2012
@@ -1057,6 +1057,14 @@ public class SimpleTest extends Language
         assertExpression("${body.toLowerCase().length()}", 5);
     }
 
+    public void testBodyOgnlOnStringWithOgnlParams() throws Exception {
+        exchange.getIn().setBody("Camel");
+        exchange.getIn().setHeader("max", 4);
+        exchange.getIn().setHeader("min", 2);
+
+        assertExpression("${body.substring(${header.min}, ${header.max})}", "me");
+    }
+
     public void testClassSimpleName() throws Exception {
         Animal tiger = new Animal("Tony the Tiger", 13);
         exchange.getIn().setBody(tiger);



Mime
View raw message