Пример #1
0
        public void GetAmountOfQuantity_UsingIUnit_ValidConversion()
        {
            var expected = AmountConverter.ToAmountType(500.0);
            var instance = new Length(5.0);
            var actual   = instance.GetAmount(Length.CentiMeter);

            Assert.AreEqual(expected, actual);
        }
Пример #2
0
 static AmountComparer()
 {
     smkEqualityTolerance = AmountConverter.ToAmountType(1.0e-5);
     Instance             = new AmountComparer();
 }