Skip to content

Instantly share code, notes, and snippets.

@i-van
Created June 2, 2017 10:55
Show Gist options
  • Save i-van/9deeaa532174e82f401f9d7b9685faf6 to your computer and use it in GitHub Desktop.
Save i-van/9deeaa532174e82f401f9d7b9685faf6 to your computer and use it in GitHub Desktop.
import org.junit.Test;
import org.junit.Assert;
import org.junit.runners.JUnit4;
import java.util.Arrays;
public class SolutionTest {
@Test
public void testSomething1() {
int[] actual = Solution.arrayOfArrayProducts(new int[0]);
System.out.print("<ACTUAL::1::>" + Arrays.toString(actual));
Assert.assertArrayEquals(Solution.arrayOfArrayProducts(new int[0]), new int[0]);
}
@Test
public void testSomething2() {
int[] actual = Solution.arrayOfArrayProducts(new int[]{1});
System.out.print("<ACTUAL::2::>" + Arrays.toString(actual));
Assert.assertArrayEquals(Solution.arrayOfArrayProducts(new int[]{1}), new int[0]);
}
@Test
public void testSomething3() {
int[] actual = Solution.arrayOfArrayProducts(new int[]{2, 2});
System.out.print("<ACTUAL::3::>" + Arrays.toString(actual));
Assert.assertArrayEquals(Solution.arrayOfArrayProducts(new int[]{2, 2}), new int[]{2, 2});
}
@Test
public void testSomething4() {
int[] actual = Solution.arrayOfArrayProducts(new int[]{2, 7, 3, 4});
System.out.print("<ACTUAL::4::>" + Arrays.toString(actual));
Assert.assertArrayEquals(Solution.arrayOfArrayProducts(new int[]{2, 7, 3, 4}), new int[]{84, 24, 56, 42});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment