Пример #1
0
        public void TestMinWithDifferentUnits()
        {
            var amount1 = new Amount(10, LengthUnits.MilliMeter);
            var amount2 = new Amount(1, LengthUnits.Meter);

            Assert.Equal(amount1, AmountMath.Min(amount1, amount2));
            Assert.Equal(amount1, AmountMath.Min(amount2, amount1));
        }
Пример #2
0
        public void TestMin()
        {
            var amount1 = new Amount(10, TemperatureUnits.DegreeCelcius);
            var amount2 = new Amount(20, TemperatureUnits.DegreeCelcius);

            Assert.Equal(amount1, AmountMath.Min(amount1, amount2));
            Assert.Equal(amount1, AmountMath.Min(amount2, amount1));
        }