From 284104dd8b13c1b1156f435da3fab9ceeb5a4b6d Mon Sep 17 00:00:00 2001 From: fdai7793 Date: Tue, 6 Feb 2024 21:33:48 +0100 Subject: [PATCH] Test.CheckForSetGameOver --- src/test/java/de/hsfulda/onses/GameTest.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/test/java/de/hsfulda/onses/GameTest.java b/src/test/java/de/hsfulda/onses/GameTest.java index fe8fc6a..9a0a7e0 100644 --- a/src/test/java/de/hsfulda/onses/GameTest.java +++ b/src/test/java/de/hsfulda/onses/GameTest.java @@ -5,6 +5,7 @@ import de.hsfulda.onses.models.Game; import de.hsfulda.onses.services.GameService; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.*; public class GameTest { @@ -68,4 +69,16 @@ public class GameTest { assertFalse(gameOver); } -} \ No newline at end of file + + + @Test + @DisplayName("CheckForSetGameOver") + public void CheckForSetGameOver() { + GameService gameService = new GameService(); + + gameService.getGame().setGameOver(true); + boolean gameOver = gameService.getGame().getGameOver(); + + assertTrue(gameOver); + } +}