Beispiel #1
0
        public void AverageOfLengthsWithNullValueThrowsException()
        {
            var units = new IQuantity[] { Length.FromMeters(1), null };

            Assert.Throws <NullReferenceException>(() => units.Average(LengthUnit.Centimeter));
        }
Beispiel #2
0
        public void AverageOfDifferentUnitsThrowsException()
        {
            var units = new IQuantity[] { Length.FromMeters(1), Volume.FromLiters(50) };

            Assert.Throws <ArgumentException>(() => units.Average(LengthUnit.Centimeter));
        }