Exemple #1
0
        public void As_GivenWrongUnitType_ThrowsArgumentException()
        {
            IQuantity length = Length.FromMeters(1.2345);

            Assert.Throws <ArgumentException>(() => length.As(MassUnit.Kilogram));
        }
Exemple #2
0
 public double IQuantity_As() => lengthIQuantity.As(LengthUnit.Centimeter);