projects
/
demos
/
kafka
/
wordcount
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
top10: 1.2.1 - (RED) Fixed de-/serialization, turned of caching in IT
[demos/kafka/wordcount]
/
src
/
test
/
java
/
de
/
juplo
/
kafka
/
wordcount
/
top10
/
TestData.java
diff --git
a/src/test/java/de/juplo/kafka/wordcount/top10/TestData.java
b/src/test/java/de/juplo/kafka/wordcount/top10/TestData.java
index
73a405e
..
3bb6b54
100644
(file)
--- a/
src/test/java/de/juplo/kafka/wordcount/top10/TestData.java
+++ b/
src/test/java/de/juplo/kafka/wordcount/top10/TestData.java
@@
-55,7
+55,7
@@
class TestData
TestCounter.of("klaus","s",3)),
};
TestCounter.of("klaus","s",3)),
};
- static void assertExpectedMessages(MultiValueMap<
String
, Ranking> receivedMessages)
+ static void assertExpectedMessages(MultiValueMap<
User
, Ranking> receivedMessages)
{
expectedMessages().forEach(
(user, rankings) ->
{
expectedMessages().forEach(
(user, rankings) ->
@@
-63,69
+63,69
@@
class TestData
.containsExactlyElementsOf(rankings));
}
.containsExactlyElementsOf(rankings));
}
- static KeyValue<
String
, Ranking>[] EXPECTED_MESSAGES = new KeyValue[]
+ static KeyValue<
User
, Ranking>[] EXPECTED_MESSAGES = new KeyValue[]
{
KeyValue.pair( // 0
{
KeyValue.pair( // 0
-
"peter"
,
+
User.of("peter")
,
Ranking.of(
Entry.of("Hallo", 1l))),
KeyValue.pair( // 1
Ranking.of(
Entry.of("Hallo", 1l))),
KeyValue.pair( // 1
-
"klaus"
,
+
User.of("klaus")
,
Ranking.of(
Entry.of("Müsch", 1l))),
KeyValue.pair( // 2
Ranking.of(
Entry.of("Müsch", 1l))),
KeyValue.pair( // 2
-
"peter"
,
+
User.of("peter")
,
Ranking.of(
Entry.of("Hallo", 1l),
Entry.of("Welt", 1l))),
KeyValue.pair( // 3
Ranking.of(
Entry.of("Hallo", 1l),
Entry.of("Welt", 1l))),
KeyValue.pair( // 3
-
"klaus"
,
+
User.of("klaus")
,
Ranking.of(
Entry.of("Müsch", 2l))),
KeyValue.pair( // 4
Ranking.of(
Entry.of("Müsch", 2l))),
KeyValue.pair( // 4
-
"klaus"
,
+
User.of("klaus")
,
Ranking.of(
Entry.of("Müsch", 2l),
Entry.of("s", 1l))),
KeyValue.pair( // 5
Ranking.of(
Entry.of("Müsch", 2l),
Entry.of("s", 1l))),
KeyValue.pair( // 5
-
"peter"
,
+
User.of("peter")
,
Ranking.of(
Entry.of("Hallo", 1l),
Entry.of("Welt", 1l),
Entry.of("Boäh", 1l))),
KeyValue.pair( // 6
Ranking.of(
Entry.of("Hallo", 1l),
Entry.of("Welt", 1l),
Entry.of("Boäh", 1l))),
KeyValue.pair( // 6
-
"peter"
,
+
User.of("peter")
,
Ranking.of(
Entry.of("Welt", 2l),
Entry.of("Hallo", 1l),
Entry.of("Boäh", 1l))),
KeyValue.pair( // 7
Ranking.of(
Entry.of("Welt", 2l),
Entry.of("Hallo", 1l),
Entry.of("Boäh", 1l))),
KeyValue.pair( // 7
-
"peter"
,
+
User.of("peter")
,
Ranking.of(
Entry.of("Welt", 2l),
Entry.of("Boäh", 2l),
Entry.of("Hallo", 1l))),
KeyValue.pair( // 8
Ranking.of(
Entry.of("Welt", 2l),
Entry.of("Boäh", 2l),
Entry.of("Hallo", 1l))),
KeyValue.pair( // 8
-
"klaus"
,
+
User.of("klaus")
,
Ranking.of(
Entry.of("Müsch", 2l),
Entry.of("s", 2l))),
KeyValue.pair( // 9
Ranking.of(
Entry.of("Müsch", 2l),
Entry.of("s", 2l))),
KeyValue.pair( // 9
-
"peter"
,
+
User.of("peter")
,
Ranking.of(
Entry.of("Boäh", 3l),
Entry.of("Welt", 2l),
Entry.of("Hallo", 1l))),
KeyValue.pair( // 10
Ranking.of(
Entry.of("Boäh", 3l),
Entry.of("Welt", 2l),
Entry.of("Hallo", 1l))),
KeyValue.pair( // 10
-
"klaus"
,
+
User.of("klaus")
,
Ranking.of(
Entry.of("s", 3l),
Entry.of("Müsch", 2l))),
};
Ranking.of(
Entry.of("s", 3l),
Entry.of("Müsch", 2l))),
};
- static MultiValueMap<
String
, Ranking> expectedMessages()
+ static MultiValueMap<
User
, Ranking> expectedMessages()
{
{
- MultiValueMap<
String
, Ranking> expectedMessages = new LinkedMultiValueMap<>();
+ MultiValueMap<
User
, Ranking> expectedMessages = new LinkedMultiValueMap<>();
Stream
.of(EXPECTED_MESSAGES)
.forEach(keyValue -> expectedMessages.add(keyValue.key, keyValue.value));
Stream
.of(EXPECTED_MESSAGES)
.forEach(keyValue -> expectedMessages.add(keyValue.key, keyValue.value));