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);
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);
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);
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);