From 89efe0dcb67a892532e6244d80905fdc4394aefa Mon Sep 17 00:00:00 2001 From: fdai2751 Date: Wed, 7 Feb 2024 20:54:14 +0100 Subject: [PATCH] added testfunction TogglePause() --- .../java/pacmanTests/GameManagerTest.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/test/java/pacmanTests/GameManagerTest.java b/src/test/java/pacmanTests/GameManagerTest.java index 175852b..2bbea12 100644 --- a/src/test/java/pacmanTests/GameManagerTest.java +++ b/src/test/java/pacmanTests/GameManagerTest.java @@ -75,4 +75,23 @@ class GameManagerTest { // assert 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); + }*/ }