public void MaxCounterTest_01() { var solution = mx.solution(5, new int[] { 3, 4, 4, 6, 1, 4, 4 }); var expected = new int[] { 3, 2, 2, 4, 2 }; CollectionAssert.AreEqual(expected, solution); }
public void test_solution_givenArray_returnsCounters(int[] given, int counterNumber, object expected) { var target = new MaxCounters(); var actual = target.solution(counterNumber, given); Assert.AreEqual(expected, actual); }
public void MaxCountersTest_Given_Returns_32242() { int N = 5; int[] A = { 3, 4, 4, 6, 1, 4, 4 }; int[] RetVal = { 3, 2, 2, 4, 2 }; CollectionAssert.AreEquivalent(_mCounter.solution(N, A), RetVal); }
public void MaxCounters_Should_Validate_Single_Array() { MaxCounters subject = new MaxCounters(); int[] array = { 3 }; int[] expectedArray = { 0, 0, 1 }; int[] result = subject.solution(3, array); Assert.Equal(expectedArray, result); }
public void MaxCounters_Should_Validate_Simple_Array() { MaxCounters subject = new MaxCounters(); int[] array = { 3, 4, 4, 6, 1, 4, 4 }; int[] expectedArray = { 3, 2, 2, 4, 2 }; int[] result = subject.solution(5, array); Assert.Equal(expectedArray, result); }
public void Case01() { // Arrange var algorithm = new MaxCounters(); int N = 5; var A = new int[] { 3, 4, 4, 6, 1, 4, 4 }; // Act var result = algorithm.solution(N, A); var expected = new int[] { 3, 2, 2, 4, 2 }; // Assert Assert.Equal(expected, result); }
private void Test(int N, int[] a, int[] expectedResult) { var result = _maxCounters.solution(N, a); CollectionAssert.AreEqual(result, expectedResult); }