camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [2/3] camel git commit: Added an unit test to show how to set the + to the exec args option
Date Wed, 18 Mar 2015 01:53:27 GMT
Added an unit test to show how to set the + to the exec args option


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

Branch: refs/heads/master
Commit: 94cb100faa1e5d57f614f89b1384bedc7d29aab1
Parents: e7fde37
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Wed Mar 18 09:52:19 2015 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Wed Mar 18 09:53:00 2015 +0800

----------------------------------------------------------------------
 .../apache/camel/component/exec/ExecEndpointTest.java    | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/94cb100f/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecEndpointTest.java
----------------------------------------------------------------------
diff --git a/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecEndpointTest.java
b/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecEndpointTest.java
index ebd4cfc..5a8f380 100644
--- a/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecEndpointTest.java
+++ b/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecEndpointTest.java
@@ -106,7 +106,7 @@ public class ExecEndpointTest extends AbstractJUnit4SpringContextTests
{
         ExecEndpoint e = createExecEndpoint("exec:test?args=" + args.replaceAll(" ", "+"));
         assertEquals(args, e.getArgs());
     }
-
+    
     @Test
     @DirtiesContext
     public void testCreateEndpointWithArgs2() throws Exception {
@@ -114,6 +114,15 @@ public class ExecEndpointTest extends AbstractJUnit4SpringContextTests
{
         ExecEndpoint e = createExecEndpoint("exec:test?args=" + UnsafeUriCharactersEncoder.encode(args));
         assertEquals(args, e.getArgs());
     }
+    
+    @Test
+    @DirtiesContext
+    public void testCreateEndpointWithArgs3() throws Exception {
+        String args = "RAW(arg1+arg2 arg3)";
+        // Just avoid URI encoding by using the RAW()
+        ExecEndpoint e = createExecEndpoint("exec:test?args=" + args);
+        assertEquals("arg1+arg2 arg3", e.getArgs());
+    }
 
     @Test
     @DirtiesContext


Mime
View raw message