public void test_solution_givenArray_returnsMaxProductOfTriplets(int[] given, int expected) { var target = new MaxProductOfThree(); var actual = target.solution(given); Assert.AreEqual(expected, actual); }
public void MaxProductOfThree_Should_Process_Negative_Array() { MaxProductOfThree subject = new MaxProductOfThree(); int[] array = { -5, 5, -5, 4 }; int result = subject.solution(array); Assert.Equal(125, result); }
public void MaxProductOfThree_Should_Process_Simple_Array() { MaxProductOfThree subject = new MaxProductOfThree(); int[] array = { -3, 1, 2, -2, 5, 6 }; int result = subject.solution(array); Assert.Equal(60, result); }
public void MaxProductOfThree_Should_Handle_Empty_Array() { MaxProductOfThree subject = new MaxProductOfThree(); int[] array = { }; int result = subject.solution(array); Assert.Equal(0, result); }
public void Case01() { // Arrange var algorithm = new MaxProductOfThree(); var A = new int[] { -3, 1, 2, -2, 5, 6 }; // Act var result = algorithm.solution(A); var expected = 60; // Assert Assert.Equal(expected, result); }
private void Test(int[] A, int expectedResult) { var result = _maxProductOfThree.solution(A); Assert.AreEqual(expectedResult, result); }
public void MaxProductOfThreeTest_01() { var solution = mt.solution(new int[] { -3, 1, 2, -2, 5, 6 }); Assert.AreEqual(60, solution); }