|
@ -17,6 +17,7 @@ class ActionHandlerTest { |
|
|
gui.StartMainMenu(); |
|
|
gui.StartMainMenu(); |
|
|
gameGui.createGui(); |
|
|
gameGui.createGui(); |
|
|
gameGui.createLosingPanel(); |
|
|
gameGui.createLosingPanel(); |
|
|
|
|
|
gameGui.createWinningPanel(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
@ -30,4 +31,16 @@ class ActionHandlerTest { |
|
|
//assert |
|
|
//assert |
|
|
assertEquals(expectedNr, GameGui.questionNr); |
|
|
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); |
|
|
|
|
|
} |
|
|
} |
|
|
} |