From 8762d62d8834263d2672d5ff8956589c1607ffca Mon Sep 17 00:00:00 2001 From: fdai7906 Date: Thu, 25 Jan 2024 13:22:41 +0100 Subject: [PATCH] Test.GetTwoCardsFromDrawCardDeck --- src/test/java/de/hsfulda/onses/GameTest.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/test/java/de/hsfulda/onses/GameTest.java b/src/test/java/de/hsfulda/onses/GameTest.java index dc55137..13bb0ff 100644 --- a/src/test/java/de/hsfulda/onses/GameTest.java +++ b/src/test/java/de/hsfulda/onses/GameTest.java @@ -30,4 +30,20 @@ public class GameTest { assertEquals(game.getDrawCardDeck().getFirst(), answer); } + + @Test + @DisplayName("GetTwoCardsFromDrawCardDeck") + public void GetTwoCardsFromDrawCardDeck() { + Game game = new Game(); + Card card1 = new Card().setColor(Card.Color.RED).setValue(Card.Value.EIGHT); + Card card2 = new Card().setColor(Card.Color.BLUE).setValue(Card.Value.ONE); + Card answer1 = card1; + Card answer2 = card2; + + game.addCardToDrawCardDeck(card1); + game.addCardToDrawCardDeck(card2); + + assertEquals(game.getDrawCardDeck().getFirst(), answer1); + assertEquals(game.getDrawCardDeck().get(1), answer2); + } }