From bece8b573fa290963f311ddafba29e28c3ad1814 Mon Sep 17 00:00:00 2001 From: Ozan-Can Ekinci Date: Mon, 16 Jan 2023 21:35:47 +0100 Subject: [PATCH] created test for cheching same highscore --- src/test/java/Gui/GameGuiTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/test/java/Gui/GameGuiTest.java b/src/test/java/Gui/GameGuiTest.java index c0b63f0..f212d07 100644 --- a/src/test/java/Gui/GameGuiTest.java +++ b/src/test/java/Gui/GameGuiTest.java @@ -41,4 +41,12 @@ class GameGuiTest { assertEquals(expectedHighScore, gameGui.highScore); } + @Test + public void testHighScoreSameScore() { + int expectedHighScore = 4; + gameGui.highScore = 4; + gameGui.questionNr = 4; + gameGui.highScore(); + assertEquals(expectedHighScore, gameGui.highScore); + } }