/// <summary> /// Converts given speed in kilometers per hour to miles per hour. /// </summary> /// <param name="kilometersPerHour"> /// Speed in kilometers per hour to convert. /// </param> /// <returns> /// Converted speed to miles per hour. /// </returns> public static double ConvertKilometersPerHourToMilesPerHour(double kilometersPerHour) { // Because unit of time stays the same, I can only convert length unit return(LengthConverter.ConvertKilometersToMiles(kilometersPerHour)); }
public void ConvertKilometersToMiles_WhenCalled_ReturnsLengthInMiles(double kilometers, double expectedResult) { Assert.AreEqual(expectedResult, LengthConverter.ConvertKilometersToMiles(kilometers), 0.0000000001); }