diff --git a/src/test/java/Gui/ActionHandlerTest.java b/src/test/java/Gui/ActionHandlerTest.java index f798a3a..f333dd9 100644 --- a/src/test/java/Gui/ActionHandlerTest.java +++ b/src/test/java/Gui/ActionHandlerTest.java @@ -17,6 +17,7 @@ class ActionHandlerTest { gui.StartMainMenu(); gameGui.createGui(); gameGui.createLosingPanel(); + gameGui.createWinningPanel(); } @Test @@ -30,4 +31,16 @@ class ActionHandlerTest { //assert assertEquals(expectedNr, GameGui.questionNr); } + + @Test + public void testWinningRestartBtn() { + //arrange + int expectedNr = 1; + //act + GameGui.questionNr= 2; + ActionHandler actionHandler = new ActionHandler(); + GameGui.WinningRestartBtn.doClick(); + //assert + assertEquals(expectedNr, GameGui.questionNr); + } } \ No newline at end of file