WIP:test: Simp...
[demos/kafka/chat] / src / test / java / de / juplo / kafka / chat / backend / domain / ChatHomeWithShardsTestBase.java
index 587c754..c7f8c11 100644 (file)
@@ -11,6 +11,11 @@ import static pl.rzrz.assertj.reactor.Assertions.assertThat;
 
 public class ChatHomeWithShardsTestBase extends ChatHomeTestBase
 {
+  public static final int NUM_SHARDS = 10;
+  public static final int OWNED_SHARD = 2;
+  public static final int NOT_OWNED_SHARD = 0;
+
+
   @Test
   @DisplayName("Assert ShardNotOwnedException is thrown, if the shard for the chatroom is not owned")
   void testGetChatroomForNotOwnedShard()
@@ -26,7 +31,7 @@ public class ChatHomeWithShardsTestBase extends ChatHomeTestBase
     {
       assertThat(e).isInstanceOf(ShardNotOwnedException.class);
       ShardNotOwnedException shardNotOwnedException = (ShardNotOwnedException) e;
-      assertThat(shardNotOwnedException.getShard()).isEqualTo(0);
+      assertThat(shardNotOwnedException.getShard()).isEqualTo(NOT_OWNED_SHARD);
     });
   }
 }