Fixed: (GameTest) slot choice test
This commit is contained in:
@@ -1590,7 +1590,19 @@ class GameTest {
|
|||||||
|
|
||||||
assertTrue(game.SlotChoiceByIndex(current, 0));
|
assertTrue(game.SlotChoiceByIndex(current, 0));
|
||||||
|
|
||||||
assertEquals(foodBefore + 3, current.getFoodValue());
|
for (int i = 1; i < game.getNPlayers(); i++) {
|
||||||
|
Player temp = game.getCurrentState().getCurrentPlayer();
|
||||||
|
|
||||||
|
assertTrue(game.SlotChoiceByIndex(temp, i));
|
||||||
|
|
||||||
|
assertTrue(
|
||||||
|
game.getSlotMap().values().stream()
|
||||||
|
.anyMatch(player -> player != null
|
||||||
|
&& player.getUserName().equals(temp.getUserName())),
|
||||||
|
"The selected player should be present in the slot map."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
assertEquals(foodBefore + 6, current.getFoodValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user