|
|
@ -227,7 +227,7 @@ class LogicTest { |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void checkButtonsTest() { |
|
|
|
void checkButtonsTestTrue() { |
|
|
|
testObj.create4gewinntGui(); |
|
|
|
boolean expectedResult = true; |
|
|
|
|
|
|
@ -236,6 +236,19 @@ class LogicTest { |
|
|
|
assertEquals(expectedResult, realResult); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void checkButtonsTestFalse() { |
|
|
|
testObj.create4gewinntGui(); |
|
|
|
boolean expectedResult = false; |
|
|
|
for(int i = 0; i < testObj.buttons.length; i++) { |
|
|
|
testObj.buttons[i].setEnabled(false); |
|
|
|
} |
|
|
|
|
|
|
|
boolean realResult = testObj.checkButtons(); |
|
|
|
|
|
|
|
assertEquals(expectedResult, realResult); |
|
|
|
} |
|
|
|
|
|
|
|
private static Stream<Arguments> playfieldResults() { |
|
|
|
int[][] playfield1 = {{0, 0, 0, 0, 0, 0}, |
|
|
|
{0, 0, 0, 0, 0, 0}, |
|
|
|