diff --git a/src/test/java/pacmanTests/GameManagerTest.java b/src/test/java/pacmanTests/GameManagerTest.java index 175852b..6838cb3 100644 --- a/src/test/java/pacmanTests/GameManagerTest.java +++ b/src/test/java/pacmanTests/GameManagerTest.java @@ -75,4 +75,17 @@ class GameManagerTest { // assert assertThat(colision).isEqualTo(expected); } + @Test + void GameManager_setupgame_spawnsghosts() { + + // arrange + GameManager gameManager = new GameManager(); + gameManager.map.ghostSpawns[0] = new Vector2(1, 1); + Vector2 expectedPosition = new Vector2(1, 1); + // act + gameManager.ghosts[0].spawn(); + Vector2 ghostPositeion = gameManager.ghosts[0].position; + // assert + assertThat(ghostPositeion).isEqualTo(expectedPosition); + } }