public void From_ValueAndUnit_ReturnsQuantityWithSameValueAndUnit()
        {
            var quantity00 = RatioChangeRate.From(1, RatioChangeRateUnit.DecimalFractionPerSecond);

            AssertEx.EqualTolerance(1, quantity00.DecimalFractionsPerSecond, DecimalFractionsPerSecondTolerance);
            Assert.Equal(RatioChangeRateUnit.DecimalFractionPerSecond, quantity00.Unit);

            var quantity01 = RatioChangeRate.From(1, RatioChangeRateUnit.PercentPerSecond);

            AssertEx.EqualTolerance(1, quantity01.PercentsPerSecond, PercentsPerSecondTolerance);
            Assert.Equal(RatioChangeRateUnit.PercentPerSecond, quantity01.Unit);
        }
Ejemplo n.º 2
0
 public void FromValueAndUnit()
 {
     AssertEx.EqualTolerance(1, RatioChangeRate.From(1, RatioChangeRateUnit.DecimalFractionPerSecond).DecimalFractionsPerSecond, DecimalFractionsPerSecondTolerance);
     AssertEx.EqualTolerance(1, RatioChangeRate.From(1, RatioChangeRateUnit.PercentPerSecond).PercentsPerSecond, PercentsPerSecondTolerance);
 }