new Test for getErgebnus Array Method
parent
b4d3ee05d6
commit
da1104718f
|
@ -329,4 +329,30 @@ class HitoriTest{
|
|||
ArrayList<String> ergebnisList = HitoriMain2.readFromFile(inputStream);
|
||||
assertNotEquals(fileEntry, ergebnisList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Test
|
||||
void test22() throws IOException {
|
||||
String[][] ergebnis1 = {
|
||||
{"W", "B", "W", "W"},
|
||||
{"W", "W", "W", "B"},
|
||||
{"W", "B", "W", "W"},
|
||||
{"B", "W", "W", "B"}};
|
||||
String path = "/Hitori_Spielfelder/Hitori4x4_leicht.csv";
|
||||
InputStream inputStream = getClass().getResourceAsStream(path);
|
||||
ArrayList<String> filteredData = HitoriMain2.getSolution(inputStream);
|
||||
InputStream newStream = getClass().getResourceAsStream(path);
|
||||
int rows = 4;
|
||||
String[][] data = HitoriMain2.getData(newStream, rows);
|
||||
assertTrue(Arrays.deepEquals(ergebnis1, HitoriMain2.getErgebnisArray(data, filteredData)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue