From af6645d5f281fe7d6ac64819a2691dc8bf771830 Mon Sep 17 00:00:00 2001 From: fdai7910 Date: Mon, 5 Feb 2024 21:38:36 +0100 Subject: [PATCH] added test for orange --- src/test/java/pacmanTests/CellTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/test/java/pacmanTests/CellTest.java b/src/test/java/pacmanTests/CellTest.java index ba78b06..e22e328 100644 --- a/src/test/java/pacmanTests/CellTest.java +++ b/src/test/java/pacmanTests/CellTest.java @@ -62,4 +62,16 @@ class CellTest { // assert assertThat(expectedScore).isEqualTo(resultingScore); } + void cell_triggerItem_305orangeScore() { + // arrange + GameManager gameManager = new GameManager(); + Cell cell = gameManager.map.GetCell(new Vector2(0,0)); + cell.type = "orange"; + int expectedScore = 305; + // act + cell.triggerItem(); + int resultingScore = gameManager.score; + // assert + assertThat(expectedScore).isEqualTo(resultingScore); + } }