public void AmountToStandardUnitConverter_InstanceUnit_ReturnsGigaTimesOriginalValue() { var expected = AmountConverter.ToAmountType(1.0e9); var actual = this.instance.ConvertAmountToStandardUnit(AmountConverter.ToAmountType(1.0)); AmountAssert.AreEqual(expected, actual); }
public void GetAmount_UsingIUnit_ValidConversion() { var expected = AmountConverter.ToAmountType(500.0); var instance = new Measure <Length>(5.0, Length.Meter); var actual = instance.GetAmount(Length.CentiMeter); Assert.AreEqual(expected, actual); }
static AmountComparer() { smkEqualityTolerance = AmountConverter.ToAmountType(1.0e-5); Instance = new AmountComparer(); }