diff --git a/src/test/java/de/hsfulda/onses/GameServiceTest.java b/src/test/java/de/hsfulda/onses/GameServiceTest.java index 1012373..f6a6eef 100644 --- a/src/test/java/de/hsfulda/onses/GameServiceTest.java +++ b/src/test/java/de/hsfulda/onses/GameServiceTest.java @@ -259,4 +259,22 @@ public class GameServiceTest { assertEquals(expected, answer); } + @Test + @DisplayName("DrawCardDeckRemoveTest") + public void DrawCardDeckRemoveTest () + { + GameService gameService = new GameService(); + Card card = gameService.getGame().getDrawCardDeck().getFirst(); + gameService.drawCard(1); + int counter = 0; + int expected = 0; + for (int i = 0; i < gameService.getGame().getDrawCardDeck().size(); i++) { + if (gameService.getGame().getDrawCardDeck().get(i).getColor() == card.getColor() && gameService.getGame().getDrawCardDeck().get(i).getValue() == card.getValue()) counter++; + } + if (card.getColor() == Card.Color.BLACK) expected = 3; + else expected = 1; + + assertEquals(expected, counter); + } + }