From 4fb4c61b5382c2c57275b28b2ac7e3f396207b99 Mon Sep 17 00:00:00 2001 From: fdai7906 Date: Thu, 25 Jan 2024 13:02:56 +0100 Subject: [PATCH] Test.lastPlayedCard --- src/test/java/de/hsfulda/onses/GameTest.java | 21 ++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/test/java/de/hsfulda/onses/GameTest.java diff --git a/src/test/java/de/hsfulda/onses/GameTest.java b/src/test/java/de/hsfulda/onses/GameTest.java new file mode 100644 index 0000000..3ca4fd3 --- /dev/null +++ b/src/test/java/de/hsfulda/onses/GameTest.java @@ -0,0 +1,21 @@ +package de.hsfulda.onses; + +import de.hsfulda.onses.models.Card; +import de.hsfulda.onses.models.Game; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; + +public class GameTest { + @Test + @DisplayName("lastPlayedCard") + public void lastPlayedCard() { + Game game = new Game(); + Card card = new Card().setColor(Card.Color.RED).setValue(Card.Value.EIGHT); + Card answer = card; + + game.setLastPlayedCard(card); + + assertEquals(card, answer); + } +}