public void TestMaxProductOfThree(int expected, params int[] A) { var prob = new MaxProductOfThree(); Assert.AreEqual(expected, prob.solution(A)); }
public void TestNegative() { Assert.AreEqual(-1, MaxProductOfThree.Solution(new int[] { -3, -1, -2, -2, -1, -1 })); }
public void TestSame() { Assert.AreEqual(216, MaxProductOfThree.Solution(new int[] { -3, 1, 2, -2, 5, 6, 6, 6 })); }
public void TestNegativeAgain() { Assert.AreEqual(18018, MaxProductOfThree.Solution(new int[] { -3, 1, 2, -2, 5, 6, 6, 6, -1001 })); }
public void DoubleNegative() { Assert.AreEqual(125, MaxProductOfThree.Solution(new int[] { -5, 5, -5, 4 })); }