|
|
@ -33,5 +33,18 @@ class loadNextQuestionTest { |
|
|
|
assertEquals(1, gameGui.questionNr); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
public void testWrongAnswer() { |
|
|
|
//arrange |
|
|
|
gameGui.questionNr = 0; |
|
|
|
loadNextQuestion loadNextQuestion = new loadNextQuestion(); |
|
|
|
runGame.splitAns = new String[] {"option1", "option2", "option3", "option4", "3"}; |
|
|
|
//act |
|
|
|
gameGui.AnswersBtn1.doClick(); |
|
|
|
//assert |
|
|
|
assertEquals(0, gameGui.questionNr); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |