Browse Source

added test for apple

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

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

@ -74,4 +74,17 @@ class CellTest {
// assert
assertThat(expectedScore).isEqualTo(resultingScore);
}
void cell_triggerItem_205appleScore() {
// arrange
GameManager gameManager = new GameManager();
Cell cell = gameManager.map.GetCell(new Vector2(0,0));
cell.type = "apple";
int expectedScore = 205;
// act
cell.triggerItem();
int resultingScore = gameManager.score;
// assert
assertThat(expectedScore).isEqualTo(resultingScore);
}
}
Loading…
Cancel
Save