public void Velocity_ToUnit_When_ConvertingFromKiloMeterPerHourToMeterPerSecond_Then_ResultShouldBeAsExpected( double velocity, double expected) { var testee = new Velocity(velocity, x => x.Kilo.Meters / x.Hours); var result = testee.ToUnit(x => x.Meters / x.Seconds); result.Should().BeApproximately(expected, "m/s", TestHelper.DefaultAssertPrecision); }
public void Velocity_ToUnit_When_UnitsAreDifferent_Then_ResultShouldBeAsExpected( double velocity, double expected) { var testee = new Velocity(velocity, x => x.Miles / x.Hours); var result = testee.ToUnit(x => x.Kilo.Meters / x.Hours); result.Should().BeApproximately(expected, "km/h", TestHelper.DefaultAssertPrecision); }