WIP:tests:vorher
authorKai Moritz <kai@juplo.de>
Mon, 4 Sep 2023 20:23:37 +0000 (22:23 +0200)
committerKai Moritz <kai@juplo.de>
Mon, 4 Sep 2023 20:23:37 +0000 (22:23 +0200)
src/test/java/de/juplo/kafka/chat/backend/persistence/AbstractStorageStrategyIT.java

index d9e6c04..f9cd11f 100644 (file)
@@ -47,18 +47,18 @@ public abstract class AbstractStorageStrategyIT
     Message m4 = chatroom.addMessage(1l, "klaus", "Ja? Nein? Vielleicht??").block();
 
     assertThat(chathome.getChatRoomData().toStream()).containsExactlyElementsOf(List.of(chatroom));
-    assertThat(chathome.getChatRoomData(chatroom.getId())).emitsExactly(chatroom);
+    assertThat(chathome.getChatRoomData(chatRoomId)).emitsExactly(chatroom);
     assertThat(chathome
-        .getChatRoomData(chatroom.getId())
+        .getChatRoomData(chatRoomId)
         .flatMapMany(cr -> cr.getMessages())).emitsExactly(m1, m2, m3, m4);
 
     stop();
     start();
 
     assertThat(chathome.getChatRoomData().toStream()).containsExactlyElementsOf(List.of(chatroom));
-    assertThat(chathome.getChatRoomData(chatroom.getId())).emitsExactly(chatroom);
+    assertThat(chathome.getChatRoomData(chatRoomId)).emitsExactly(chatroom);
     assertThat(chathome
-        .getChatRoomData(chatroom.getId())
+        .getChatRoomData(chatRoomId)
         .flatMapMany(cr -> cr.getMessages())).emitsExactly(m1, m2, m3, m4);
   }
 
@@ -88,26 +88,26 @@ public abstract class AbstractStorageStrategyIT
     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(chatroomA.getId())).emitsExactly(chatroomA);
+    assertThat(chathome.getChatRoomData(chatRoomAId)).emitsExactly(chatroomA);
     assertThat(chathome
-        .getChatRoomData(chatroomA.getId())
+        .getChatRoomData(chatRoomAId)
         .flatMapMany(cr -> cr.getMessages())).emitsExactly(ma1, ma2, ma3, ma4);
-    assertThat(chathome.getChatRoomData(chatroomB.getId())).emitsExactly(chatroomB);
+    assertThat(chathome.getChatRoomData(chatRoomBId)).emitsExactly(chatroomB);
     assertThat(chathome
-        .getChatRoomData(chatroomB.getId())
+        .getChatRoomData(chatRoomBId)
         .flatMapMany(cr -> cr.getMessages())).emitsExactly(mb1, mb2, mb3, mb4);
 
     stop();
     start();
 
     assertThat(chathome.getChatRoomData().toStream()).containsExactlyInAnyOrderElementsOf(List.of(chatroomA, chatroomB));
-    assertThat(chathome.getChatRoomData(chatroomA.getId())).emitsExactly(chatroomA);
+    assertThat(chathome.getChatRoomData(chatRoomAId)).emitsExactly(chatroomA);
     assertThat(chathome
-        .getChatRoomData(chatroomA.getId())
+        .getChatRoomData(chatRoomAId)
         .flatMapMany(cr -> cr.getMessages())).emitsExactly(ma1, ma2, ma3, ma4);
-    assertThat(chathome.getChatRoomData(chatroomB.getId())).emitsExactly(chatroomB);
+    assertThat(chathome.getChatRoomData(chatRoomBId)).emitsExactly(chatroomB);
     assertThat(chathome
-        .getChatRoomData(chatroomB.getId())
+        .getChatRoomData(chatRoomBId)
         .flatMapMany(cr -> cr.getMessages())).emitsExactly(mb1, mb2, mb3, mb4);
   }