SchachtelArraysTest.java 990 Bytes
Newer Older
Younis's avatar
Younis committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import org.junit.Test;
import static org.junit.Assert.*;

public class SchachtelArraysTest {

    @Test
    public void testMymatrixA() {
        int[][] expected = {{10, 11, 12}, {20, 21, 22}, {30, 31, 33}};
        assertArrayEquals(expected, SchachtelArrays.mymatrixA);
    }

    @Test
    public void testMymatrixB() {
        int[][] expected = {{10, 11, 12}, {20, 21, 22}, {30, 31, 32}};
        assertArrayEquals(expected, SchachtelArrays.mymatrixB);
    }

    @Test
    public void testMymatrixC() {
        int[][] expected = {{10, 11, 12}, {20, 21, 22}, {30, 31, 32}};
        assertArrayEquals(expected, SchachtelArrays.mymatrixC);
    }

    @Test
    public void testMymatrixD() {
        int[][] expected = new int[3][3];
        for (int i = 0; i < expected.length; i++) {
            for (int j = 0; j < expected[i].length; j++) {
                expected[i][j] = 10 * i + j;
            }
        }
        assertArrayEquals(expected, SchachtelArrays.mymatrixD);
    }
}