public void From_ValueAndUnit_ReturnsQuantityWithSameValueAndUnit()
        {
            var quantity00 = SpecificVolume.From(1, SpecificVolumeUnit.CubicFootPerPound);

            AssertEx.EqualTolerance(1, quantity00.CubicFeetPerPound, CubicFeetPerPoundTolerance);
            Assert.Equal(SpecificVolumeUnit.CubicFootPerPound, quantity00.Unit);

            var quantity01 = SpecificVolume.From(1, SpecificVolumeUnit.CubicMeterPerKilogram);

            AssertEx.EqualTolerance(1, quantity01.CubicMetersPerKilogram, CubicMetersPerKilogramTolerance);
            Assert.Equal(SpecificVolumeUnit.CubicMeterPerKilogram, quantity01.Unit);

            var quantity02 = SpecificVolume.From(1, SpecificVolumeUnit.MillicubicMeterPerKilogram);

            AssertEx.EqualTolerance(1, quantity02.MillicubicMetersPerKilogram, MillicubicMetersPerKilogramTolerance);
            Assert.Equal(SpecificVolumeUnit.MillicubicMeterPerKilogram, quantity02.Unit);
        }
 public void FromValueAndUnit()
 {
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.CenticubicMeterPerKilogram).CenticubicMetersPerKilogram, CenticubicMetersPerKilogramTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.CubicFootPerPound).CubicFeetPerPound, CubicFeetPerPoundTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.CubicMeterPerKilogram).CubicMetersPerKilogram, CubicMetersPerKilogramTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.DecacubicMeterPerKilogram).DecacubicMetersPerKilogram, DecacubicMetersPerKilogramTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.DecicubicMeterPerKilogram).DecicubicMetersPerKilogram, DecicubicMetersPerKilogramTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.ExacubicMeterPerKilogram).ExacubicMetersPerKilogram, ExacubicMetersPerKilogramTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.FemtocubicMeterPerKilogram).FemtocubicMetersPerKilogram, FemtocubicMetersPerKilogramTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.GigacubicMeterPerKilogram).GigacubicMetersPerKilogram, GigacubicMetersPerKilogramTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.HectocubicMeterPerKilogram).HectocubicMetersPerKilogram, HectocubicMetersPerKilogramTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.KilocubicMeterPerKilogram).KilocubicMetersPerKilogram, KilocubicMetersPerKilogramTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.MegacubicMeterPerKilogram).MegacubicMetersPerKilogram, MegacubicMetersPerKilogramTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.MicrocubicMeterPerKilogram).MicrocubicMetersPerKilogram, MicrocubicMetersPerKilogramTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.MillicubicMeterPerKilogram).MillicubicMetersPerKilogram, MillicubicMetersPerKilogramTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.NanocubicMeterPerKilogram).NanocubicMetersPerKilogram, NanocubicMetersPerKilogramTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.PetacubicMeterPerKilogram).PetacubicMetersPerKilogram, PetacubicMetersPerKilogramTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.PicocubicMeterPerKilogram).PicocubicMetersPerKilogram, PicocubicMetersPerKilogramTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.QutracubicMeterPerKilogram).QutracubicMetersPerKilogram, QutracubicMetersPerKilogramTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.TeracubicMeterPerKilogram).TeracubicMetersPerKilogram, TeracubicMetersPerKilogramTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.VettacubicMeterPerKilogram).VettacubicMetersPerKilogram, VettacubicMetersPerKilogramTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.YottacubicMeterPerKilogram).YottacubicMetersPerKilogram, YottacubicMetersPerKilogramTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.ZettacubicMeterPerKilogram).ZettacubicMetersPerKilogram, ZettacubicMetersPerKilogramTolerance);
 }
 public void FromValueAndUnit()
 {
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.CubicFootPerPound).CubicFeetPerPound, CubicFeetPerPoundTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.CubicMeterPerKilogram).CubicMetersPerKilogram, CubicMetersPerKilogramTolerance);
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.MillicubicMeterPerKilogram).MillicubicMetersPerKilogram, MillicubicMetersPerKilogramTolerance);
 }
Beispiel #4
0
 public void FromValueAndUnit()
 {
     AssertEx.EqualTolerance(1, SpecificVolume.From(1, SpecificVolumeUnit.CubicMeterPerKilogram).CubicMetersPerKilogram, CubicMetersPerKilogramTolerance);
 }