diff options
-rw-r--r-- | src/test/java/fr/umlv/java/wallj/board/MatrixTest.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/test/java/fr/umlv/java/wallj/board/MatrixTest.java b/src/test/java/fr/umlv/java/wallj/board/MatrixTest.java new file mode 100644 index 0000000..4510b12 --- /dev/null +++ b/src/test/java/fr/umlv/java/wallj/board/MatrixTest.java | |||
@@ -0,0 +1,27 @@ | |||
1 | package fr.umlv.java.wallj.board; | ||
2 | |||
3 | import org.junit.jupiter.api.Assertions; | ||
4 | import org.junit.jupiter.api.Test; | ||
5 | |||
6 | import java.util.Arrays; | ||
7 | import java.util.Collections; | ||
8 | import java.util.List; | ||
9 | |||
10 | /** | ||
11 | * @author Pacien TRAN-GIRARD | ||
12 | */ | ||
13 | final class MatrixTest { | ||
14 | |||
15 | @Test | ||
16 | void testMatrixSize() { | ||
17 | Integer[][] ma = {{0}, {0}}; | ||
18 | Assertions.assertEquals(Matrix.getWidth(ma), 1); | ||
19 | Assertions.assertEquals(Matrix.getHeight(ma), 2); | ||
20 | |||
21 | List<List<Integer>> ml = Arrays.asList(Collections.singletonList(0), Collections.singletonList(0)); | ||
22 | Assertions.assertEquals(Matrix.getWidth(ml), 1); | ||
23 | Assertions.assertEquals(Matrix.getHeight(ml), 2); | ||
24 | Assertions.assertTrue(Matrix.isShapeValid(ml)); | ||
25 | } | ||
26 | |||
27 | } | ||