diff --git a/src/test/java/de/hsfulda/onses/GameServiceTest.java b/src/test/java/de/hsfulda/onses/GameServiceTest.java index d54b1cc..de47a5e 100644 --- a/src/test/java/de/hsfulda/onses/GameServiceTest.java +++ b/src/test/java/de/hsfulda/onses/GameServiceTest.java @@ -459,4 +459,19 @@ public class GameServiceTest { assertTrue(gameService.getTest()); } + + @Test + @DisplayName("CheckIfBotMovesAutomaticallyAfterPlayer") + public void CheckIfBotMovesAutomaticallyAfterPlayer() { + GameService gameService = new GameService(); + + Card card = new Card().setColor(Card.Color.BLUE).setValue(Card.Value.ONE); + gameService.getGame().getPlayerService().getPlayerList().getLast().getPlayerDeck().add(new Card().setColor(Card.Color.BLUE).setValue(Card.Value.FIVE)); + + gameService.playCard(card); + + boolean answer = gameService.getGame().getLastPlayedCard() != card; + + assertTrue(answer); + } }