code-coverage-Emilia #24

Merged
erns6604 merged 14 commits from code-coverage-Emilia into main 2025-10-31 16:29:43 +01:00
2 changed files with 3 additions and 10 deletions
Showing only changes of commit c12cf534a9 - Show all commits

View File

@@ -12,7 +12,7 @@ public class World {
private int height; private int height;
public World(int x, int y) { public World(int x, int y) {
this.map = new String[(x * 2) + 1][y + 2]; this.map = new String[x][y];
addWorldToMap(); addWorldToMap();
width = x; width = x;
height = y; height = y;

View File

@@ -22,15 +22,8 @@ class WorldTest {
} }
@Test @Test
void worldCreationTest() { void worldCreationTest() {
// World test = new World(5, 5); World test = new World(5, 5);
// String[][] mapTest = test.getMap(); assertEquals(25, test.getMap().length * test.getMap()[0].length);
// 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);
} }
@Test @Test
void mapCreationTest() { void mapCreationTest() {