This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch endpoint-dsl
in repository https://gitbox.apache.org/repos/asf/camel.git

commit bcaa3ce64d9f1a5fd2ee9fcb154c7a2682c9979e
Author: Guillaume Nodet <gno...@gmail.com>
AuthorDate: Thu Jun 6 11:57:44 2019 +0200

    Working test case
---
 .../apache/camel/component/file/FileConsumeCharsetTest.java   | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git 
a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeCharsetTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeCharsetTest.java
index 8654566..c8e7d45 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeCharsetTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeCharsetTest.java
@@ -54,10 +54,17 @@ public class FileConsumeCharsetTest extends 
ContextTestSupport {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                
from("file://target/data/files/?initialDelay=0&delay=10&fileName=report.txt&delete=true&charset=UTF-8")
+                
from(file("target/data/files/").initialDelay(0).delay(10).fileName(constant("report.txt")).delete(true).charset("UTF-8"))
                     .convertBodyTo(String.class)
-                    .to("mock:result");
+                    .to(mock("result"));
             }
         };
     }
+
+    static org.apache.camel.model.endpoint.FileEndpoint.FileConsumer 
file(String path) {
+        return new 
org.apache.camel.model.endpoint.FileEndpoint.FileConsumer(path);
+    }
+    static org.apache.camel.model.endpoint.MockEndpoint.MockProducer 
mock(String name) {
+        return new 
org.apache.camel.model.endpoint.MockEndpoint.MockProducer(name);
+    }
 }

Reply via email to