query: 2.1.2 - Refined tests (added messages, that are filtered) query
authorKai Moritz <kai@juplo.de>
Tue, 25 Jun 2024 05:08:32 +0000 (07:08 +0200)
committerKai Moritz <kai@juplo.de>
Tue, 25 Jun 2024 05:08:37 +0000 (07:08 +0200)
src/test/java/de/juplo/kafka/wordcount/query/TestData.java

index 44162a0..7c71312 100644 (file)
@@ -18,6 +18,7 @@ class TestData
 {
        static final TestUser PETER = TestUser.of(STATS_TYPE, "peter");
        static final TestUser KLAUS = TestUser.of(STATS_TYPE, "klaus");
+       static final TestUser OTHER_CHANNEL = TestUser.of("POPULAR", "klaus");
 
        static final Stream<KeyValue<TestUser, TestRanking>> getTop10Messages()
        {
@@ -84,6 +85,10 @@ class TestData
                                        KLAUS,
                                        TestRanking.of(
                                                        TestEntry.of("Müsch", 1l))),
+                       KeyValue.pair( // 1
+                                       OTHER_CHANNEL,
+                                       TestRanking.of(
+                                                       TestEntry.of("Müsch", 1l))),
                        KeyValue.pair( // 2
                                        PETER,
                                        TestRanking.of(
@@ -121,6 +126,11 @@ class TestData
                                        TestRanking.of(
                                                        TestEntry.of("Müsch", 2l),
                                                        TestEntry.of("s", 2l))),
+                       KeyValue.pair( // 8
+                                       OTHER_CHANNEL,
+                                       TestRanking.of(
+                                                       TestEntry.of("Müsch", 2l),
+                                                       TestEntry.of("s", 2l))),
                        KeyValue.pair( // 9
                                        PETER,
                                        TestRanking.of(