|
|
@ -74,11 +74,20 @@ class GameManagerTest { |
|
|
|
game.handleGhostCollision(); |
|
|
|
game.handleGhostCollision(); |
|
|
|
int expectedScore = 0; |
|
|
|
|
|
|
|
assertThat(game.score).isEqualTo(expectedScore); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
void testPlayerLivesRestoredwhenGhostCaughtPlayerTreeTime() { |
|
|
|
GameManager game = new GameManager(); |
|
|
|
|
|
|
|
game.livesRemaining = 3; |
|
|
|
game.handleGhostCollision(); |
|
|
|
game.handleGhostCollision(); |
|
|
|
game.handleGhostCollision(); |
|
|
|
int expectedLives = 3; |
|
|
|
assertThat(game.livesRemaining).isEqualTo(expectedLives); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|