WIP:test
authorKai Moritz <kai@juplo.de>
Fri, 24 Feb 2023 11:00:02 +0000 (12:00 +0100)
committerKai Moritz <kai@juplo.de>
Fri, 24 Feb 2023 11:00:02 +0000 (12:00 +0100)
src/test/java/de/juplo/kafka/chat/backend/domain/ChatHomeTest.java
src/test/java/de/juplo/kafka/chat/backend/persistence/AbstractInMemoryStorageIT.java

index 8ae19fd..5d9dfaf 100644 (file)
@@ -8,7 +8,6 @@ import java.time.Clock;
 import java.util.UUID;
 
 import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 import static pl.rzrz.assertj.reactor.Assertions.assertThat;
@@ -29,7 +28,7 @@ public class ChatHomeTest
         Clock.systemDefaultZone(),
         mock(ChatRoomService.class),
         8);
-    when(chatHomeService.getChatRoom(anyInt(), any(UUID.class))).thenReturn(Mono.just(chatRoom));
+    when(chatHomeService.getChatRoom(any(UUID.class))).thenReturn(Mono.just(chatRoom));
     ChatHome chatHome = new ChatHome(chatHomeService);
 
     // When
@@ -45,7 +44,7 @@ public class ChatHomeTest
   {
     // Given
     ChatHomeService chatHomeService = mock(ChatHomeService.class);
-    when(chatHomeService.getChatRoom(anyInt(), any(UUID.class))).thenReturn(Mono.empty());
+    when(chatHomeService.getChatRoom(any(UUID.class))).thenReturn(Mono.empty());
     ChatHome chatHome = new ChatHome(chatHomeService);
 
     // When
index dd76324..a68445b 100644 (file)
@@ -24,6 +24,7 @@ public abstract class AbstractInMemoryStorageIT extends AbstractStorageStrategyI
       InMemoryChatHomeService chatHomeService = new InMemoryChatHomeService(
           1,
           new int[] { 0 },
+          id -> 0,
           getStorageStrategy().read());
 
       InMemoryChatRoomFactory chatRoomFactory = new InMemoryChatRoomFactory(