public void ConversionRoundTrip() { ElectricConductivity siemenspermeter = ElectricConductivity.FromSiemensPerMeter(1); AssertEx.EqualTolerance(1, ElectricConductivity.FromSiemensPerFoot(siemenspermeter.SiemensPerFoot).SiemensPerMeter, SiemensPerFootTolerance); AssertEx.EqualTolerance(1, ElectricConductivity.FromSiemensPerInch(siemenspermeter.SiemensPerInch).SiemensPerMeter, SiemensPerInchTolerance); AssertEx.EqualTolerance(1, ElectricConductivity.FromSiemensPerMeter(siemenspermeter.SiemensPerMeter).SiemensPerMeter, SiemensPerMeterTolerance); }
public static ElectricConductivity SiemensPerInch <T>(this T value) => ElectricConductivity.FromSiemensPerInch(Convert.ToDecimal(value));
public void NumberToSiemensPerInchTest() => Assert.Equal(ElectricConductivity.FromSiemensPerInch(2), 2.SiemensPerInch());