|
@ -37,5 +37,18 @@ class CellTest { |
|
|
assertThat(expectedScore).isEqualTo(resultingScore); |
|
|
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); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |