Browse Source

Added assert to testRun

master
Leon Montag 2 years ago
parent
commit
673413e763
  1. 8
      src/test/java/game/runGameTest.java

8
src/test/java/game/runGameTest.java

@ -77,7 +77,13 @@ class runGameTest {
"Antw. 5,Antw. 6,Antw. 7,Antw. 8"}; "Antw. 5,Antw. 6,Antw. 7,Antw. 8"};
runGame game = new runGame(); runGame game = new runGame();
game.run(0); game.run(0);
//assert
String[] IsRight = {"Frage 1", "Antw. 1","Antw. 2","Antw. 3","Antw. 4",};
assertEquals(IsRight[0], GameGui.QuestionLabel.getText());
assertEquals(IsRight[1], GameGui.AnswersBtn1.getText());
assertEquals(IsRight[2], GameGui.AnswersBtn2.getText());
assertEquals(IsRight[3], GameGui.AnswersBtn3.getText());
assertEquals(IsRight[4], GameGui.AnswersBtn4.getText());
} }

Loading…
Cancel
Save