diff --git a/src/test/java/Gui/GameGuiTest.java b/src/test/java/Gui/GameGuiTest.java index d557d6d..c0b63f0 100644 --- a/src/test/java/Gui/GameGuiTest.java +++ b/src/test/java/Gui/GameGuiTest.java @@ -20,6 +20,7 @@ class GameGuiTest { void setUp(){ Gui.StartMainMenu(); gameGui.createGui(); + gameGui.createLosingPanel(); } @Test @@ -31,4 +32,13 @@ class GameGuiTest { assertEquals(new Insets(10, 10, 10, 10), gameGui.gbc.insets); } + @Test + public void testHighScoreChange() { + int expectedHighScore = 7; + gameGui.highScore = 0; + gameGui.questionNr = 7; + gameGui.highScore(); + assertEquals(expectedHighScore, gameGui.highScore); + } + }