public void test_solution_givenNonEmptyArray_returnsTheNumberOfPairs(int[] given, int expected) { var target = new PassingCars(); int actual = target.solution(given); Assert.AreEqual(expected, actual); }
public void PassingSars_Should_Process_Simple_Array() { PassingCars subject = new PassingCars(); int[] array = { 0, 1, 0, 1, 1 }; int result = subject.solution(array); Assert.Equal(5, result); }
public void PassingCars_Should_Process_West_Only_Array() { PassingCars subject = new PassingCars(); int[] array = { 1, 1, 1, 1, 1 }; int result = subject.solution(array); Assert.Equal(0, result); }
public void Case01() { // Arrange var A = new int[] { 0, 1, 0, 1, 1 }; var algorithm = new PassingCars(); // Act int result = algorithm.solution(A); // Assert int expected = 5; Assert.Equal(expected, result); }
public void PassingCars() { int[] cars = new int[] { 0, 1, 0, 1, 1 }; Assert.IsTrue(pc.solution(cars) == 5); }
public void PassingCarsTest() { var solution = pc.solution(new int[] { 0, 1, 0, 1, 1 }); Assert.AreEqual(5, solution); }
private void Test(int[] a, int expectedResult) { var result = _passingCars.solution(a); Assert.AreEqual(expectedResult, result); }