public void Test003_GivenSpeedControl_WhenMoreThanTwoDistanceSamplesExist_ThenReturnTheCorrectSpeed() { double[] distanceSamples = new double[] { 0.0, 0.19, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25 }; int seconds = 15; int expectedResult = 74; int actualResult = SpeedControl.GetMaxAverageSpeedPerHour(seconds, distanceSamples); Assert.AreEqual(expectedResult, actualResult); }
public void Test001_GivenSpeedControl_WhenLessThanTwoDistanceSamplesExist_ThenZeroIsReturned() { double[] distanceSamples = new double[] { 0.0 }; int seconds = 25; int expectedResult = 0; int actualResult = SpeedControl.GetMaxAverageSpeedPerHour(seconds, distanceSamples); Assert.AreEqual(expectedResult, actualResult); }