Пример #1
0
        public void ConversionRoundTrip()
        {
            VolumePerLength cubicmeterpermeter = VolumePerLength.FromCubicMetersPerMeter(1);

            AssertEx.EqualTolerance(1, VolumePerLength.FromCubicMetersPerMeter(cubicmeterpermeter.CubicMetersPerMeter).CubicMetersPerMeter, CubicMetersPerMeterTolerance);
            AssertEx.EqualTolerance(1, VolumePerLength.FromLitersPerMeter(cubicmeterpermeter.LitersPerMeter).CubicMetersPerMeter, LitersPerMeterTolerance);
            AssertEx.EqualTolerance(1, VolumePerLength.FromOilBarrelsPerFoot(cubicmeterpermeter.OilBarrelsPerFoot).CubicMetersPerMeter, OilBarrelsPerFootTolerance);
        }
 public static VolumePerLength OilBarrelsPerFoot <T>(this T value) =>
 VolumePerLength.FromOilBarrelsPerFoot(Convert.ToDouble(value));
Пример #3
0
 public void NumberToOilBarrelsPerFootTest() =>
 Assert.Equal(VolumePerLength.FromOilBarrelsPerFoot(2), 2.OilBarrelsPerFoot());