package com.fishercoder;

import com.fishercoder.solutions._566;
import org.junit.BeforeClass;
import org.junit.Test;

import static org.junit.Assert.assertArrayEquals;

/**
 * Created by fishercoder on 4/29/17.
 */
public class _566Test {
    private static _566.Solution1 solution1;
    private static int[][] expected;
    private static int[][] actual;
    private static int[][] nums;
    private static int r;
    private static int c;

    @BeforeClass
    public static void setup() {
        solution1 = new _566.Solution1();
    }

    @Test
    public void test1() {
        nums = new int[][]{
                {1, 2},
                {3, 4},
        };
        r = 1;
        c = 4;
        expected = new int[][]{{1, 2, 3, 4}};
        actual = solution1.matrixReshape(nums, r, c);
        assertArrayEquals(expected, actual);
    }
}

@@ -278,16 +278,61 @@
 ution1;%0A
+    private static _566.Solution2 solution2;%0A
     priv
@@ -360,16 +360,16 @@
 pected;%0A
-
     priv
@@ -573,16 +573,58 @@
 ion1();%0A
+        solution2 = new _566.Solution2();%0A
     %7D%0A%0A 
@@ -821,16 +821,16 @@
 3, 4%7D%7D;%0A
-
         
@@ -920,16 +920,115 @@
 ctual);%0A
+        actual = solution2.matrixReshape(nums, r, c);%0A        assertArrayEquals(expected, actual);%0A
     %7D%0A%7D%0A

add a solution for 566