|
@ -74,4 +74,17 @@ class CellTest { |
|
|
// assert |
|
|
// assert |
|
|
assertThat(expectedScore).isEqualTo(resultingScore); |
|
|
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); |
|
|
|
|
|
} |
|
|
} |
|
|
} |