public void ConversionRoundTrip()
        {
            TemperatureDelta kelvin = TemperatureDelta.FromKelvins(1);

            AssertEx.EqualTolerance(1, TemperatureDelta.FromCentidegreesCelsius(kelvin.CentidegreesCelsius).Kelvins, CentidegreesCelsiusTolerance);
            AssertEx.EqualTolerance(1, TemperatureDelta.FromDecidegreesCelsius(kelvin.DecidegreesCelsius).Kelvins, DecidegreesCelsiusTolerance);
            AssertEx.EqualTolerance(1, TemperatureDelta.FromDegreesCelsius(kelvin.DegreesCelsius).Kelvins, DegreesCelsiusTolerance);
            AssertEx.EqualTolerance(1, TemperatureDelta.FromDegreesDelisle(kelvin.DegreesDelisle).Kelvins, DegreesDelisleTolerance);
            AssertEx.EqualTolerance(1, TemperatureDelta.FromDegreesFahrenheit(kelvin.DegreesFahrenheit).Kelvins, DegreesFahrenheitTolerance);
            AssertEx.EqualTolerance(1, TemperatureDelta.FromDegreesNewton(kelvin.DegreesNewton).Kelvins, DegreesNewtonTolerance);
            AssertEx.EqualTolerance(1, TemperatureDelta.FromDegreesRankine(kelvin.DegreesRankine).Kelvins, DegreesRankineTolerance);
            AssertEx.EqualTolerance(1, TemperatureDelta.FromDegreesReaumur(kelvin.DegreesReaumur).Kelvins, DegreesReaumurTolerance);
            AssertEx.EqualTolerance(1, TemperatureDelta.FromDegreesRoemer(kelvin.DegreesRoemer).Kelvins, DegreesRoemerTolerance);
            AssertEx.EqualTolerance(1, TemperatureDelta.FromHectodegreesCelsius(kelvin.HectodegreesCelsius).Kelvins, HectodegreesCelsiusTolerance);
            AssertEx.EqualTolerance(1, TemperatureDelta.FromKelvins(kelvin.Kelvins).Kelvins, KelvinsTolerance);
            AssertEx.EqualTolerance(1, TemperatureDelta.FromKilodegreesCelsius(kelvin.KilodegreesCelsius).Kelvins, KilodegreesCelsiusTolerance);
            AssertEx.EqualTolerance(1, TemperatureDelta.FromMicrodegreesCelsius(kelvin.MicrodegreesCelsius).Kelvins, MicrodegreesCelsiusTolerance);
            AssertEx.EqualTolerance(1, TemperatureDelta.FromMillidegreesCelsius(kelvin.MillidegreesCelsius).Kelvins, MillidegreesCelsiusTolerance);
            AssertEx.EqualTolerance(1, TemperatureDelta.FromNanodegreesCelsius(kelvin.NanodegreesCelsius).Kelvins, NanodegreesCelsiusTolerance);
        }
 public void NumberToHectodegreesCelsiusTest() =>
 Assert.Equal(TemperatureDelta.FromHectodegreesCelsius(2), 2.HectodegreesCelsius());
예제 #3
0
 /// <inheritdoc cref="TemperatureDelta.FromHectodegreesCelsius(UnitsNet.QuantityValue)" />
 public static TemperatureDelta HectodegreesCelsius <T>(this T value) =>
 TemperatureDelta.FromHectodegreesCelsius(Convert.ToDouble(value));