splitter: 1.2.0 - Introduced `TestWord.of(..)`
authorKai Moritz <kai@juplo.de>
Sun, 2 Jun 2024 15:28:55 +0000 (17:28 +0200)
committerKai Moritz <kai@juplo.de>
Mon, 3 Jun 2024 07:34:40 +0000 (09:34 +0200)
src/test/java/de/juplo/kafka/wordcount/counter/TestWord.java
src/test/java/de/juplo/kafka/wordcount/splitter/TestData.java

index f2c2447..0453671 100644 (file)
@@ -7,7 +7,7 @@ import lombok.NoArgsConstructor;
 
 @Data
 @NoArgsConstructor
-@AllArgsConstructor
+@AllArgsConstructor(staticName = "of")
 public class TestWord
 {
   String user;
index 00ea4c4..89cebaa 100644 (file)
@@ -48,38 +48,38 @@ public class TestData
        static Stream<KeyValue<String, TestWord>> expectedMessages = Stream.of(
                        KeyValue.pair(
                                        "peter",
-                                       new TestWord("peter", "Hallo")),
+                                       TestWord.of("peter", "Hallo")),
                        KeyValue.pair(
                                        "peter",
-                                       new TestWord("peter", "Welt")),
+                                       TestWord.of("peter", "Welt")),
                        KeyValue.pair(
                                        "klaus",
-                                       new TestWord("klaus", "Müsch")),
+                                       TestWord.of("klaus", "Müsch")),
                        KeyValue.pair(
                                        "klaus",
-                                       new TestWord("klaus", "gäb")),
+                                       TestWord.of("klaus", "gäb")),
                        KeyValue.pair(
                                        "klaus",
-                                       new TestWord("klaus", "s")),
+                                       TestWord.of("klaus", "s")),
                        KeyValue.pair(
                                        "klaus",
-                                       new TestWord("klaus", "auch")),
+                                       TestWord.of("klaus", "auch")),
                        KeyValue.pair(
                                        "peter",
-                                       new TestWord("peter", "Boäh")),
+                                       TestWord.of("peter", "Boäh")),
                        KeyValue.pair(
                                        "peter",
-                                       new TestWord("peter", "echt")),
+                                       TestWord.of("peter", "echt")),
                        KeyValue.pair(
                                        "peter",
-                                       new TestWord("peter", "ß")),
+                                       TestWord.of("peter", "ß")),
                        KeyValue.pair(
                                        "peter",
-                                       new TestWord("peter", "mal")),
+                                       TestWord.of("peter", "mal")),
                        KeyValue.pair(
                                        "peter",
-                                       new TestWord("peter", "nä")),
+                                       TestWord.of("peter", "nä")),
                        KeyValue.pair(
                                        "peter",
-                                       new TestWord("peter", "Nümmäh")));
+                                       TestWord.of("peter", "Nümmäh")));
 }