예제 #1
0
        public void ConversionRoundTrip()
        {
            Elasticity newtonpersquaremeter = Elasticity.FromNewtonsPerSquareMeter(1);

            Assert.AreEqual(1, Elasticity.FromAtmospheres(newtonpersquaremeter.Atmospheres).NewtonsPerSquareMeter, AtmospheresTolerance);
            Assert.AreEqual(1, Elasticity.FromBars(newtonpersquaremeter.Bars).NewtonsPerSquareMeter, BarsTolerance);
            Assert.AreEqual(1, Elasticity.FromCentibars(newtonpersquaremeter.Centibars).NewtonsPerSquareMeter, CentibarsTolerance);
            Assert.AreEqual(1, Elasticity.FromDecapascals(newtonpersquaremeter.Decapascals).NewtonsPerSquareMeter, DecapascalsTolerance);
            Assert.AreEqual(1, Elasticity.FromDecibars(newtonpersquaremeter.Decibars).NewtonsPerSquareMeter, DecibarsTolerance);
            Assert.AreEqual(1, Elasticity.FromGigapascals(newtonpersquaremeter.Gigapascals).NewtonsPerSquareMeter, GigapascalsTolerance);
            Assert.AreEqual(1, Elasticity.FromHectopascals(newtonpersquaremeter.Hectopascals).NewtonsPerSquareMeter, HectopascalsTolerance);
            Assert.AreEqual(1, Elasticity.FromKilobars(newtonpersquaremeter.Kilobars).NewtonsPerSquareMeter, KilobarsTolerance);
            Assert.AreEqual(1, Elasticity.FromKilogramsForcePerSquareCentimeter(newtonpersquaremeter.KilogramsForcePerSquareCentimeter).NewtonsPerSquareMeter, KilogramsForcePerSquareCentimeterTolerance);
            Assert.AreEqual(1, Elasticity.FromKilogramsForcePerSquareMeter(newtonpersquaremeter.KilogramsForcePerSquareMeter).NewtonsPerSquareMeter, KilogramsForcePerSquareMeterTolerance);
            Assert.AreEqual(1, Elasticity.FromKilogramsForcePerSquareMillimeter(newtonpersquaremeter.KilogramsForcePerSquareMillimeter).NewtonsPerSquareMeter, KilogramsForcePerSquareMillimeterTolerance);
            Assert.AreEqual(1, Elasticity.FromKilonewtonsPerSquareCentimeter(newtonpersquaremeter.KilonewtonsPerSquareCentimeter).NewtonsPerSquareMeter, KilonewtonsPerSquareCentimeterTolerance);
            Assert.AreEqual(1, Elasticity.FromKilonewtonsPerSquareMeter(newtonpersquaremeter.KilonewtonsPerSquareMeter).NewtonsPerSquareMeter, KilonewtonsPerSquareMeterTolerance);
            Assert.AreEqual(1, Elasticity.FromKilonewtonsPerSquareMillimeter(newtonpersquaremeter.KilonewtonsPerSquareMillimeter).NewtonsPerSquareMeter, KilonewtonsPerSquareMillimeterTolerance);
            Assert.AreEqual(1, Elasticity.FromKilopascals(newtonpersquaremeter.Kilopascals).NewtonsPerSquareMeter, KilopascalsTolerance);
            Assert.AreEqual(1, Elasticity.FromKilopoundsForcePerSquareFoot(newtonpersquaremeter.KilopoundsForcePerSquareFoot).NewtonsPerSquareMeter, KilopoundsForcePerSquareFootTolerance);
            Assert.AreEqual(1, Elasticity.FromKilopoundsForcePerSquareInch(newtonpersquaremeter.KilopoundsForcePerSquareInch).NewtonsPerSquareMeter, KilopoundsForcePerSquareInchTolerance);
            Assert.AreEqual(1, Elasticity.FromMegabars(newtonpersquaremeter.Megabars).NewtonsPerSquareMeter, MegabarsTolerance);
            Assert.AreEqual(1, Elasticity.FromMegapascals(newtonpersquaremeter.Megapascals).NewtonsPerSquareMeter, MegapascalsTolerance);
            Assert.AreEqual(1, Elasticity.FromMicropascals(newtonpersquaremeter.Micropascals).NewtonsPerSquareMeter, MicropascalsTolerance);
            Assert.AreEqual(1, Elasticity.FromMillibars(newtonpersquaremeter.Millibars).NewtonsPerSquareMeter, MillibarsTolerance);
            Assert.AreEqual(1, Elasticity.FromNewtonsPerSquareCentimeter(newtonpersquaremeter.NewtonsPerSquareCentimeter).NewtonsPerSquareMeter, NewtonsPerSquareCentimeterTolerance);
            Assert.AreEqual(1, Elasticity.FromNewtonsPerSquareMeter(newtonpersquaremeter.NewtonsPerSquareMeter).NewtonsPerSquareMeter, NewtonsPerSquareMeterTolerance);
            Assert.AreEqual(1, Elasticity.FromNewtonsPerSquareMillimeter(newtonpersquaremeter.NewtonsPerSquareMillimeter).NewtonsPerSquareMeter, NewtonsPerSquareMillimeterTolerance);
            Assert.AreEqual(1, Elasticity.FromPascals(newtonpersquaremeter.Pascals).NewtonsPerSquareMeter, PascalsTolerance);
            Assert.AreEqual(1, Elasticity.FromPoundsForcePerSquareFoot(newtonpersquaremeter.PoundsForcePerSquareFoot).NewtonsPerSquareMeter, PoundsForcePerSquareFootTolerance);
            Assert.AreEqual(1, Elasticity.FromPoundsForcePerSquareInch(newtonpersquaremeter.PoundsForcePerSquareInch).NewtonsPerSquareMeter, PoundsForcePerSquareInchTolerance);
            Assert.AreEqual(1, Elasticity.FromPsi(newtonpersquaremeter.Psi).NewtonsPerSquareMeter, PsiTolerance);
            Assert.AreEqual(1, Elasticity.FromTechnicalAtmospheres(newtonpersquaremeter.TechnicalAtmospheres).NewtonsPerSquareMeter, TechnicalAtmospheresTolerance);
            Assert.AreEqual(1, Elasticity.FromTonnesForcePerSquareCentimeter(newtonpersquaremeter.TonnesForcePerSquareCentimeter).NewtonsPerSquareMeter, TonnesForcePerSquareCentimeterTolerance);
            Assert.AreEqual(1, Elasticity.FromTonnesForcePerSquareMeter(newtonpersquaremeter.TonnesForcePerSquareMeter).NewtonsPerSquareMeter, TonnesForcePerSquareMeterTolerance);
            Assert.AreEqual(1, Elasticity.FromTonnesForcePerSquareMillimeter(newtonpersquaremeter.TonnesForcePerSquareMillimeter).NewtonsPerSquareMeter, TonnesForcePerSquareMillimeterTolerance);
            Assert.AreEqual(1, Elasticity.FromTorrs(newtonpersquaremeter.Torrs).NewtonsPerSquareMeter, TorrsTolerance);
        }