From 1d3a2415498fd9cfe10b4a9d00f3ca94154c6655 Mon Sep 17 00:00:00 2001 From: fdai7793 Date: Wed, 7 Feb 2024 17:00:47 +0100 Subject: [PATCH] Test.CheckIfCardsMovedToDrawCardDeckWillBeFaceDown --- 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 a27b039..161d8dc 100644 --- a/src/test/java/de/hsfulda/onses/GameServiceTest.java +++ b/src/test/java/de/hsfulda/onses/GameServiceTest.java @@ -521,4 +521,17 @@ public class GameServiceTest { assertFalse(gameService.getGame().getLastPlayedCard().isFacedown()); } + + @Test + @DisplayName("CheckIfCardsMovedToDrawCardDeckWillBeFaceDown") + public void CheckIfCardsMovedToDrawCardDeckWillBeFaceDown() { + GameService gameService = new GameService(); + + Card card = new Card().setColor(Card.Color.GREEN).setValue(Card.Value.FOUR); + + gameService.getGame().setLastPlayedCard(card); + gameService.addLastPlayedCardToDrawCardDeck(); + + assertTrue(gameService.getGame().getDrawCardDeck().getLast().isFacedown()); + } }