Browse Source

added test for strawberry

remotes/origin/player
fdai7910 11 months ago
parent
commit
fab9670220
  1. 13
      src/test/java/pacmanTests/CellTest.java

13
src/test/java/pacmanTests/CellTest.java

@ -50,5 +50,16 @@ class CellTest {
assertThat(expectedScore).isEqualTo(resultingScore);
}
void cell_triggerItem_405strawberryScore() {
// arrange
GameManager gameManager = new GameManager();
Cell cell = gameManager.map.GetCell(new Vector2(0,0));
cell.type = "strawberry";
int expectedScore = 405;
// act
cell.triggerItem();
int resultingScore = gameManager.score;
// assert
assertThat(expectedScore).isEqualTo(resultingScore);
}
}
Loading…
Cancel
Save