From b2aa530e2fcc48af33b94d5149d1d535c2098029 Mon Sep 17 00:00:00 2001 From: fdai7793 Date: Sat, 3 Feb 2024 15:35:09 +0100 Subject: [PATCH] Test.CheckResetOnBlackCards --- src/test/java/de/hsfulda/onses/GameServiceTest.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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()); + } }