Exemplo n.º 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 LitersPerMeter <T>(this T value) =>
 VolumePerLength.FromLitersPerMeter(Convert.ToDouble(value));
Exemplo n.º 3
0
 public void NumberToLitersPerMeterTest() =>
 Assert.Equal(VolumePerLength.FromLitersPerMeter(2), 2.LitersPerMeter());