Browse Source

added test for moveSpeed change by crystal fruit

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

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

@ -87,4 +87,17 @@ class CellTest {
// assert
assertThat(expectedScore).isEqualTo(resultingScore);
}
void cell_triggerItem_3crystalMoveSpeed() {
// arrange
GameManager gameManager = new GameManager();
Cell cell = gameManager.map.GetCell(new Vector2(0,0));
cell.type = "crystal";
int expectedMoveSpeed = 3;
// act
cell.triggerItem();
int resultingMoveSpeed = gameManager.moveSpeed;
// assert
assertThat(expectedMoveSpeed).isEqualTo(resultingMoveSpeed);
}
}
Loading…
Cancel
Save