|
|
@ -58,4 +58,22 @@ class MapTest { |
|
|
|
assertThat(expectedMiddle).isEqualTo(middle); |
|
|
|
assertThat(expectedBottomRight).isEqualTo(bottomRight); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void Map_findCellByString_cellT() { |
|
|
|
// arrange |
|
|
|
String[] mapTest = { |
|
|
|
"wew", |
|
|
|
"w.t", |
|
|
|
"ee." |
|
|
|
}; |
|
|
|
GameManager gameManager = new GameManager(); |
|
|
|
gameManager.map = new Map(mapTest, gameManager); |
|
|
|
Map testMap = gameManager.map; |
|
|
|
Cell expectedT = testMap.cells[2][1]; |
|
|
|
// act |
|
|
|
Cell foundT = testMap.findCellByString("tpRight"); |
|
|
|
// assert |
|
|
|
assertThat(expectedT).isEqualTo(foundT); |
|
|
|
} |
|
|
|
} |