Browse Source

added testfunction TogglePause()

remotes/origin/playerRefactoring
fdai2751 11 months ago
parent
commit
89efe0dcb6
  1. 19
      src/test/java/pacmanTests/GameManagerTest.java

19
src/test/java/pacmanTests/GameManagerTest.java

@ -75,4 +75,23 @@ class GameManagerTest {
// assert // assert
assertThat(colision).isEqualTo(expected); assertThat(colision).isEqualTo(expected);
} }
@Test
void GameManager_TogglePause_NotTogglePause() {
GameManager gameManager = new GameManager();
gameManager.isPaused = true;
gameManager.TogglePause();
boolean pause = gameManager.isPaused;
boolean expected = false;
assertThat(pause).isEqualTo(expected);
}
/*@Test
void GameManager_Pause_NotPause() {
GameManager gameManager = new GameManager();
gameManager.isPaused = true;
gameManager.Pause();
boolean pause = gameManager.isPaused;
boolean expected = true;
assertThat(pause).isEqualTo(expected);
}*/
} }
Loading…
Cancel
Save