예제 #1
0
 public void FromValueAndUnit()
 {
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.Atmosphere).Atmospheres, AtmospheresTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.Bar).Bars, BarsTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.Centibar).Centibars, CentibarsTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.Decapascal).Decapascals, DecapascalsTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.Decibar).Decibars, DecibarsTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.Gigapascal).Gigapascals, GigapascalsTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.Hectopascal).Hectopascals, HectopascalsTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.Kilobar).Kilobars, KilobarsTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.KilogramForcePerSquareCentimeter).KilogramsForcePerSquareCentimeter, KilogramsForcePerSquareCentimeterTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.KilogramForcePerSquareMeter).KilogramsForcePerSquareMeter, KilogramsForcePerSquareMeterTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.KilogramForcePerSquareMillimeter).KilogramsForcePerSquareMillimeter, KilogramsForcePerSquareMillimeterTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.KilonewtonPerSquareCentimeter).KilonewtonsPerSquareCentimeter, KilonewtonsPerSquareCentimeterTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.KilonewtonPerSquareMeter).KilonewtonsPerSquareMeter, KilonewtonsPerSquareMeterTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.KilonewtonPerSquareMillimeter).KilonewtonsPerSquareMillimeter, KilonewtonsPerSquareMillimeterTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.Kilopascal).Kilopascals, KilopascalsTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.KilopoundForcePerSquareFoot).KilopoundsForcePerSquareFoot, KilopoundsForcePerSquareFootTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.KilopoundForcePerSquareInch).KilopoundsForcePerSquareInch, KilopoundsForcePerSquareInchTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.Megabar).Megabars, MegabarsTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.Megapascal).Megapascals, MegapascalsTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.Micropascal).Micropascals, MicropascalsTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.Millibar).Millibars, MillibarsTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.NewtonPerSquareCentimeter).NewtonsPerSquareCentimeter, NewtonsPerSquareCentimeterTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.NewtonPerSquareMeter).NewtonsPerSquareMeter, NewtonsPerSquareMeterTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.NewtonPerSquareMillimeter).NewtonsPerSquareMillimeter, NewtonsPerSquareMillimeterTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.Pascal).Pascals, PascalsTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.PoundForcePerSquareFoot).PoundsForcePerSquareFoot, PoundsForcePerSquareFootTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.PoundForcePerSquareInch).PoundsForcePerSquareInch, PoundsForcePerSquareInchTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.Psi).Psi, PsiTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.TechnicalAtmosphere).TechnicalAtmospheres, TechnicalAtmospheresTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.TonneForcePerSquareCentimeter).TonnesForcePerSquareCentimeter, TonnesForcePerSquareCentimeterTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.TonneForcePerSquareMeter).TonnesForcePerSquareMeter, TonnesForcePerSquareMeterTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.TonneForcePerSquareMillimeter).TonnesForcePerSquareMillimeter, TonnesForcePerSquareMillimeterTolerance);
     Assert.AreEqual(1, Elasticity.From(1, ElasticityUnit.Torr).Torrs, TorrsTolerance);
 }