public void From_ValueAndUnit_ReturnsQuantityWithSameValueAndUnit() { var quantity00 = Magnetization.From(1, MagnetizationUnit.AmperePerMeter); AssertEx.EqualTolerance(1, quantity00.AmperesPerMeter, AmperesPerMeterTolerance); Assert.Equal(MagnetizationUnit.AmperePerMeter, quantity00.Unit); }
public void FromValueAndUnit() { AssertEx.EqualTolerance(1, Magnetization.From(1, MagnetizationUnit.AmperePerMeter).AmperesPerMeter, AmperesPerMeterTolerance); AssertEx.EqualTolerance(1, Magnetization.From(1, MagnetizationUnit.DecaamperePerMeter).DecaamperesPerMeter, DecaamperesPerMeterTolerance); AssertEx.EqualTolerance(1, Magnetization.From(1, MagnetizationUnit.KiloamperePerMeter).KiloamperesPerMeter, KiloamperesPerMeterTolerance); AssertEx.EqualTolerance(1, Magnetization.From(1, MagnetizationUnit.MegaamperePerMeter).MegaamperesPerMeter, MegaamperesPerMeterTolerance); AssertEx.EqualTolerance(1, Magnetization.From(1, MagnetizationUnit.MicroamperePerMeter).MicroamperesPerMeter, MicroamperesPerMeterTolerance); AssertEx.EqualTolerance(1, Magnetization.From(1, MagnetizationUnit.MilliamperePerMeter).MilliamperesPerMeter, MilliamperesPerMeterTolerance); AssertEx.EqualTolerance(1, Magnetization.From(1, MagnetizationUnit.NanoamperePerMeter).NanoamperesPerMeter, NanoamperesPerMeterTolerance); }
public void FromValueAndUnit() { AssertEx.EqualTolerance(1, Magnetization.From(1, MagnetizationUnit.AmperePerMeter).AmperesPerMeter, AmperesPerMeterTolerance); }