Browse Source

added test for pillScore

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

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

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