Ejemplo n.º 1
0
        public void ConversionRoundTrip()
        {
            Magnetization amperepermeter = Magnetization.FromAmperesPerMeter(1);

            AssertEx.EqualTolerance(1, Magnetization.FromAmperesPerMeter(amperepermeter.AmperesPerMeter).AmperesPerMeter, AmperesPerMeterTolerance);
            AssertEx.EqualTolerance(1, Magnetization.FromDecaamperesPerMeter(amperepermeter.DecaamperesPerMeter).AmperesPerMeter, DecaamperesPerMeterTolerance);
            AssertEx.EqualTolerance(1, Magnetization.FromKiloamperesPerMeter(amperepermeter.KiloamperesPerMeter).AmperesPerMeter, KiloamperesPerMeterTolerance);
            AssertEx.EqualTolerance(1, Magnetization.FromMegaamperesPerMeter(amperepermeter.MegaamperesPerMeter).AmperesPerMeter, MegaamperesPerMeterTolerance);
            AssertEx.EqualTolerance(1, Magnetization.FromMicroamperesPerMeter(amperepermeter.MicroamperesPerMeter).AmperesPerMeter, MicroamperesPerMeterTolerance);
            AssertEx.EqualTolerance(1, Magnetization.FromMilliamperesPerMeter(amperepermeter.MilliamperesPerMeter).AmperesPerMeter, MilliamperesPerMeterTolerance);
            AssertEx.EqualTolerance(1, Magnetization.FromNanoamperesPerMeter(amperepermeter.NanoamperesPerMeter).AmperesPerMeter, NanoamperesPerMeterTolerance);
        }