diff --git a/src/test/java/pacmanTests/GameManagerTest.java b/src/test/java/pacmanTests/GameManagerTest.java index 8dbb68a..bba944d 100644 --- a/src/test/java/pacmanTests/GameManagerTest.java +++ b/src/test/java/pacmanTests/GameManagerTest.java @@ -108,4 +108,19 @@ class GameManagerTest { boolean expected = true; assertThat(pause).isEqualTo(expected); } + + + @Test + void GameManager_spawnFruit_spawnsFruitAtPlayerSpawn() { + //arrange + GameManager gameManager = new GameManager(); + Cell fruitSpawn = gameManager.map.getCell(gameManager.map.playerSpawn); + String[] expected = {"cherry","strawberry","orange","apple","crystal"}; + //act + + gameManager.spawnFruit(); + String result = fruitSpawn.type; + //assert + assertThat(result).isIn(expected); + } }