Browse Source

Test.CheckForSetGameOver

main
fdai7793 11 months ago
parent
commit
284104dd8b
  1. 15
      src/test/java/de/hsfulda/onses/GameTest.java

15
src/test/java/de/hsfulda/onses/GameTest.java

@ -5,6 +5,7 @@ import de.hsfulda.onses.models.Game;
import de.hsfulda.onses.services.GameService;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
public class GameTest {
@ -68,4 +69,16 @@ public class GameTest {
assertFalse(gameOver);
}
}
@Test
@DisplayName("CheckForSetGameOver")
public void CheckForSetGameOver() {
GameService gameService = new GameService();
gameService.getGame().setGameOver(true);
boolean gameOver = gameService.getGame().getGameOver();
assertTrue(gameOver);
}
}
Loading…
Cancel
Save