From: Kai Moritz Date: Mon, 4 Sep 2023 21:18:49 +0000 (+0200) Subject: refactor: Renamed `ChatRoom` into `ChatRoomData` - Aligned Code X-Git-Tag: rebase--2023-09-05--23-53~10 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=ca11b0d78685537d2e8938b35cc53c82c44056c4;p=demos%2Fkafka%2Fchat refactor: Renamed `ChatRoom` into `ChatRoomData` - Aligned Code --- diff --git a/src/test/java/de/juplo/kafka/chat/backend/persistence/AbstractStorageStrategyIT.java b/src/test/java/de/juplo/kafka/chat/backend/persistence/AbstractStorageStrategyIT.java index 5132c656..5088d995 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/persistence/AbstractStorageStrategyIT.java +++ b/src/test/java/de/juplo/kafka/chat/backend/persistence/AbstractStorageStrategyIT.java @@ -46,8 +46,8 @@ public abstract class AbstractStorageStrategyIT Message m3 = chatroom.addMessage(2l, "peter", "Willst du mit mir gehen?").block(); Message m4 = chatroom.addMessage(1l, "klaus", "Ja? Nein? Vielleicht??").block(); - assertThat(chathome.getChatRoomData().toStream()).containsExactlyElementsOf(List.of(chatroom)); - assertThat(chathome.getChatRoomData(chatRoomId)).emitsExactly(chatroom); + assertThat(chathome.getChatRoomInfo().toStream()).containsExactlyElementsOf(List.of(info)); + assertThat(chathome.getChatRoomInfo(chatRoomId)).emitsExactly(info); assertThat(chathome .getChatRoomData(chatRoomId) .flatMapMany(cr -> cr.getMessages())).emitsExactly(m1, m2, m3, m4); @@ -55,8 +55,8 @@ public abstract class AbstractStorageStrategyIT stop(); start(); - assertThat(chathome.getChatRoomData().toStream()).containsExactlyElementsOf(List.of(chatroom)); - assertThat(chathome.getChatRoomData(chatRoomId)).emitsExactly(chatroom); + assertThat(chathome.getChatRoomInfo().toStream()).containsExactlyElementsOf(List.of(info)); + assertThat(chathome.getChatRoomInfo(chatRoomId)).emitsExactly(info); assertThat(chathome .getChatRoomData(chatRoomId) .flatMapMany(cr -> cr.getMessages())).emitsExactly(m1, m2, m3, m4); @@ -87,8 +87,8 @@ public abstract class AbstractStorageStrategyIT Message mb3 = chatroomB.addMessage(1l, "klaus", "Willst du mit mir gehen?").block(); Message mb4 = chatroomB.addMessage(2l, "peter", "Hä? Was jetzt?!? Isch glohb isch höb ühn däjah vüh...").block(); - assertThat(chathome.getChatRoomData().toStream()).containsExactlyInAnyOrderElementsOf(List.of(chatroomA, chatroomB)); - assertThat(chathome.getChatRoomData(chatRoomAId)).emitsExactly(chatroomA); + assertThat(chathome.getChatRoomInfo().toStream()).containsExactlyInAnyOrderElementsOf(List.of(infoA, infoB)); + assertThat(chathome.getChatRoomInfo(chatRoomAId)).emitsExactly(infoA); assertThat(chathome .getChatRoomData(chatRoomAId) .flatMapMany(cr -> cr.getMessages())).emitsExactly(ma1, ma2, ma3, ma4); @@ -100,8 +100,8 @@ public abstract class AbstractStorageStrategyIT stop(); start(); - assertThat(chathome.getChatRoomData().toStream()).containsExactlyInAnyOrderElementsOf(List.of(chatroomA, chatroomB)); - assertThat(chathome.getChatRoomData(chatRoomAId)).emitsExactly(chatroomA); + assertThat(chathome.getChatRoomInfo().toStream()).containsExactlyInAnyOrderElementsOf(List.of(infoA, infoB)); + assertThat(chathome.getChatRoomInfo(chatRoomAId)).emitsExactly(infoA); assertThat(chathome .getChatRoomData(chatRoomAId) .flatMapMany(cr -> cr.getMessages())).emitsExactly(ma1, ma2, ma3, ma4);