camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/5] git commit: CAMEL-7155 Fixed the issue of StringHelper
Date Tue, 18 Feb 2014 17:36:00 GMT
CAMEL-7155 Fixed the issue of StringHelper


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/fdf9871f
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/fdf9871f
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/fdf9871f

Branch: refs/heads/master
Commit: fdf9871fbd3101e6c2ac77c99a49e233f6b2d748
Parents: 80c7935
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Tue Feb 18 18:19:35 2014 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue Feb 18 18:19:35 2014 +0100

----------------------------------------------------------------------
 .../src/test/java/org/apache/camel/util/StringHelperTest.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/fdf9871f/camel-core/src/test/java/org/apache/camel/util/StringHelperTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/util/StringHelperTest.java b/camel-core/src/test/java/org/apache/camel/util/StringHelperTest.java
index 2618e94..e9c5ed2 100644
--- a/camel-core/src/test/java/org/apache/camel/util/StringHelperTest.java
+++ b/camel-core/src/test/java/org/apache/camel/util/StringHelperTest.java
@@ -87,12 +87,13 @@ public class StringHelperTest extends TestCase {
         assertEquals(false, StringHelper.hasStartToken("Hello World", null));
         assertEquals(false, StringHelper.hasStartToken("Hello World", "simple"));
 
-        assertEquals(true, StringHelper.hasStartToken("${body}", null));
+        assertEquals(false, StringHelper.hasStartToken("${body}", null));
         assertEquals(true, StringHelper.hasStartToken("${body}", "simple"));
         assertEquals(true, StringHelper.hasStartToken("$simple{body}", "simple"));
 
-        assertEquals(true, StringHelper.hasStartToken("${body}", null));
-        assertEquals(true, StringHelper.hasStartToken("${body}", "foo"));
+        assertEquals(false, StringHelper.hasStartToken("${body}", null));
+        assertEquals(false, StringHelper.hasStartToken("${body}", "foo"));
+        // $foo{ is valid because its foo language
         assertEquals(true, StringHelper.hasStartToken("$foo{body}", "foo"));
     }
     


Mime
View raw message