code-coverage-Emilia #24
@ -12,7 +12,7 @@ public class World {
|
||||
private int height;
|
||||
|
||||
public World(int x, int y) {
|
||||
this.map = new String[(x * 2) + 1][y + 2];
|
||||
this.map = new String[x][y];
|
||||
addWorldToMap();
|
||||
width = x;
|
||||
height = y;
|
||||
|
||||
@ -22,15 +22,8 @@ class WorldTest {
|
||||
}
|
||||
@Test
|
||||
void worldCreationTest() {
|
||||
// World test = new World(5, 5);
|
||||
// String[][] mapTest = test.getMap();
|
||||
// int counter = 0;
|
||||
// for (int i = 0; i < mapTest.length; i++) {
|
||||
// for (int j = 0; j < mapTest[i].length; j++) {
|
||||
// counter += 1;
|
||||
// }
|
||||
// }
|
||||
// assertEquals(counter, 5 * 5);
|
||||
World test = new World(5, 5);
|
||||
assertEquals(25, test.getMap().length * test.getMap()[0].length);
|
||||
}
|
||||
@Test
|
||||
void mapCreationTest() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user