|
@ -65,6 +65,22 @@ class GameManagerTest { |
|
|
assertTrue(game.isPaused); |
|
|
assertTrue(game.isPaused); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
void testGameOverwhenGhostCaughtPlayer() { |
|
|
|
|
|
GameManager game = new GameManager(); |
|
|
|
|
|
|
|
|
|
|
|
game.score = 100; |
|
|
|
|
|
game.handleGhostCollision(); |
|
|
|
|
|
game.handleGhostCollision(); |
|
|
|
|
|
game.handleGhostCollision(); |
|
|
|
|
|
int expectedScore = 0; |
|
|
|
|
|
|
|
|
|
|
|
assertThat(game.score).isEqualTo(expectedScore); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
|
void GameManager_GostPlayerCollisionTest_DoesntDetectColliosion() { |
|
|
void GameManager_GostPlayerCollisionTest_DoesntDetectColliosion() { |
|
|
// arrange |
|
|
// arrange |
|
|