public void FromValueAndUnit()
 {
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Kilolux).Kilolux, KiloluxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Lux).Lux, LuxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Megalux).Megalux, MegaluxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Millilux).Millilux, MilliluxTolerance);
 }
Esempio n. 2
0
        public void From_ValueAndUnit_ReturnsQuantityWithSameValueAndUnit()
        {
            var quantity00 = Illuminance.From(1, IlluminanceUnit.FootCandle);

            AssertEx.EqualTolerance(1, quantity00.FootCandles, FootCandlesTolerance);
            Assert.Equal(IlluminanceUnit.FootCandle, quantity00.Unit);

            var quantity01 = Illuminance.From(1, IlluminanceUnit.Kilolux);

            AssertEx.EqualTolerance(1, quantity01.Kilolux, KiloluxTolerance);
            Assert.Equal(IlluminanceUnit.Kilolux, quantity01.Unit);

            var quantity02 = Illuminance.From(1, IlluminanceUnit.Lux);

            AssertEx.EqualTolerance(1, quantity02.Lux, LuxTolerance);
            Assert.Equal(IlluminanceUnit.Lux, quantity02.Unit);

            var quantity03 = Illuminance.From(1, IlluminanceUnit.Megalux);

            AssertEx.EqualTolerance(1, quantity03.Megalux, MegaluxTolerance);
            Assert.Equal(IlluminanceUnit.Megalux, quantity03.Unit);

            var quantity04 = Illuminance.From(1, IlluminanceUnit.Millilux);

            AssertEx.EqualTolerance(1, quantity04.Millilux, MilliluxTolerance);
            Assert.Equal(IlluminanceUnit.Millilux, quantity04.Unit);
        }
 public void FromValueAndUnit()
 {
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Centilux).Centilux, CentiluxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Decalux).Decalux, DecaluxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Decilux).Decilux, DeciluxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Exalux).Exalux, ExaluxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Femtolux).Femtolux, FemtoluxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Gigalux).Gigalux, GigaluxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Hectolux).Hectolux, HectoluxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Kilolux).Kilolux, KiloluxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Lux).Lux, LuxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Megalux).Megalux, MegaluxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Microlux).Microlux, MicroluxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Millilux).Millilux, MilliluxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Nanolux).Nanolux, NanoluxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Petalux).Petalux, PetaluxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Picolux).Picolux, PicoluxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Qutralux).Qutralux, QutraluxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Teralux).Teralux, TeraluxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Vettalux).Vettalux, VettaluxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Yottalux).Yottalux, YottaluxTolerance);
     AssertEx.EqualTolerance(1, Illuminance.From(1, IlluminanceUnit.Zettalux).Zettalux, ZettaluxTolerance);
 }