Browse Source

created test for checking unchanged Highscore

master
Ozan-Can Ekinci 2 years ago
parent
commit
fcd1dcf761
  1. 9
      src/test/java/Gui/GameGuiTest.java

9
src/test/java/Gui/GameGuiTest.java

@ -49,4 +49,13 @@ class GameGuiTest {
gameGui.highScore(); gameGui.highScore();
assertEquals(expectedHighScore, gameGui.highScore); assertEquals(expectedHighScore, gameGui.highScore);
} }
@Test
public void testHighScoreNoNewScore() {
int expectedHighScore = 12;
gameGui.highScore = 12 ;
gameGui.questionNr = 3;
gameGui.highScore();
assertEquals(expectedHighScore, gameGui.highScore);
}
} }
Loading…
Cancel
Save