diff --git a/src/test/java/de/hsfulda/onses/GameServiceTest.java b/src/test/java/de/hsfulda/onses/GameServiceTest.java index 71f2e14..d8a54f2 100644 --- a/src/test/java/de/hsfulda/onses/GameServiceTest.java +++ b/src/test/java/de/hsfulda/onses/GameServiceTest.java @@ -299,4 +299,17 @@ public class GameServiceTest { assertTrue(answer); } + + @Test + @DisplayName("CheckResetOnBlackCards") + public void CheckResetOnBlackCards () { + GameService gameService = new GameService(); + gameService.getGame().setLastPlayedCard(new Card().setColor(Card.Color.RED).setValue(Card.Value.FIVE)); + gameService.playCard(new Card().setColor(Card.Color.BLACK).setValue(Card.Value.CHOOSE)); + gameService.playCard(new Card().setColor(Card.Color.YELLOW).setValue(Card.Value.FIVE)); + + Card card = gameService.getGame().getDrawCardDeck().getLast(); + + assertEquals(Card.Color.BLACK, card.getColor()); + } }