public void FromValueAndUnit() { AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.GigavoltampereReactive).GigavoltamperesReactive, GigavoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.KilovoltampereReactive).KilovoltamperesReactive, KilovoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.MegavoltampereReactive).MegavoltamperesReactive, MegavoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.VoltampereReactive).VoltamperesReactive, VoltamperesReactiveTolerance); }
public void From_ValueAndUnit_ReturnsQuantityWithSameValueAndUnit() { var quantity00 = ReactivePower.From(1, ReactivePowerUnit.GigavoltampereReactive); AssertEx.EqualTolerance(1, quantity00.GigavoltamperesReactive, GigavoltamperesReactiveTolerance); Assert.Equal(ReactivePowerUnit.GigavoltampereReactive, quantity00.Unit); var quantity01 = ReactivePower.From(1, ReactivePowerUnit.KilovoltampereReactive); AssertEx.EqualTolerance(1, quantity01.KilovoltamperesReactive, KilovoltamperesReactiveTolerance); Assert.Equal(ReactivePowerUnit.KilovoltampereReactive, quantity01.Unit); var quantity02 = ReactivePower.From(1, ReactivePowerUnit.MegavoltampereReactive); AssertEx.EqualTolerance(1, quantity02.MegavoltamperesReactive, MegavoltamperesReactiveTolerance); Assert.Equal(ReactivePowerUnit.MegavoltampereReactive, quantity02.Unit); var quantity03 = ReactivePower.From(1, ReactivePowerUnit.VoltampereReactive); AssertEx.EqualTolerance(1, quantity03.VoltamperesReactive, VoltamperesReactiveTolerance); Assert.Equal(ReactivePowerUnit.VoltampereReactive, quantity03.Unit); }
public void FromValueAndUnit() { AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.CentivoltampereReactive).CentivoltamperesReactive, CentivoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.DecavoltampereReactive).DecavoltamperesReactive, DecavoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.DecivoltampereReactive).DecivoltamperesReactive, DecivoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.ExavoltampereReactive).ExavoltamperesReactive, ExavoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.FemtovoltampereReactive).FemtovoltamperesReactive, FemtovoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.GigavoltampereReactive).GigavoltamperesReactive, GigavoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.HectovoltampereReactive).HectovoltamperesReactive, HectovoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.KilovoltampereReactive).KilovoltamperesReactive, KilovoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.MegavoltampereReactive).MegavoltamperesReactive, MegavoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.MicrovoltampereReactive).MicrovoltamperesReactive, MicrovoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.MillivoltampereReactive).MillivoltamperesReactive, MillivoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.NanovoltampereReactive).NanovoltamperesReactive, NanovoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.PetavoltampereReactive).PetavoltamperesReactive, PetavoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.PicovoltampereReactive).PicovoltamperesReactive, PicovoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.QutravoltampereReactive).QutravoltamperesReactive, QutravoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.TeravoltampereReactive).TeravoltamperesReactive, TeravoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.VettavoltampereReactive).VettavoltamperesReactive, VettavoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.VoltampereReactive).VoltamperesReactive, VoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.YottavoltampereReactive).YottavoltamperesReactive, YottavoltamperesReactiveTolerance); AssertEx.EqualTolerance(1, ReactivePower.From(1, ReactivePowerUnit.ZettavoltampereReactive).ZettavoltamperesReactive, ZettavoltamperesReactiveTolerance); }