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