public void From_ValueAndUnit_ReturnsQuantityWithSameValueAndUnit() { var quantity00 = PowerRatio.From(1, PowerRatioUnit.DecibelMilliwatt); AssertEx.EqualTolerance(1, quantity00.DecibelMilliwatts, DecibelMilliwattsTolerance); Assert.Equal(PowerRatioUnit.DecibelMilliwatt, quantity00.Unit); var quantity01 = PowerRatio.From(1, PowerRatioUnit.DecibelWatt); AssertEx.EqualTolerance(1, quantity01.DecibelWatts, DecibelWattsTolerance); Assert.Equal(PowerRatioUnit.DecibelWatt, quantity01.Unit); }
public void FromValueAndUnit() { AssertEx.EqualTolerance(1, PowerRatio.From(1, PowerRatioUnit.DecibelMilliwatt).DecibelMilliwatts, DecibelMilliwattsTolerance); AssertEx.EqualTolerance(1, PowerRatio.From(1, PowerRatioUnit.DecibelWatt).DecibelWatts, DecibelWattsTolerance); }