Browse Source

Test: JunitTest für pause function in GameManager

remotes/origin/ghostsbehaviour
fdai2751 11 months ago
parent
commit
b90ccb83b5
  1. 11
      src/test/java/pacmanTests/GameManagerTest.java

11
src/test/java/pacmanTests/GameManagerTest.java

@ -46,6 +46,7 @@ class GameManagerTest {
// assert // assert
assertThat(initialVptOutput).isNotEqualTo(updatedVptOutput); assertThat(initialVptOutput).isNotEqualTo(updatedVptOutput);
} }
@Test @Test
void GameManager_GostPlayerColisionTest_DetectsColosion() { void GameManager_GostPlayerColisionTest_DetectsColosion() {
@ -60,6 +61,16 @@ class GameManagerTest {
// assert // assert
assertThat(collision).isEqualTo(expected); assertThat(collision).isEqualTo(expected);
} }
@Test
void testPauseGame() {
GameManager game = new GameManager();
assertFalse(game.isPaused);
game.Pause();
assertTrue(game.isPaused);
}
@Test @Test
void GameManager_GostPlayerCollisionTest_DoesntDetectColliosion() { void GameManager_GostPlayerCollisionTest_DoesntDetectColliosion() {

Loading…
Cancel
Save