public void test_solution_withGivenArray_returnsTheEarliestTimeWhenTheFrogCanJump(int[] given, int expected, int distance) { var target = new FrogRiverOne(); var actual = target.solution(distance, given); Assert.AreEqual(expected, actual); }
public void FrogRiverOne_Should_Validate_Complex_Array() { FrogRiverOne subject = new FrogRiverOne(); int[] array = { 4, 1, 2, 8, 7, 3, 2, 6, 1, 2, 9, 11, 13, 14, 16, 17, 12, 13, 14, 15, 18, 5, 10 }; int result = subject.solution(10, array); Assert.Equal(22, result); }
public void FrogRiverOne_Should_Invalidate_Incomplete_Array() { FrogRiverOne subject = new FrogRiverOne(); int[] array = { 4, 1, 2 }; int result = subject.solution(5, array); Assert.Equal(-1, result); }
public void FrogRiverOne_Should_Validate_Complete_Array() { FrogRiverOne subject = new FrogRiverOne(); int[] array = { 1, 3, 1, 4, 2, 3, 5, 4 }; int result = subject.solution(5, array); Assert.Equal(6, result); }
public void FrogRiverOne_Should_Handle_Empty_Array() { FrogRiverOne subject = new FrogRiverOne(); int[] array = { }; int result = subject.solution(1, array); Assert.Equal(-1, result); }
public void Case1() { // Arrange var algorithm = new FrogRiverOne(); int X = 5; var A = new int[] { 1, 3, 1, 4, 2, 3, 5, 4 }; // Act var result = algorithm.solution(X, A); // Assert var expected = 6; Assert.Equal(expected, result); }
public void FrogRiverOneTest_01() { var result = fg.solution(5, new int[] { 1, 3, 1, 4, 2, 3, 5 }); Assert.AreEqual(6, result); }
private void Test(int x, int[] a, int expectedResult) { var result = _frogRiverOne.solution(x, a); Assert.AreEqual(expectedResult, result); }