Browse Source

created test for checking if correct action is performed after wrong Answer is pressed

master
Ozan-Can Ekinci 2 years ago
parent
commit
739a500c42
  1. 13
      src/test/java/game/loadNextQuestionTest.java

13
src/test/java/game/loadNextQuestionTest.java

@ -34,4 +34,17 @@ class loadNextQuestionTest {
} }
@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);
}
} }
Loading…
Cancel
Save