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

fanningpj pushed a commit to branch main
in repository 
https://gitbox.apache.org/repos/asf/incubator-pekko-connectors-samples.git


The following commit(s) were added to refs/heads/main by this push:
     new 5a4ee85  use junit assertEquals
5a4ee85 is described below

commit 5a4ee8510068a6115200c970441921becdba562f
Author: PJ Fanning <[email protected]>
AuthorDate: Mon Dec 18 09:06:16 2023 +0100

    use junit assertEquals
---
 .../src/test/java/samples/javadsl/MainTest.java                   | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/pekko-connectors-sample-kafka-to-websocket-clients/src/test/java/samples/javadsl/MainTest.java
 
b/pekko-connectors-sample-kafka-to-websocket-clients/src/test/java/samples/javadsl/MainTest.java
index 0d7c49c..517fcbd 100644
--- 
a/pekko-connectors-sample-kafka-to-websocket-clients/src/test/java/samples/javadsl/MainTest.java
+++ 
b/pekko-connectors-sample-kafka-to-websocket-clients/src/test/java/samples/javadsl/MainTest.java
@@ -21,6 +21,8 @@ import java.util.concurrent.TimeUnit;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import static org.junit.Assert.assertEquals;
+
 public class MainTest {
 
   static ActorSystem system;
@@ -54,7 +56,7 @@ public class MainTest {
         .runWith(Sink.seq(), system);
     final List<String> result = future.toCompletableFuture().get(3, 
TimeUnit.SECONDS);
 
-    assert (result.size() == messages.size());
+    assertEquals(messages.size(), result.size());
 
     final Pattern pattern = Pattern.compile("index: \\d+, message: (.*)");
     Streams.zip(
@@ -66,8 +68,8 @@ public class MainTest {
           String resultMessage = pair.second();
           Matcher matcher = pattern.matcher(resultMessage);
           assertTrue(matcher.find());
-          assert (matcher.groupCount() == 1);
-          assert (matcher.group(1).equals(message));
+          assertEquals(1, matcher.groupCount());
+          assertEquals(message, matcher.group(1));
         });
   }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to