Browse Source

added test for orange

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

12
src/test/java/pacmanTests/CellTest.java

@ -62,4 +62,16 @@ class CellTest {
// assert // assert
assertThat(expectedScore).isEqualTo(resultingScore); 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);
}
} }
Loading…
Cancel
Save