|
|
@ -5,6 +5,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals; |
|
|
|
|
|
|
|
import java.util.stream.Stream; |
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
import org.junit.jupiter.api.BeforeAll; |
|
|
|
import org.junit.jupiter.api.Test; |
|
|
|
import org.junit.jupiter.api.TestInstance; |
|
|
@ -53,6 +55,14 @@ class GameLogicTest { |
|
|
|
assertArrayEquals(expectedResult, realResult); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void generateGUITest() { |
|
|
|
JPanel expectedResult = new JPanel(); |
|
|
|
JPanel realResult = game.generateGUI(); |
|
|
|
|
|
|
|
assertEquals(expectedResult.getClass(), realResult.getClass()); |
|
|
|
} |
|
|
|
|
|
|
|
@ParameterizedTest(name = "[{index}] {0} -> {2} fields") |
|
|
|
@MethodSource("testCasesForCountPlayfields") |
|
|
|
void fieldCountTest(String testName, int size, int expectedResult) { |
|
|
|