public void From_ValueAndUnit_ReturnsQuantityWithSameValueAndUnit() { var quantity00 = AreaDensity.From(1, AreaDensityUnit.KilogramPerSquareMeter); AssertEx.EqualTolerance(1, quantity00.KilogramsPerSquareMeter, KilogramsPerSquareMeterTolerance); Assert.Equal(AreaDensityUnit.KilogramPerSquareMeter, quantity00.Unit); }
public void From_ValueAndUnit_ReturnsQuantityWithSameValueAndUnit() { var quantity00 = AreaDensity.From(1, AreaDensityUnit.GramPerSquareMeter); AssertEx.EqualTolerance(1, quantity00.GramPerSquareMeters, GramPerSquareMetersTolerance); Assert.Equal(AreaDensityUnit.GramPerSquareMeter, quantity00.Unit); var quantity01 = AreaDensity.From(1, AreaDensityUnit.KilogramPerSquareCentimeter); AssertEx.EqualTolerance(1, quantity01.KilogramPerSquareCentimeters, KilogramPerSquareCentimetersTolerance); Assert.Equal(AreaDensityUnit.KilogramPerSquareCentimeter, quantity01.Unit); var quantity02 = AreaDensity.From(1, AreaDensityUnit.KilogramPerSquareMeter); AssertEx.EqualTolerance(1, quantity02.KilogramsPerSquareMeter, KilogramsPerSquareMeterTolerance); Assert.Equal(AreaDensityUnit.KilogramPerSquareMeter, quantity02.Unit); var quantity03 = AreaDensity.From(1, AreaDensityUnit.KipsPerSquareFoot); AssertEx.EqualTolerance(1, quantity03.KipsPerSquareFoots, KipsPerSquareFootsTolerance); Assert.Equal(AreaDensityUnit.KipsPerSquareFoot, quantity03.Unit); var quantity04 = AreaDensity.From(1, AreaDensityUnit.KipsPerSquareInch); AssertEx.EqualTolerance(1, quantity04.KipsPerSquareInchs, KipsPerSquareInchsTolerance); Assert.Equal(AreaDensityUnit.KipsPerSquareInch, quantity04.Unit); }
public void FromValueAndUnit() { AssertEx.EqualTolerance(1, AreaDensity.From(1, AreaDensityUnit.KilogramPerSquareMeter).KilogramsPerSquareMeter, KilogramsPerSquareMeterTolerance); }