public void From_ValueAndUnit_ReturnsQuantityWithSameValueAndUnit() { var quantity00 = MassFlux.From(1, MassFluxUnit.GramPerSecondPerSquareMeter); AssertEx.EqualTolerance(1, quantity00.GramsPerSecondPerSquareMeter, GramsPerSecondPerSquareMeterTolerance); Assert.Equal(MassFluxUnit.GramPerSecondPerSquareMeter, quantity00.Unit); var quantity01 = MassFlux.From(1, MassFluxUnit.KilogramPerSecondPerSquareMeter); AssertEx.EqualTolerance(1, quantity01.KilogramsPerSecondPerSquareMeter, KilogramsPerSecondPerSquareMeterTolerance); Assert.Equal(MassFluxUnit.KilogramPerSecondPerSquareMeter, quantity01.Unit); }
public void FromValueAndUnit() { AssertEx.EqualTolerance(1, MassFlux.From(1, MassFluxUnit.GramPerSecondPerSquareMeter).GramsPerSecondPerSquareMeter, GramsPerSecondPerSquareMeterTolerance); AssertEx.EqualTolerance(1, MassFlux.From(1, MassFluxUnit.KilogramPerSecondPerSquareMeter).KilogramsPerSecondPerSquareMeter, KilogramsPerSecondPerSquareMeterTolerance); }
public void From_ValueAndUnit_ReturnsQuantityWithSameValueAndUnit() { var quantity00 = MassFlux.From(1, MassFluxUnit.GramPerHourPerSquareCentimeter); AssertEx.EqualTolerance(1, quantity00.GramsPerHourPerSquareCentimeter, GramsPerHourPerSquareCentimeterTolerance); Assert.Equal(MassFluxUnit.GramPerHourPerSquareCentimeter, quantity00.Unit); var quantity01 = MassFlux.From(1, MassFluxUnit.GramPerHourPerSquareMeter); AssertEx.EqualTolerance(1, quantity01.GramsPerHourPerSquareMeter, GramsPerHourPerSquareMeterTolerance); Assert.Equal(MassFluxUnit.GramPerHourPerSquareMeter, quantity01.Unit); var quantity02 = MassFlux.From(1, MassFluxUnit.GramPerHourPerSquareMillimeter); AssertEx.EqualTolerance(1, quantity02.GramsPerHourPerSquareMillimeter, GramsPerHourPerSquareMillimeterTolerance); Assert.Equal(MassFluxUnit.GramPerHourPerSquareMillimeter, quantity02.Unit); var quantity03 = MassFlux.From(1, MassFluxUnit.GramPerSecondPerSquareCentimeter); AssertEx.EqualTolerance(1, quantity03.GramsPerSecondPerSquareCentimeter, GramsPerSecondPerSquareCentimeterTolerance); Assert.Equal(MassFluxUnit.GramPerSecondPerSquareCentimeter, quantity03.Unit); var quantity04 = MassFlux.From(1, MassFluxUnit.GramPerSecondPerSquareMeter); AssertEx.EqualTolerance(1, quantity04.GramsPerSecondPerSquareMeter, GramsPerSecondPerSquareMeterTolerance); Assert.Equal(MassFluxUnit.GramPerSecondPerSquareMeter, quantity04.Unit); var quantity05 = MassFlux.From(1, MassFluxUnit.GramPerSecondPerSquareMillimeter); AssertEx.EqualTolerance(1, quantity05.GramsPerSecondPerSquareMillimeter, GramsPerSecondPerSquareMillimeterTolerance); Assert.Equal(MassFluxUnit.GramPerSecondPerSquareMillimeter, quantity05.Unit); var quantity06 = MassFlux.From(1, MassFluxUnit.KilogramPerHourPerSquareCentimeter); AssertEx.EqualTolerance(1, quantity06.KilogramsPerHourPerSquareCentimeter, KilogramsPerHourPerSquareCentimeterTolerance); Assert.Equal(MassFluxUnit.KilogramPerHourPerSquareCentimeter, quantity06.Unit); var quantity07 = MassFlux.From(1, MassFluxUnit.KilogramPerHourPerSquareMeter); AssertEx.EqualTolerance(1, quantity07.KilogramsPerHourPerSquareMeter, KilogramsPerHourPerSquareMeterTolerance); Assert.Equal(MassFluxUnit.KilogramPerHourPerSquareMeter, quantity07.Unit); var quantity08 = MassFlux.From(1, MassFluxUnit.KilogramPerHourPerSquareMillimeter); AssertEx.EqualTolerance(1, quantity08.KilogramsPerHourPerSquareMillimeter, KilogramsPerHourPerSquareMillimeterTolerance); Assert.Equal(MassFluxUnit.KilogramPerHourPerSquareMillimeter, quantity08.Unit); var quantity09 = MassFlux.From(1, MassFluxUnit.KilogramPerSecondPerSquareCentimeter); AssertEx.EqualTolerance(1, quantity09.KilogramsPerSecondPerSquareCentimeter, KilogramsPerSecondPerSquareCentimeterTolerance); Assert.Equal(MassFluxUnit.KilogramPerSecondPerSquareCentimeter, quantity09.Unit); var quantity10 = MassFlux.From(1, MassFluxUnit.KilogramPerSecondPerSquareMeter); AssertEx.EqualTolerance(1, quantity10.KilogramsPerSecondPerSquareMeter, KilogramsPerSecondPerSquareMeterTolerance); Assert.Equal(MassFluxUnit.KilogramPerSecondPerSquareMeter, quantity10.Unit); var quantity11 = MassFlux.From(1, MassFluxUnit.KilogramPerSecondPerSquareMillimeter); AssertEx.EqualTolerance(1, quantity11.KilogramsPerSecondPerSquareMillimeter, KilogramsPerSecondPerSquareMillimeterTolerance); Assert.Equal(MassFluxUnit.KilogramPerSecondPerSquareMillimeter, quantity11.Unit); }