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

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

commit 77b79c25ceb81314289d2bc64e85acd9d8259e2b
Author: Guillaume Nodet <[email protected]>
AuthorDate: Tue Jun 23 16:14:09 2020 +0200

    [CAMEL-11807] Upgrade camel-chatscript to junit5
---
 components/camel-chatscript/pom.xml                |  2 +-
 .../camel/component/ChatScriptComponentTest.java   | 32 +++++++++++-----------
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/components/camel-chatscript/pom.xml 
b/components/camel-chatscript/pom.xml
index f0cdf05..8bc98e7 100644
--- a/components/camel-chatscript/pom.xml
+++ b/components/camel-chatscript/pom.xml
@@ -43,7 +43,7 @@
         <!-- for testing -->
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test</artifactId>
+            <artifactId>camel-test-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <!-- logging -->
diff --git 
a/components/camel-chatscript/src/test/java/org/apache/camel/component/ChatScriptComponentTest.java
 
b/components/camel-chatscript/src/test/java/org/apache/camel/component/ChatScriptComponentTest.java
index 7ebea21..1f114ef 100644
--- 
a/components/camel-chatscript/src/test/java/org/apache/camel/component/ChatScriptComponentTest.java
+++ 
b/components/camel-chatscript/src/test/java/org/apache/camel/component/ChatScriptComponentTest.java
@@ -22,15 +22,15 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.chatscript.ChatScriptMessage;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.model.language.SimpleExpression;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
 
 public class ChatScriptComponentTest extends CamelTestSupport {
 
     @Test
     public void testChatScript() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
-        mock.expectedMinimumMessageCount(1);       
+        mock.expectedMinimumMessageCount(1);
         Thread.sleep(100);
         assertMockEndpointsSatisfied();
     }
@@ -47,22 +47,22 @@ public class ChatScriptComponentTest extends 
CamelTestSupport {
                 String rq2 = "";
                 String rq3 = "";
                 try {
-                        rq = new ObjectMapper().writeValueAsString(rqMsg);
-                        rq2 = new ObjectMapper().writeValueAsString(rq2Msg);
-                        rq3 = new ObjectMapper().writeValueAsString(rq3Msg);
+                    rq = new ObjectMapper().writeValueAsString(rqMsg);
+                    rq2 = new ObjectMapper().writeValueAsString(rq2Msg);
+                    rq3 = new ObjectMapper().writeValueAsString(rq3Msg);
                 } catch (JsonProcessingException e) {
-                        e.printStackTrace();
+                    e.printStackTrace();
                 }
                 from("timer://foo?repeatCount=1")
-                .setBody(new SimpleExpression(rq))
-                .to("chatscript://localhost:1024/Harry?resetchat=true")
-                .log("Response 2 = ${body}")
-                .setBody(new SimpleExpression(rq2))
-                .to("chatscript://localhost:1024/Harry")
-                .log("Response 3 = ${body}")
-                .setBody(new SimpleExpression(rq3))
-                .to("chatscript://localhost:1024/Harry")
-                .log("Response 4 = ${body}")
+                    .setBody(new SimpleExpression(rq))
+                    .to("chatscript://localhost:1024/Harry?resetchat=true")
+                    .log("Response 2 = ${body}")
+                    .setBody(new SimpleExpression(rq2))
+                    .to("chatscript://localhost:1024/Harry")
+                    .log("Response 3 = ${body}")
+                    .setBody(new SimpleExpression(rq3))
+                    .to("chatscript://localhost:1024/Harry")
+                    .log("Response 4 = ${body}")
                     .to("mock:result");
             }
         };

Reply via email to