Example #1
0
        public void ConversionRoundTrip()
        {
            ElectricCurrentDensity amperepersquaremeter = ElectricCurrentDensity.FromAmperesPerSquareMeter(1);

            AssertEx.EqualTolerance(1, ElectricCurrentDensity.FromAmperesPerSquareFoot(amperepersquaremeter.AmperesPerSquareFoot).AmperesPerSquareMeter, AmperesPerSquareFootTolerance);
            AssertEx.EqualTolerance(1, ElectricCurrentDensity.FromAmperesPerSquareInch(amperepersquaremeter.AmperesPerSquareInch).AmperesPerSquareMeter, AmperesPerSquareInchTolerance);
            AssertEx.EqualTolerance(1, ElectricCurrentDensity.FromAmperesPerSquareMeter(amperepersquaremeter.AmperesPerSquareMeter).AmperesPerSquareMeter, AmperesPerSquareMeterTolerance);
        }
 public void NumberToAmperesPerSquareInchTest() =>
 Assert.Equal(ElectricCurrentDensity.FromAmperesPerSquareInch(2), 2.AmperesPerSquareInch());
 public static ElectricCurrentDensity AmperesPerSquareInch <T>(this T value) =>
 ElectricCurrentDensity.FromAmperesPerSquareInch(Convert.ToDecimal(value));