diff --git a/src/test/java/de/hsfulda/onses/GameServiceTest.java b/src/test/java/de/hsfulda/onses/GameServiceTest.java index df554ba..a27b039 100644 --- a/src/test/java/de/hsfulda/onses/GameServiceTest.java +++ b/src/test/java/de/hsfulda/onses/GameServiceTest.java @@ -504,4 +504,21 @@ public class GameServiceTest { assertTrue(gameService.getGame().getPlayerService().getPlayerList().getLast().getPlayerDeck().get(i).isFacedown()); } } + + @Test + @DisplayName("CheckIfCardsPlayedByBotWillTurnFaceUp") + public void CheckIfCardsPlayedByBotWillTurnFaceUp() { + GameService gameService = new GameService(); + + Card card = new Card().setColor(Card.Color.GREEN).setValue(Card.Value.FOUR).setFacedown(true); + + gameService.getGame().getPlayerService().setCurrentTurn(false); + gameService.getGame().setLastPlayedCard(new Card().setColor(Card.Color.GREEN).setValue(Card.Value.FIVE)); + gameService.getGame().getPlayerService().getPlayerList().getLast().getPlayerDeck().clear(); + gameService.getGame().getPlayerService().getPlayerList().getLast().getPlayerDeck().add(card); + + gameService.getGame().getPlayerService().botMove(); + + assertFalse(gameService.getGame().getLastPlayedCard().isFacedown()); + } }