|
|
@ -9,6 +9,7 @@ public class ModelTest extends MainFrame { |
|
|
|
|
|
|
|
@Test |
|
|
|
public void test_toString() { |
|
|
|
|
|
|
|
GameField gameField = new GameField(360); |
|
|
|
|
|
|
|
for (int i = 0; i < 9; i++) { |
|
|
@ -19,7 +20,23 @@ public class ModelTest extends MainFrame { |
|
|
|
|
|
|
|
Model model = new Model(gameField); |
|
|
|
|
|
|
|
System.out.println(model); |
|
|
|
String staticCase = |
|
|
|
"X 0 1 2 3 4 5 6 7 8\n" + |
|
|
|
" ------------------------\n" + |
|
|
|
"0 | 0 0 0 0 0 0 0 0 0\n" + |
|
|
|
"1 | 1 1 1 1 1 1 1 1 1\n" + |
|
|
|
"2 | 2 2 2 2 2 2 2 2 2\n" + |
|
|
|
" |\n" + |
|
|
|
"3 | 3 3 3 3 3 3 3 3 3\n" + |
|
|
|
"4 | 4 4 4 4 4 4 4 4 4\n" + |
|
|
|
"5 | 5 5 5 5 5 5 5 5 5\n" + |
|
|
|
" |\n" + |
|
|
|
"6 | 6 6 6 6 6 6 6 6 6\n" + |
|
|
|
"7 | 7 7 7 7 7 7 7 7 7\n" + |
|
|
|
"8 | 8 8 8 8 8 8 8 8 8\n"; |
|
|
|
|
|
|
|
|
|
|
|
assertEquals(model.toString(), staticCase, "tested Overridden toString of Model.class"); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
@ -115,7 +132,7 @@ public class ModelTest extends MainFrame { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
assertTrue(a); |
|
|
|
assertTrue(a, "arrangement of set values of parsing from GameField"); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|