diff --git a/Mathematica/UnitConverter/_scripts/_tests/AccelerationConverterTests.cs b/Mathematica/UnitConverter/_scripts/_tests/AccelerationConverterTests.cs deleted file mode 100644 index eabdbda..0000000 --- a/Mathematica/UnitConverter/_scripts/_tests/AccelerationConverterTests.cs +++ /dev/null @@ -1,130 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Mathematica; - -namespace Mathematica.Test -{ - [TestClass] - public class AccelerationConverterTests - { - [TestMethod] - public void meter_per_second_squaredToinch_per_second_squaredTest() - { - double result = UnitConverter.ConvertAcceleration(100, UnitConverter.AccelerationConversionType.METER_PER_SECOND_SQUARED_TO_INCH_PER_SECOND_SQUARED); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void meter_per_second_squaredTofoot_per_second_squaredTest() - { - double result = UnitConverter.ConvertAcceleration(100, UnitConverter.AccelerationConversionType.METER_PER_SECOND_SQUARED_TO_FOOT_PER_SECOND_SQUARED); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void meter_per_second_squaredTostandard_acceleration_of_gravityTest() - { - double result = UnitConverter.ConvertAcceleration(100, UnitConverter.AccelerationConversionType.METER_PER_SECOND_SQUARED_TO_STANDARD_ACCELERATION_OF_GRAVITY); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_per_second_squaredTometer_per_second_squaredTest() - { - double result = UnitConverter.ConvertAcceleration(100, UnitConverter.AccelerationConversionType.INCH_PER_SECOND_SQUARED_TO_METER_PER_SECOND_SQUARED); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_per_second_squaredTofoot_per_second_squaredTest() - { - double result = UnitConverter.ConvertAcceleration(100, UnitConverter.AccelerationConversionType.INCH_PER_SECOND_SQUARED_TO_FOOT_PER_SECOND_SQUARED); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_per_second_squaredTostandard_acceleration_of_gravityTest() - { - double result = UnitConverter.ConvertAcceleration(100, UnitConverter.AccelerationConversionType.INCH_PER_SECOND_SQUARED_TO_STANDARD_ACCELERATION_OF_GRAVITY); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_per_second_squaredTometer_per_second_squaredTest() - { - double result = UnitConverter.ConvertAcceleration(100, UnitConverter.AccelerationConversionType.FOOT_PER_SECOND_SQUARED_TO_METER_PER_SECOND_SQUARED); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_per_second_squaredToinch_per_second_squaredTest() - { - double result = UnitConverter.ConvertAcceleration(100, UnitConverter.AccelerationConversionType.FOOT_PER_SECOND_SQUARED_TO_INCH_PER_SECOND_SQUARED); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_per_second_squaredTostandard_acceleration_of_gravityTest() - { - double result = UnitConverter.ConvertAcceleration(100, UnitConverter.AccelerationConversionType.FOOT_PER_SECOND_SQUARED_TO_STANDARD_ACCELERATION_OF_GRAVITY); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void standard_acceleration_of_gravityTometer_per_second_squaredTest() - { - double result = UnitConverter.ConvertAcceleration(100, UnitConverter.AccelerationConversionType.STANDARD_ACCELERATION_OF_GRAVITY_TO_METER_PER_SECOND_SQUARED); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void standard_acceleration_of_gravityToinch_per_second_squaredTest() - { - double result = UnitConverter.ConvertAcceleration(100, UnitConverter.AccelerationConversionType.STANDARD_ACCELERATION_OF_GRAVITY_TO_INCH_PER_SECOND_SQUARED); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void standard_acceleration_of_gravityTofoot_per_second_squaredTest() - { - double result = UnitConverter.ConvertAcceleration(100, UnitConverter.AccelerationConversionType.STANDARD_ACCELERATION_OF_GRAVITY_TO_FOOT_PER_SECOND_SQUARED); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - } -} diff --git a/Mathematica/UnitConverter/_scripts/_tests/AreaConverterTests.cs b/Mathematica/UnitConverter/_scripts/_tests/AreaConverterTests.cs deleted file mode 100644 index b8a3a45..0000000 --- a/Mathematica/UnitConverter/_scripts/_tests/AreaConverterTests.cs +++ /dev/null @@ -1,350 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Mathematica; - -namespace Mathematica.Test -{ - [TestClass] - public class AreaConverterTests - { - [TestMethod] - public void square_meterToacreTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_METER_TO_ACRE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_meterTosquare_footTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_METER_TO_SQUARE_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_meterTosquare_yardTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_METER_TO_SQUARE_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_meterTohectareTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_METER_TO_HECTARE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void acreTosquare_meterTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.ACRE_TO_SQUARE_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void acreTohectareTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.ACRE_TO_HECTARE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void acreTosquare_footTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.ACRE_TO_SQUARE_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void acreTosquare_yardTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.ACRE_TO_SQUARE_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void hectareToacreTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.HECTARE_TO_ACRE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void hectareTosquare_meterTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.HECTARE_TO_SQUARE_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void hectareTosquare_footTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.HECTARE_TO_SQUARE_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void hectareTosquare_yardTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.HECTARE_TO_SQUARE_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_millimeterTocircular_milTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_MILLIMETER_TO_CIRCULAR_MIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_millimeterTosquare_inchTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_MILLIMETER_TO_SQUARE_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_millimeterTosquare_centimeterTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_MILLIMETER_TO_SQUARE_CENTIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void circular_milTosquare_millimeterTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.CIRCULAR_MIL_TO_SQUARE_MILLIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void circular_milTosquare_inchTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.CIRCULAR_MIL_TO_SQUARE_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void circular_milTosquare_centimeterTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.CIRCULAR_MIL_TO_SQUARE_CENTIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_centimeterTosquare_inchTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_CENTIMETER_TO_SQUARE_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_centimeterTosquare_millimeterTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_CENTIMETER_TO_SQUARE_MILLIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_centimeterTocircular_milTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_CENTIMETER_TO_CIRCULAR_MIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_inchTosquare_millimeterTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_INCH_TO_SQUARE_MILLIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_inchTosquare_centimeterTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_INCH_TO_SQUARE_CENTIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_inchTocircular_milTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_INCH_TO_CIRCULAR_MIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_footTosquare_meterTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_FOOT_TO_SQUARE_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_footToacreTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_FOOT_TO_ACRE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_footTosquare_yardTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_FOOT_TO_SQUARE_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_footTohectareTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_FOOT_TO_HECTARE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_yardTosquare_meterTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_YARD_TO_SQUARE_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_yardToacreTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_YARD_TO_ACRE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_yardTosquare_footTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_YARD_TO_SQUARE_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_yardTohectareTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_YARD_TO_HECTARE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_kilometerTosquare_mileTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_KILOMETER_TO_SQUARE_MILE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void square_mileTosquare_kilometerTest() - { - double result = UnitConverter.ConvertArea(100, UnitConverter.AreaConversionType.SQUARE_MILE_TO_SQUARE_KILOMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - } -} diff --git a/Mathematica/UnitConverter/_scripts/_tests/ElectromagnetismConverterTests.cs b/Mathematica/UnitConverter/_scripts/_tests/ElectromagnetismConverterTests.cs deleted file mode 100644 index 7c77999..0000000 --- a/Mathematica/UnitConverter/_scripts/_tests/ElectromagnetismConverterTests.cs +++ /dev/null @@ -1,130 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Mathematica; - -namespace Mathematica.Test -{ - [TestClass] - public class ElectromagnetismConverterTests - { - [TestMethod] - public void ampere_per_meterTooerstedTest() - { - double result = UnitConverter.ConvertElectromagnetism(100, UnitConverter.ElectromagnetismConversionType.AMPERE_PER_METER_TO_OERSTED); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void oerstedToampere_per_meterTest() - { - double result = UnitConverter.ConvertElectromagnetism(100, UnitConverter.ElectromagnetismConversionType.OERSTED_TO_AMPERE_PER_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void nanoweberTomaxwellTest() - { - double result = UnitConverter.ConvertElectromagnetism(100, UnitConverter.ElectromagnetismConversionType.NANOWEBER_TO_MAXWELL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void maxwellTonanoweberTest() - { - double result = UnitConverter.ConvertElectromagnetism(100, UnitConverter.ElectromagnetismConversionType.MAXWELL_TO_NANOWEBER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void milliteslaTogaussTest() - { - double result = UnitConverter.ConvertElectromagnetism(100, UnitConverter.ElectromagnetismConversionType.MILLITESLA_TO_GAUSS); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void gaussTomilliteslaTest() - { - double result = UnitConverter.ConvertElectromagnetism(100, UnitConverter.ElectromagnetismConversionType.GAUSS_TO_MILLITESLA); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void coulombToampere_hourTest() - { - double result = UnitConverter.ConvertElectromagnetism(100, UnitConverter.ElectromagnetismConversionType.COULOMB_TO_AMPERE_HOUR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void ampere_hourTocoulombTest() - { - double result = UnitConverter.ConvertElectromagnetism(100, UnitConverter.ElectromagnetismConversionType.AMPERE_HOUR_TO_COULOMB); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void nanoohm_meterToohm_circular_mil_per_footTest() - { - double result = UnitConverter.ConvertElectromagnetism(100, UnitConverter.ElectromagnetismConversionType.NANOOHM_METER_TO_OHM_CIRCULAR_MIL_PER_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void ohm_circular_mil_per_footTonanoohm_meterTest() - { - double result = UnitConverter.ConvertElectromagnetism(100, UnitConverter.ElectromagnetismConversionType.OHM_CIRCULAR_MIL_PER_FOOT_TO_NANOOHM_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void siemens_per_meterTomho_per_centimeterTest() - { - double result = UnitConverter.ConvertElectromagnetism(100, UnitConverter.ElectromagnetismConversionType.SIEMENS_PER_METER_TO_MHO_PER_CENTIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void mho_per_centimeterTosiemens_per_meterTest() - { - double result = UnitConverter.ConvertElectromagnetism(100, UnitConverter.ElectromagnetismConversionType.MHO_PER_CENTIMETER_TO_SIEMENS_PER_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - } -} diff --git a/Mathematica/UnitConverter/_scripts/_tests/EnergyConverterTests.cs b/Mathematica/UnitConverter/_scripts/_tests/EnergyConverterTests.cs deleted file mode 100644 index d74d5c3..0000000 --- a/Mathematica/UnitConverter/_scripts/_tests/EnergyConverterTests.cs +++ /dev/null @@ -1,250 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Mathematica; - -namespace Mathematica.Test -{ - [TestClass] - public class EnergyConverterTests - { - [TestMethod] - public void megajouleTokilowatthourTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.MEGAJOULE_TO_KILOWATTHOUR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void megajouleTotherm_USTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.MEGAJOULE_TO_THERM_US); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void megajouleTohorsepower_hourTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.MEGAJOULE_TO_HORSEPOWER_HOUR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilowatthourTomegajouleTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.KILOWATTHOUR_TO_MEGAJOULE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilowatthourTotherm_USTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.KILOWATTHOUR_TO_THERM_US); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilowatthourTohorsepower_hourTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.KILOWATTHOUR_TO_HORSEPOWER_HOUR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void jouleTocalorie_physicsTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.JOULE_TO_CALORIE_PHYSICS); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void jouleTofoot_pound_forceTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.JOULE_TO_FOOT_POUND_FORCE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void calorie_physicsTojouleTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.CALORIE_PHYSICS_TO_JOULE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void calorie_physicsTofoot_pound_forceTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.CALORIE_PHYSICS_TO_FOOT_POUND_FORCE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilojouleTocalorie_nutritionTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.KILOJOULE_TO_CALORIE_NUTRITION); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilojouleToBtuTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.KILOJOULE_TO_BTU); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void calorie_nutritionTokilojouleTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.CALORIE_NUTRITION_TO_KILOJOULE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void calorie_nutritionToBtuTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.CALORIE_NUTRITION_TO_BTU); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void BtuTokilojouleTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.BTU_TO_KILOJOULE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void BtuTocalorie_nutritionTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.BTU_TO_CALORIE_NUTRITION); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void therm_USTomegajouleTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.THERM_US_TO_MEGAJOULE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void therm_USTokilowatthourTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.THERM_US_TO_KILOWATTHOUR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void therm_USTohorsepower_hourTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.THERM_US_TO_HORSEPOWER_HOUR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void horsepower_hourTomegajouleTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.HORSEPOWER_HOUR_TO_MEGAJOULE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void horsepower_hourTokilowatthourTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.HORSEPOWER_HOUR_TO_KILOWATTHOUR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void horsepower_hourTotherm_USTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.HORSEPOWER_HOUR_TO_THERM_US); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_pound_forceTojouleTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.FOOT_POUND_FORCE_TO_JOULE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_pound_forceTocalorie_physicsTest() - { - double result = UnitConverter.ConvertEnergy(100, UnitConverter.EnergyConversionType.FOOT_POUND_FORCE_TO_CALORIE_PHYSICS); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - } -} diff --git a/Mathematica/UnitConverter/_scripts/_tests/LengthConverterTests.cs b/Mathematica/UnitConverter/_scripts/_tests/LengthConverterTests.cs deleted file mode 100644 index fee5177..0000000 --- a/Mathematica/UnitConverter/_scripts/_tests/LengthConverterTests.cs +++ /dev/null @@ -1,1650 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Mathematica; - -namespace Mathematica.Test -{ - [TestClass] - public class LengthConverterTests - { - [TestMethod] - public void nanometerToangstromTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.NANOMETER_TO_ANGSTROM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void angstromTonanometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.ANGSTROM_TO_NANOMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void meterToFathomTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.METER_TO_FATHOM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void meterTofootTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.METER_TO_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void meterTofoot_US_surveyTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.METER_TO_FOOT_US_SURVEY); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void meterToyardTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.METER_TO_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void meterToinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.METER_TO_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void meterTocentimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.METER_TO_CENTIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void meterTomillimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.METER_TO_MILLIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void meterTomilTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.METER_TO_MIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void meterTopointTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.METER_TO_POINT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void meterTopicaTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.METER_TO_PICA); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void meterTomicrometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.METER_TO_MICROMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void meterTomicroinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.METER_TO_MICROINCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void FathomTometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FATHOM_TO_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void FathomTofootTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FATHOM_TO_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void FathomTofoot_US_surveyTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FATHOM_TO_FOOT_US_SURVEY); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void FathomToyardTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FATHOM_TO_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void FathomToinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FATHOM_TO_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void FathomTocentimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FATHOM_TO_CENTIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void FathomTomillimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FATHOM_TO_MILLIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void FathomTomilTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FATHOM_TO_MIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void FathomTopointTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FATHOM_TO_POINT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void FathomTopicaTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FATHOM_TO_PICA); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void FathomTomicrometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FATHOM_TO_MICROMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void FathomTomicroinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FATHOM_TO_MICROINCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void footTometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_TO_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void footToinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_TO_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void footToFathomTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_TO_FATHOM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void footTofoot_US_surveyTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_TO_FOOT_US_SURVEY); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void footToyardTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_TO_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void footTocentimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_TO_CENTIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void footTomillimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_TO_MILLIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void footTomilTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_TO_MIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void footTopointTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_TO_POINT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void footTopicaTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_TO_PICA); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void footTomicrometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_TO_MICROMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void footTomicroinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_TO_MICROINCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_US_surveyTometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_US_SURVEY_TO_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_US_surveyToFathomTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_US_SURVEY_TO_FATHOM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_US_surveyTofootTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_US_SURVEY_TO_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_US_surveyToyardTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_US_SURVEY_TO_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_US_surveyToinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_US_SURVEY_TO_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_US_surveyTocentimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_US_SURVEY_TO_CENTIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_US_surveyTomillimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_US_SURVEY_TO_MILLIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_US_surveyTomilTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_US_SURVEY_TO_MIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_US_surveyTopointTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_US_SURVEY_TO_POINT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_US_surveyTopicaTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_US_SURVEY_TO_PICA); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_US_surveyTomicrometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_US_SURVEY_TO_MICROMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_US_surveyTomicroinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.FOOT_US_SURVEY_TO_MICROINCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inchTofootTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.INCH_TO_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inchTocentimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.INCH_TO_CENTIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inchTomillimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.INCH_TO_MILLIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inchTometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.INCH_TO_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inchToFathomTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.INCH_TO_FATHOM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inchTofoot_US_surveyTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.INCH_TO_FOOT_US_SURVEY); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inchToyardTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.INCH_TO_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inchTomilTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.INCH_TO_MIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inchTopointTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.INCH_TO_POINT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inchTopicaTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.INCH_TO_PICA); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inchTomicrometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.INCH_TO_MICROMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inchTomicroinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.INCH_TO_MICROINCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void centimeterToinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.CENTIMETER_TO_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void centimeterTofootTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.CENTIMETER_TO_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void centimeterTomillimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.CENTIMETER_TO_MILLIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void centimeterTometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.CENTIMETER_TO_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void centimeterToFathomTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.CENTIMETER_TO_FATHOM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void centimeterTofoot_US_surveyTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.CENTIMETER_TO_FOOT_US_SURVEY); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void centimeterToyardTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.CENTIMETER_TO_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void centimeterTomilTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.CENTIMETER_TO_MIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void centimeterTopointTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.CENTIMETER_TO_POINT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void centimeterTopicaTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.CENTIMETER_TO_PICA); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void centimeterTomicrometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.CENTIMETER_TO_MICROMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void centimeterTomicroinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.CENTIMETER_TO_MICROINCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeterToinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MILLIMETER_TO_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeterTomilTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MILLIMETER_TO_MIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeterTopointTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MILLIMETER_TO_POINT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeterTopicaTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MILLIMETER_TO_PICA); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeterTofootTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MILLIMETER_TO_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeterTocentimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MILLIMETER_TO_CENTIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeterTometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MILLIMETER_TO_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeterToFathomTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MILLIMETER_TO_FATHOM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeterTofoot_US_surveyTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MILLIMETER_TO_FOOT_US_SURVEY); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeterToyardTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MILLIMETER_TO_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeterTomicrometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MILLIMETER_TO_MICROMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeterTomicroinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MILLIMETER_TO_MICROINCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void micrometerTomicroinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROMETER_TO_MICROINCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void micrometerTomilTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROMETER_TO_MIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void micrometerTomillimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROMETER_TO_MILLIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void micrometerToinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROMETER_TO_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void micrometerTopointTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROMETER_TO_POINT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void micrometerTopicaTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROMETER_TO_PICA); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void micrometerTofootTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROMETER_TO_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void micrometerTocentimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROMETER_TO_CENTIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void micrometerTometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROMETER_TO_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void micrometerToFathomTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROMETER_TO_FATHOM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void micrometerTofoot_US_surveyTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROMETER_TO_FOOT_US_SURVEY); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void micrometerToyardTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROMETER_TO_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void microinchTomicrometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROINCH_TO_MICROMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void microinchTomilTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROINCH_TO_MIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void microinchTomillimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROINCH_TO_MILLIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void microinchToinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROINCH_TO_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void microinchTopointTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROINCH_TO_POINT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void microinchTopicaTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROINCH_TO_PICA); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void microinchTofootTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROINCH_TO_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void microinchTocentimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROINCH_TO_CENTIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void microinchTometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROINCH_TO_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void microinchToFathomTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROINCH_TO_FATHOM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void microinchTofoot_US_surveyTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROINCH_TO_FOOT_US_SURVEY); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void microinchToyardTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MICROINCH_TO_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void milTomillimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MIL_TO_MILLIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void milTomicrometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MIL_TO_MICROMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void milToinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MIL_TO_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void milTopointTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MIL_TO_POINT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void milTopicaTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MIL_TO_PICA); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void milTofootTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MIL_TO_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void milTocentimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MIL_TO_CENTIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void milTometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MIL_TO_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void milToFathomTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MIL_TO_FATHOM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void milTofoot_US_surveyTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MIL_TO_FOOT_US_SURVEY); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void milToyardTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MIL_TO_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void milTomicroinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MIL_TO_MICROINCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void yardTometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.YARD_TO_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void yardToFathomTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.YARD_TO_FATHOM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void yardTofootTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.YARD_TO_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void yardTofoot_US_surveyTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.YARD_TO_FOOT_US_SURVEY); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void yardToinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.YARD_TO_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void yardTocentimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.YARD_TO_CENTIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void yardTomillimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.YARD_TO_MILLIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void yardTomilTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.YARD_TO_MIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void yardTopointTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.YARD_TO_POINT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void yardTopicaTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.YARD_TO_PICA); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void yardTomicrometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.YARD_TO_MICROMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void yardTomicroinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.YARD_TO_MICROINCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilometerTomileTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.KILOMETER_TO_MILE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilometerTonautical_mileTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.KILOMETER_TO_NAUTICAL_MILE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void mileTokilometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MILE_TO_KILOMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void mileTonautical_mileTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.MILE_TO_NAUTICAL_MILE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void nautical_mileTokilometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.NAUTICAL_MILE_TO_KILOMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void nautical_mileTomileTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.NAUTICAL_MILE_TO_MILE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pointTomillimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.POINT_TO_MILLIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pointToinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.POINT_TO_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pointTomilTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.POINT_TO_MIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pointTopicaTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.POINT_TO_PICA); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pointTofootTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.POINT_TO_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pointTocentimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.POINT_TO_CENTIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pointTometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.POINT_TO_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pointToFathomTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.POINT_TO_FATHOM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pointTofoot_US_surveyTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.POINT_TO_FOOT_US_SURVEY); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pointToyardTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.POINT_TO_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pointTomicrometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.POINT_TO_MICROMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pointTomicroinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.POINT_TO_MICROINCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void picaTomillimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.PICA_TO_MILLIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void picaToinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.PICA_TO_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void picaTomilTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.PICA_TO_MIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void picaTopointTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.PICA_TO_POINT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void picaTofootTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.PICA_TO_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void picaTocentimeterTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.PICA_TO_CENTIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void picaTometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.PICA_TO_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void picaToFathomTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.PICA_TO_FATHOM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void picaTofoot_US_surveyTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.PICA_TO_FOOT_US_SURVEY); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void picaToyardTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.PICA_TO_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void picaTomicrometerTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.PICA_TO_MICROMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void picaTomicroinchTest() - { - double result = UnitConverter.ConvertLength(100, UnitConverter.LengthConversionType.PICA_TO_MICROINCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - } -} diff --git a/Mathematica/UnitConverter/_scripts/_tests/LightConverterTests.cs b/Mathematica/UnitConverter/_scripts/_tests/LightConverterTests.cs deleted file mode 100644 index 7b1e975..0000000 --- a/Mathematica/UnitConverter/_scripts/_tests/LightConverterTests.cs +++ /dev/null @@ -1,270 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Mathematica; - -namespace Mathematica.Test -{ - [TestClass] - public class LightConverterTests - { - [TestMethod] - public void nanometerToangstromTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.NANOMETER_TO_ANGSTROM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void angstromTonanometerTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.ANGSTROM_TO_NANOMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void candela_per_sq_meterTolambertTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.CANDELA_PER_SQ_METER_TO_LAMBERT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void candela_per_sq_meterTocandela_per_sq_inchTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.CANDELA_PER_SQ_METER_TO_CANDELA_PER_SQ_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void candela_per_sq_meterTofootlambertTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.CANDELA_PER_SQ_METER_TO_FOOTLAMBERT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void lambertTocandela_per_sq_meterTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.LAMBERT_TO_CANDELA_PER_SQ_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void lambertTocandela_per_sq_inchTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.LAMBERT_TO_CANDELA_PER_SQ_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void lambertTofootlambertTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.LAMBERT_TO_FOOTLAMBERT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void candela_per_sq_inchTocandela_per_sq_meterTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.CANDELA_PER_SQ_INCH_TO_CANDELA_PER_SQ_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void candela_per_sq_inchTolambertTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.CANDELA_PER_SQ_INCH_TO_LAMBERT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void candela_per_sq_inchTofootlambertTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.CANDELA_PER_SQ_INCH_TO_FOOTLAMBERT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void footlambertTocandela_per_sq_meterTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.FOOTLAMBERT_TO_CANDELA_PER_SQ_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void footlambertTolambertTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.FOOTLAMBERT_TO_LAMBERT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void footlambertTocandela_per_sq_inchTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.FOOTLAMBERT_TO_CANDELA_PER_SQ_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void luxTolumen_per_sq_footTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.LUX_TO_LUMEN_PER_SQ_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void luxTophotTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.LUX_TO_PHOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void luxTofootcandleTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.LUX_TO_FOOTCANDLE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void lumen_per_sq_footToluxTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.LUMEN_PER_SQ_FOOT_TO_LUX); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void lumen_per_sq_footTophotTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.LUMEN_PER_SQ_FOOT_TO_PHOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void lumen_per_sq_footTofootcandleTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.LUMEN_PER_SQ_FOOT_TO_FOOTCANDLE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void photToluxTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.PHOT_TO_LUX); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void photTolumen_per_sq_footTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.PHOT_TO_LUMEN_PER_SQ_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void photTofootcandleTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.PHOT_TO_FOOTCANDLE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void footcandleToluxTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.FOOTCANDLE_TO_LUX); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void footcandleTolumen_per_sq_footTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.FOOTCANDLE_TO_LUMEN_PER_SQ_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void footcandleTophotTest() - { - double result = UnitConverter.ConvertLight(100, UnitConverter.LightConversionType.FOOTCANDLE_TO_PHOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - } -} diff --git a/Mathematica/UnitConverter/_scripts/_tests/PowerConverterTests.cs b/Mathematica/UnitConverter/_scripts/_tests/PowerConverterTests.cs deleted file mode 100644 index 5482299..0000000 --- a/Mathematica/UnitConverter/_scripts/_tests/PowerConverterTests.cs +++ /dev/null @@ -1,730 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Mathematica; - -namespace Mathematica.Test -{ - [TestClass] - public class PowerConverterTests - { - [TestMethod] - public void Btu_per_hourToton_refrigerationTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.BTU_PER_HOUR_TO_TON_REFRIGERATION); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void Btu_per_hourTowattTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.BTU_PER_HOUR_TO_WATT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void Btu_per_hourTokilowattTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.BTU_PER_HOUR_TO_KILOWATT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void Btu_per_hourTohorsepowerTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.BTU_PER_HOUR_TO_HORSEPOWER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void Btu_per_hourTofoot_pound_force_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.BTU_PER_HOUR_TO_FOOT_POUND_FORCE_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void Btu_per_hourToBtu_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.BTU_PER_HOUR_TO_BTU_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void Btu_per_hourTofoot_pounds_force_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.BTU_PER_HOUR_TO_FOOT_POUNDS_FORCE_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void Btu_per_hourTowatt_electricTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.BTU_PER_HOUR_TO_WATT_ELECTRIC); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void ton_refrigerationToBtu_per_hourTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.TON_REFRIGERATION_TO_BTU_PER_HOUR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void ton_refrigerationTokilowattTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.TON_REFRIGERATION_TO_KILOWATT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void ton_refrigerationTowattTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.TON_REFRIGERATION_TO_WATT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void ton_refrigerationTohorsepowerTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.TON_REFRIGERATION_TO_HORSEPOWER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void ton_refrigerationTofoot_pound_force_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.TON_REFRIGERATION_TO_FOOT_POUND_FORCE_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void ton_refrigerationToBtu_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.TON_REFRIGERATION_TO_BTU_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void ton_refrigerationTofoot_pounds_force_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.TON_REFRIGERATION_TO_FOOT_POUNDS_FORCE_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void ton_refrigerationTowatt_electricTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.TON_REFRIGERATION_TO_WATT_ELECTRIC); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilowattToton_refrigerationTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.KILOWATT_TO_TON_REFRIGERATION); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilowattToBtu_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.KILOWATT_TO_BTU_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilowattToBtu_per_hourTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.KILOWATT_TO_BTU_PER_HOUR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilowattTowattTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.KILOWATT_TO_WATT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilowattTohorsepowerTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.KILOWATT_TO_HORSEPOWER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilowattTofoot_pound_force_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.KILOWATT_TO_FOOT_POUND_FORCE_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilowattTofoot_pounds_force_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.KILOWATT_TO_FOOT_POUNDS_FORCE_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilowattTowatt_electricTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.KILOWATT_TO_WATT_ELECTRIC); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void Btu_per_secondTokilowattTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.BTU_PER_SECOND_TO_KILOWATT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void Btu_per_secondToton_refrigerationTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.BTU_PER_SECOND_TO_TON_REFRIGERATION); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void Btu_per_secondToBtu_per_hourTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.BTU_PER_SECOND_TO_BTU_PER_HOUR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void Btu_per_secondTowattTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.BTU_PER_SECOND_TO_WATT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void Btu_per_secondTohorsepowerTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.BTU_PER_SECOND_TO_HORSEPOWER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void Btu_per_secondTofoot_pound_force_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.BTU_PER_SECOND_TO_FOOT_POUND_FORCE_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void Btu_per_secondTofoot_pounds_force_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.BTU_PER_SECOND_TO_FOOT_POUNDS_FORCE_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void Btu_per_secondTowatt_electricTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.BTU_PER_SECOND_TO_WATT_ELECTRIC); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void wattToBtu_per_hourTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.WATT_TO_BTU_PER_HOUR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void wattTohorsepowerTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.WATT_TO_HORSEPOWER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void wattTofoot_pound_force_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.WATT_TO_FOOT_POUND_FORCE_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void wattToton_refrigerationTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.WATT_TO_TON_REFRIGERATION); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void wattTokilowattTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.WATT_TO_KILOWATT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void wattToBtu_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.WATT_TO_BTU_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void wattTofoot_pounds_force_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.WATT_TO_FOOT_POUNDS_FORCE_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void wattTowatt_electricTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.WATT_TO_WATT_ELECTRIC); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_pounds_force_per_secondTohorsepowerTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.FOOT_POUNDS_FORCE_PER_SECOND_TO_HORSEPOWER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_pounds_force_per_secondTowattTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.FOOT_POUNDS_FORCE_PER_SECOND_TO_WATT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_pounds_force_per_secondTowatt_electricTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.FOOT_POUNDS_FORCE_PER_SECOND_TO_WATT_ELECTRIC); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_pounds_force_per_secondToBtu_per_hourTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.FOOT_POUNDS_FORCE_PER_SECOND_TO_BTU_PER_HOUR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_pounds_force_per_secondTofoot_pound_force_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.FOOT_POUNDS_FORCE_PER_SECOND_TO_FOOT_POUND_FORCE_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_pounds_force_per_secondToton_refrigerationTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.FOOT_POUNDS_FORCE_PER_SECOND_TO_TON_REFRIGERATION); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_pounds_force_per_secondTokilowattTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.FOOT_POUNDS_FORCE_PER_SECOND_TO_KILOWATT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_pounds_force_per_secondToBtu_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.FOOT_POUNDS_FORCE_PER_SECOND_TO_BTU_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void horsepowerTowattTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.HORSEPOWER_TO_WATT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void horsepowerTofoot_pounds_force_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.HORSEPOWER_TO_FOOT_POUNDS_FORCE_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void horsepowerTowatt_electricTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.HORSEPOWER_TO_WATT_ELECTRIC); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void horsepowerToBtu_per_hourTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.HORSEPOWER_TO_BTU_PER_HOUR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void horsepowerTofoot_pound_force_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.HORSEPOWER_TO_FOOT_POUND_FORCE_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void horsepowerToton_refrigerationTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.HORSEPOWER_TO_TON_REFRIGERATION); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void horsepowerTokilowattTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.HORSEPOWER_TO_KILOWATT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void horsepowerToBtu_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.HORSEPOWER_TO_BTU_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void watt_electricTohorsepowerTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.WATT_ELECTRIC_TO_HORSEPOWER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void watt_electricTowattTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.WATT_ELECTRIC_TO_WATT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void watt_electricTofoot_pounds_force_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.WATT_ELECTRIC_TO_FOOT_POUNDS_FORCE_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void watt_electricToBtu_per_hourTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.WATT_ELECTRIC_TO_BTU_PER_HOUR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void watt_electricTofoot_pound_force_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.WATT_ELECTRIC_TO_FOOT_POUND_FORCE_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void watt_electricToton_refrigerationTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.WATT_ELECTRIC_TO_TON_REFRIGERATION); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void watt_electricTokilowattTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.WATT_ELECTRIC_TO_KILOWATT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void watt_electricToBtu_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.WATT_ELECTRIC_TO_BTU_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_pound_force_per_secondTowattTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.FOOT_POUND_FORCE_PER_SECOND_TO_WATT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_pound_force_per_secondToBtu_per_hourTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.FOOT_POUND_FORCE_PER_SECOND_TO_BTU_PER_HOUR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_pound_force_per_secondTohorsepowerTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.FOOT_POUND_FORCE_PER_SECOND_TO_HORSEPOWER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_pound_force_per_secondToton_refrigerationTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.FOOT_POUND_FORCE_PER_SECOND_TO_TON_REFRIGERATION); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_pound_force_per_secondTokilowattTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.FOOT_POUND_FORCE_PER_SECOND_TO_KILOWATT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_pound_force_per_secondToBtu_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.FOOT_POUND_FORCE_PER_SECOND_TO_BTU_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_pound_force_per_secondTofoot_pounds_force_per_secondTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.FOOT_POUND_FORCE_PER_SECOND_TO_FOOT_POUNDS_FORCE_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_pound_force_per_secondTowatt_electricTest() - { - double result = UnitConverter.ConvertPower(100, UnitConverter.PowerConversionType.FOOT_POUND_FORCE_PER_SECOND_TO_WATT_ELECTRIC); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - } -} diff --git a/Mathematica/UnitConverter/_scripts/_tests/PressureConverterTests.cs b/Mathematica/UnitConverter/_scripts/_tests/PressureConverterTests.cs deleted file mode 100644 index c28693e..0000000 --- a/Mathematica/UnitConverter/_scripts/_tests/PressureConverterTests.cs +++ /dev/null @@ -1,950 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Mathematica; - -namespace Mathematica.Test -{ - [TestClass] - public class PressureConverterTests - { - [TestMethod] - public void kilopascalTostandard_atmosphereTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.KILOPASCAL_TO_STANDARD_ATMOSPHERE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilopascalTobarTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.KILOPASCAL_TO_BAR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilopascalTomillibarTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.KILOPASCAL_TO_MILLIBAR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilopascalTopound_force_per_sq_inchTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.KILOPASCAL_TO_POUND_FORCE_PER_SQ_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilopascalTopound_force_per_sq_footTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.KILOPASCAL_TO_POUND_FORCE_PER_SQ_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilopascalToinch_of_mercury_32_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.KILOPASCAL_TO_INCH_OF_MERCURY_32_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilopascalTofoot_of_water_39p2_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.KILOPASCAL_TO_FOOT_OF_WATER_39P2_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilopascalToinch_of_water_39p2_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.KILOPASCAL_TO_INCH_OF_WATER_39P2_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilopascalTomillimeter_of_mercury_32_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.KILOPASCAL_TO_MILLIMETER_OF_MERCURY_32_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void standard_atmosphereTokilopascalTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.STANDARD_ATMOSPHERE_TO_KILOPASCAL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void standard_atmosphereTobarTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.STANDARD_ATMOSPHERE_TO_BAR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void standard_atmosphereTomillibarTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.STANDARD_ATMOSPHERE_TO_MILLIBAR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void standard_atmosphereTopound_force_per_sq_inchTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.STANDARD_ATMOSPHERE_TO_POUND_FORCE_PER_SQ_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void standard_atmosphereTopound_force_per_sq_footTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.STANDARD_ATMOSPHERE_TO_POUND_FORCE_PER_SQ_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void standard_atmosphereToinch_of_mercury_32_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.STANDARD_ATMOSPHERE_TO_INCH_OF_MERCURY_32_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void standard_atmosphereTofoot_of_water_39p2_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.STANDARD_ATMOSPHERE_TO_FOOT_OF_WATER_39P2_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void standard_atmosphereToinch_of_water_39p2_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.STANDARD_ATMOSPHERE_TO_INCH_OF_WATER_39P2_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void standard_atmosphereTomillimeter_of_mercury_32_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.STANDARD_ATMOSPHERE_TO_MILLIMETER_OF_MERCURY_32_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barTokilopascalTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.BAR_TO_KILOPASCAL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barTostandard_atmosphereTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.BAR_TO_STANDARD_ATMOSPHERE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barTomillibarTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.BAR_TO_MILLIBAR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barTopound_force_per_sq_inchTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.BAR_TO_POUND_FORCE_PER_SQ_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barTopound_force_per_sq_footTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.BAR_TO_POUND_FORCE_PER_SQ_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barToinch_of_mercury_32_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.BAR_TO_INCH_OF_MERCURY_32_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barTofoot_of_water_39p2_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.BAR_TO_FOOT_OF_WATER_39P2_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barToinch_of_water_39p2_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.BAR_TO_INCH_OF_WATER_39P2_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barTomillimeter_of_mercury_32_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.BAR_TO_MILLIMETER_OF_MERCURY_32_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millibarTokilopascalTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.MILLIBAR_TO_KILOPASCAL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millibarTostandard_atmosphereTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.MILLIBAR_TO_STANDARD_ATMOSPHERE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millibarTobarTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.MILLIBAR_TO_BAR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millibarTopound_force_per_sq_inchTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.MILLIBAR_TO_POUND_FORCE_PER_SQ_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millibarTopound_force_per_sq_footTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.MILLIBAR_TO_POUND_FORCE_PER_SQ_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millibarToinch_of_mercury_32_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.MILLIBAR_TO_INCH_OF_MERCURY_32_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millibarTofoot_of_water_39p2_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.MILLIBAR_TO_FOOT_OF_WATER_39P2_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millibarToinch_of_water_39p2_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.MILLIBAR_TO_INCH_OF_WATER_39P2_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millibarTomillimeter_of_mercury_32_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.MILLIBAR_TO_MILLIMETER_OF_MERCURY_32_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pound_force_per_sq_inchTokilopascalTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.POUND_FORCE_PER_SQ_INCH_TO_KILOPASCAL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pound_force_per_sq_inchTostandard_atmosphereTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.POUND_FORCE_PER_SQ_INCH_TO_STANDARD_ATMOSPHERE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pound_force_per_sq_inchTobarTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.POUND_FORCE_PER_SQ_INCH_TO_BAR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pound_force_per_sq_inchTomillibarTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.POUND_FORCE_PER_SQ_INCH_TO_MILLIBAR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pound_force_per_sq_inchTopound_force_per_sq_footTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.POUND_FORCE_PER_SQ_INCH_TO_POUND_FORCE_PER_SQ_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pound_force_per_sq_inchToinch_of_mercury_32_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.POUND_FORCE_PER_SQ_INCH_TO_INCH_OF_MERCURY_32_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pound_force_per_sq_inchTofoot_of_water_39p2_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.POUND_FORCE_PER_SQ_INCH_TO_FOOT_OF_WATER_39P2_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pound_force_per_sq_inchToinch_of_water_39p2_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.POUND_FORCE_PER_SQ_INCH_TO_INCH_OF_WATER_39P2_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pound_force_per_sq_inchTomillimeter_of_mercury_32_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.POUND_FORCE_PER_SQ_INCH_TO_MILLIMETER_OF_MERCURY_32_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void megapascalTokilopound_force_per_sq_inchTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.MEGAPASCAL_TO_KILOPOUND_FORCE_PER_SQ_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilopound_force_per_sq_inchTomegapascalTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.KILOPOUND_FORCE_PER_SQ_INCH_TO_MEGAPASCAL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pound_force_per_sq_footTokilopascalTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.POUND_FORCE_PER_SQ_FOOT_TO_KILOPASCAL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pound_force_per_sq_footTostandard_atmosphereTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.POUND_FORCE_PER_SQ_FOOT_TO_STANDARD_ATMOSPHERE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pound_force_per_sq_footTobarTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.POUND_FORCE_PER_SQ_FOOT_TO_BAR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pound_force_per_sq_footTomillibarTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.POUND_FORCE_PER_SQ_FOOT_TO_MILLIBAR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pound_force_per_sq_footTopound_force_per_sq_inchTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.POUND_FORCE_PER_SQ_FOOT_TO_POUND_FORCE_PER_SQ_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pound_force_per_sq_footToinch_of_mercury_32_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.POUND_FORCE_PER_SQ_FOOT_TO_INCH_OF_MERCURY_32_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pound_force_per_sq_footTofoot_of_water_39p2_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.POUND_FORCE_PER_SQ_FOOT_TO_FOOT_OF_WATER_39P2_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pound_force_per_sq_footToinch_of_water_39p2_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.POUND_FORCE_PER_SQ_FOOT_TO_INCH_OF_WATER_39P2_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pound_force_per_sq_footTomillimeter_of_mercury_32_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.POUND_FORCE_PER_SQ_FOOT_TO_MILLIMETER_OF_MERCURY_32_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_of_mercury_32_FTokilopascalTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.INCH_OF_MERCURY_32_F_TO_KILOPASCAL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_of_mercury_32_FTostandard_atmosphereTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.INCH_OF_MERCURY_32_F_TO_STANDARD_ATMOSPHERE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_of_mercury_32_FTobarTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.INCH_OF_MERCURY_32_F_TO_BAR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_of_mercury_32_FTomillibarTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.INCH_OF_MERCURY_32_F_TO_MILLIBAR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_of_mercury_32_FTopound_force_per_sq_inchTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.INCH_OF_MERCURY_32_F_TO_POUND_FORCE_PER_SQ_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_of_mercury_32_FTopound_force_per_sq_footTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.INCH_OF_MERCURY_32_F_TO_POUND_FORCE_PER_SQ_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_of_mercury_32_FTofoot_of_water_39p2_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.INCH_OF_MERCURY_32_F_TO_FOOT_OF_WATER_39P2_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_of_mercury_32_FToinch_of_water_39p2_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.INCH_OF_MERCURY_32_F_TO_INCH_OF_WATER_39P2_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_of_mercury_32_FTomillimeter_of_mercury_32_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.INCH_OF_MERCURY_32_F_TO_MILLIMETER_OF_MERCURY_32_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_of_water_39p2_FTokilopascalTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.FOOT_OF_WATER_39P2_F_TO_KILOPASCAL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_of_water_39p2_FTostandard_atmosphereTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.FOOT_OF_WATER_39P2_F_TO_STANDARD_ATMOSPHERE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_of_water_39p2_FTobarTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.FOOT_OF_WATER_39P2_F_TO_BAR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_of_water_39p2_FTomillibarTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.FOOT_OF_WATER_39P2_F_TO_MILLIBAR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_of_water_39p2_FTopound_force_per_sq_inchTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.FOOT_OF_WATER_39P2_F_TO_POUND_FORCE_PER_SQ_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_of_water_39p2_FTopound_force_per_sq_footTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.FOOT_OF_WATER_39P2_F_TO_POUND_FORCE_PER_SQ_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_of_water_39p2_FToinch_of_mercury_32_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.FOOT_OF_WATER_39P2_F_TO_INCH_OF_MERCURY_32_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_of_water_39p2_FToinch_of_water_39p2_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.FOOT_OF_WATER_39P2_F_TO_INCH_OF_WATER_39P2_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_of_water_39p2_FTomillimeter_of_mercury_32_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.FOOT_OF_WATER_39P2_F_TO_MILLIMETER_OF_MERCURY_32_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_of_water_39p2_FTokilopascalTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.INCH_OF_WATER_39P2_F_TO_KILOPASCAL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_of_water_39p2_FTostandard_atmosphereTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.INCH_OF_WATER_39P2_F_TO_STANDARD_ATMOSPHERE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_of_water_39p2_FTobarTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.INCH_OF_WATER_39P2_F_TO_BAR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_of_water_39p2_FTomillibarTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.INCH_OF_WATER_39P2_F_TO_MILLIBAR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_of_water_39p2_FTopound_force_per_sq_inchTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.INCH_OF_WATER_39P2_F_TO_POUND_FORCE_PER_SQ_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_of_water_39p2_FTopound_force_per_sq_footTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.INCH_OF_WATER_39P2_F_TO_POUND_FORCE_PER_SQ_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_of_water_39p2_FToinch_of_mercury_32_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.INCH_OF_WATER_39P2_F_TO_INCH_OF_MERCURY_32_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_of_water_39p2_FTofoot_of_water_39p2_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.INCH_OF_WATER_39P2_F_TO_FOOT_OF_WATER_39P2_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void inch_of_water_39p2_FTomillimeter_of_mercury_32_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.INCH_OF_WATER_39P2_F_TO_MILLIMETER_OF_MERCURY_32_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeter_of_mercury_32_FTokilopascalTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.MILLIMETER_OF_MERCURY_32_F_TO_KILOPASCAL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeter_of_mercury_32_FTostandard_atmosphereTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.MILLIMETER_OF_MERCURY_32_F_TO_STANDARD_ATMOSPHERE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeter_of_mercury_32_FTobarTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.MILLIMETER_OF_MERCURY_32_F_TO_BAR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeter_of_mercury_32_FTomillibarTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.MILLIMETER_OF_MERCURY_32_F_TO_MILLIBAR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeter_of_mercury_32_FTopound_force_per_sq_inchTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.MILLIMETER_OF_MERCURY_32_F_TO_POUND_FORCE_PER_SQ_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeter_of_mercury_32_FTopound_force_per_sq_footTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.MILLIMETER_OF_MERCURY_32_F_TO_POUND_FORCE_PER_SQ_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeter_of_mercury_32_FToinch_of_mercury_32_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.MILLIMETER_OF_MERCURY_32_F_TO_INCH_OF_MERCURY_32_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeter_of_mercury_32_FTofoot_of_water_39p2_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.MILLIMETER_OF_MERCURY_32_F_TO_FOOT_OF_WATER_39P2_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millimeter_of_mercury_32_FToinch_of_water_39p2_FTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.MILLIMETER_OF_MERCURY_32_F_TO_INCH_OF_WATER_39P2_F); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pascalTotorrTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.PASCAL_TO_TORR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void torrTopascalTest() - { - double result = UnitConverter.ConvertPressure(100, UnitConverter.PressureConversionType.TORR_TO_PASCAL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - } -} diff --git a/Mathematica/UnitConverter/_scripts/_tests/RadiologyConverterTests.cs b/Mathematica/UnitConverter/_scripts/_tests/RadiologyConverterTests.cs deleted file mode 100644 index 899e05f..0000000 --- a/Mathematica/UnitConverter/_scripts/_tests/RadiologyConverterTests.cs +++ /dev/null @@ -1,270 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Mathematica; - -namespace Mathematica.Test -{ - [TestClass] - public class RadiologyConverterTests - { - [TestMethod] - public void megabecquerelTocurieTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.MEGABECQUEREL_TO_CURIE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void curieTomegabecquerelTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.CURIE_TO_MEGABECQUEREL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void grayToradTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.GRAY_TO_RAD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void radTograyTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.RAD_TO_GRAY); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void sievertToremTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.SIEVERT_TO_REM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void sievertTomillisievertTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.SIEVERT_TO_MILLISIEVERT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void sievertTomilliremTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.SIEVERT_TO_MILLIREM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void sievertTomicrosievertTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.SIEVERT_TO_MICROSIEVERT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void remTosievertTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.REM_TO_SIEVERT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void remTomillisievertTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.REM_TO_MILLISIEVERT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void remTomilliremTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.REM_TO_MILLIREM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void remTomicrosievertTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.REM_TO_MICROSIEVERT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millisievertToremTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.MILLISIEVERT_TO_REM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millisievertTomilliremTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.MILLISIEVERT_TO_MILLIREM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millisievertTosievertTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.MILLISIEVERT_TO_SIEVERT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void millisievertTomicrosievertTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.MILLISIEVERT_TO_MICROSIEVERT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void milliremTomillisievertTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.MILLIREM_TO_MILLISIEVERT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void milliremTomicrosievertTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.MILLIREM_TO_MICROSIEVERT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void milliremToremTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.MILLIREM_TO_REM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void milliremTosievertTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.MILLIREM_TO_SIEVERT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void microsievertTomilliremTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.MICROSIEVERT_TO_MILLIREM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void microsievertTomillisievertTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.MICROSIEVERT_TO_MILLISIEVERT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void microsievertToremTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.MICROSIEVERT_TO_REM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void microsievertTosievertTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.MICROSIEVERT_TO_SIEVERT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void coulomb_per_kilogramToroentgenTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.COULOMB_PER_KILOGRAM_TO_ROENTGEN); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void roentgenTocoulomb_per_kilogramTest() - { - double result = UnitConverter.ConvertRadiology(100, UnitConverter.RadiologyConversionType.ROENTGEN_TO_COULOMB_PER_KILOGRAM); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - } -} diff --git a/Mathematica/UnitConverter/_scripts/_tests/VelocityConverterTests.cs b/Mathematica/UnitConverter/_scripts/_tests/VelocityConverterTests.cs deleted file mode 100644 index b913148..0000000 --- a/Mathematica/UnitConverter/_scripts/_tests/VelocityConverterTests.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Mathematica; - -namespace Mathematica.Test -{ - [TestClass] - public class VelocityConverterTests - { - [TestMethod] - public void meter_per_secondTofoot_per_secondTest() - { - double result = UnitConverter.ConvertVelocity(100, UnitConverter.VelocityConversionType.METER_PER_SECOND_TO_FOOT_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void foot_per_secondTometer_per_secondTest() - { - double result = UnitConverter.ConvertVelocity(100, UnitConverter.VelocityConversionType.FOOT_PER_SECOND_TO_METER_PER_SECOND); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilometer_per_hourTomile_per_hourTest() - { - double result = UnitConverter.ConvertVelocity(100, UnitConverter.VelocityConversionType.KILOMETER_PER_HOUR_TO_MILE_PER_HOUR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void kilometer_per_hourToknotTest() - { - double result = UnitConverter.ConvertVelocity(100, UnitConverter.VelocityConversionType.KILOMETER_PER_HOUR_TO_KNOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void mile_per_hourTokilometer_per_hourTest() - { - double result = UnitConverter.ConvertVelocity(100, UnitConverter.VelocityConversionType.MILE_PER_HOUR_TO_KILOMETER_PER_HOUR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void mile_per_hourToknotTest() - { - double result = UnitConverter.ConvertVelocity(100, UnitConverter.VelocityConversionType.MILE_PER_HOUR_TO_KNOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void knotTokilometer_per_hourTest() - { - double result = UnitConverter.ConvertVelocity(100, UnitConverter.VelocityConversionType.KNOT_TO_KILOMETER_PER_HOUR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void knotTomile_per_hourTest() - { - double result = UnitConverter.ConvertVelocity(100, UnitConverter.VelocityConversionType.KNOT_TO_MILE_PER_HOUR); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - } -} diff --git a/Mathematica/UnitConverter/_scripts/_tests/VolumeConverterTests.cs b/Mathematica/UnitConverter/_scripts/_tests/VolumeConverterTests.cs deleted file mode 100644 index 537a9c0..0000000 --- a/Mathematica/UnitConverter/_scripts/_tests/VolumeConverterTests.cs +++ /dev/null @@ -1,1610 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Mathematica; - -namespace Mathematica.Test -{ - [TestClass] - public class VolumeConverterTests - { - [TestMethod] - public void cubic_meterToacre_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_METER_TO_ACRE_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_meterTobarrel_oilTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_METER_TO_BARREL_OIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_meterTocubic_yardTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_METER_TO_CUBIC_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_meterTocubic_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_METER_TO_CUBIC_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_meterToboard_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_METER_TO_BOARD_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_meterToregister_tonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_METER_TO_REGISTER_TON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_meterTobushelTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_METER_TO_BUSHEL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_meterToUS_gallonsTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_METER_TO_US_GALLONS); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_meterToliterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_METER_TO_LITER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_meterTogallonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_METER_TO_GALLON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_meterToquart_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_METER_TO_QUART_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_meterTopint_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_METER_TO_PINT_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void acre_footTocubic_meterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.ACRE_FOOT_TO_CUBIC_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void acre_footTobarrel_oilTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.ACRE_FOOT_TO_BARREL_OIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void acre_footTocubic_yardTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.ACRE_FOOT_TO_CUBIC_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void acre_footTocubic_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.ACRE_FOOT_TO_CUBIC_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void acre_footToboard_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.ACRE_FOOT_TO_BOARD_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void acre_footToregister_tonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.ACRE_FOOT_TO_REGISTER_TON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void acre_footTobushelTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.ACRE_FOOT_TO_BUSHEL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void acre_footToUS_gallonsTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.ACRE_FOOT_TO_US_GALLONS); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void acre_footToliterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.ACRE_FOOT_TO_LITER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void acre_footTogallonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.ACRE_FOOT_TO_GALLON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void acre_footToquart_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.ACRE_FOOT_TO_QUART_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void acre_footTopint_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.ACRE_FOOT_TO_PINT_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void US_gallonsTobarrel_oilTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.US_GALLONS_TO_BARREL_OIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void US_gallonsTocubic_meterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.US_GALLONS_TO_CUBIC_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void US_gallonsToliterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.US_GALLONS_TO_LITER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void US_gallonsToacre_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.US_GALLONS_TO_ACRE_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void US_gallonsTocubic_yardTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.US_GALLONS_TO_CUBIC_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void US_gallonsTocubic_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.US_GALLONS_TO_CUBIC_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void US_gallonsToboard_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.US_GALLONS_TO_BOARD_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void US_gallonsToregister_tonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.US_GALLONS_TO_REGISTER_TON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void US_gallonsTobushelTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.US_GALLONS_TO_BUSHEL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void US_gallonsTogallonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.US_GALLONS_TO_GALLON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void US_gallonsToquart_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.US_GALLONS_TO_QUART_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void US_gallonsTopint_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.US_GALLONS_TO_PINT_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barrel_oilTocubic_meterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BARREL_OIL_TO_CUBIC_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barrel_oilToUS_gallonsTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BARREL_OIL_TO_US_GALLONS); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barrel_oilToliterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BARREL_OIL_TO_LITER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barrel_oilToacre_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BARREL_OIL_TO_ACRE_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barrel_oilTocubic_yardTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BARREL_OIL_TO_CUBIC_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barrel_oilTocubic_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BARREL_OIL_TO_CUBIC_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barrel_oilToboard_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BARREL_OIL_TO_BOARD_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barrel_oilToregister_tonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BARREL_OIL_TO_REGISTER_TON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barrel_oilTobushelTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BARREL_OIL_TO_BUSHEL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barrel_oilTogallonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BARREL_OIL_TO_GALLON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barrel_oilToquart_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BARREL_OIL_TO_QUART_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void barrel_oilTopint_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BARREL_OIL_TO_PINT_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void literTobarrel_oilTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.LITER_TO_BARREL_OIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void literTocubic_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.LITER_TO_CUBIC_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void literTogallonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.LITER_TO_GALLON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void literToquart_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.LITER_TO_QUART_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void literTopint_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.LITER_TO_PINT_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void literTocubic_meterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.LITER_TO_CUBIC_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void literToUS_gallonsTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.LITER_TO_US_GALLONS); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void literToacre_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.LITER_TO_ACRE_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void literTocubic_yardTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.LITER_TO_CUBIC_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void literToboard_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.LITER_TO_BOARD_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void literToregister_tonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.LITER_TO_REGISTER_TON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void literTobushelTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.LITER_TO_BUSHEL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_yardTocubic_meterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_YARD_TO_CUBIC_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_yardToacre_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_YARD_TO_ACRE_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_yardTobarrel_oilTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_YARD_TO_BARREL_OIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_yardTocubic_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_YARD_TO_CUBIC_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_yardToboard_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_YARD_TO_BOARD_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_yardToregister_tonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_YARD_TO_REGISTER_TON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_yardTobushelTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_YARD_TO_BUSHEL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_yardToUS_gallonsTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_YARD_TO_US_GALLONS); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_yardToliterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_YARD_TO_LITER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_yardTogallonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_YARD_TO_GALLON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_yardToquart_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_YARD_TO_QUART_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_yardTopint_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_YARD_TO_PINT_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_footTocubic_meterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_FOOT_TO_CUBIC_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_footToliterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_FOOT_TO_LITER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_footToacre_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_FOOT_TO_ACRE_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_footTobarrel_oilTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_FOOT_TO_BARREL_OIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_footTocubic_yardTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_FOOT_TO_CUBIC_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_footToboard_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_FOOT_TO_BOARD_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_footToregister_tonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_FOOT_TO_REGISTER_TON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_footTobushelTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_FOOT_TO_BUSHEL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_footToUS_gallonsTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_FOOT_TO_US_GALLONS); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_footTogallonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_FOOT_TO_GALLON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_footToquart_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_FOOT_TO_QUART_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_footTopint_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_FOOT_TO_PINT_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void board_footTocubic_meterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BOARD_FOOT_TO_CUBIC_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void board_footToacre_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BOARD_FOOT_TO_ACRE_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void board_footTobarrel_oilTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BOARD_FOOT_TO_BARREL_OIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void board_footTocubic_yardTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BOARD_FOOT_TO_CUBIC_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void board_footTocubic_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BOARD_FOOT_TO_CUBIC_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void board_footToregister_tonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BOARD_FOOT_TO_REGISTER_TON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void board_footTobushelTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BOARD_FOOT_TO_BUSHEL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void board_footToUS_gallonsTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BOARD_FOOT_TO_US_GALLONS); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void board_footToliterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BOARD_FOOT_TO_LITER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void board_footTogallonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BOARD_FOOT_TO_GALLON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void board_footToquart_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BOARD_FOOT_TO_QUART_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void board_footTopint_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BOARD_FOOT_TO_PINT_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void register_tonTocubic_meterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.REGISTER_TON_TO_CUBIC_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void register_tonToacre_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.REGISTER_TON_TO_ACRE_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void register_tonTobarrel_oilTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.REGISTER_TON_TO_BARREL_OIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void register_tonTocubic_yardTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.REGISTER_TON_TO_CUBIC_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void register_tonTocubic_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.REGISTER_TON_TO_CUBIC_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void register_tonToboard_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.REGISTER_TON_TO_BOARD_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void register_tonTobushelTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.REGISTER_TON_TO_BUSHEL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void register_tonToUS_gallonsTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.REGISTER_TON_TO_US_GALLONS); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void register_tonToliterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.REGISTER_TON_TO_LITER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void register_tonTogallonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.REGISTER_TON_TO_GALLON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void register_tonToquart_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.REGISTER_TON_TO_QUART_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void register_tonTopint_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.REGISTER_TON_TO_PINT_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void bushelTocubic_meterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BUSHEL_TO_CUBIC_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void bushelToacre_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BUSHEL_TO_ACRE_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void bushelTobarrel_oilTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BUSHEL_TO_BARREL_OIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void bushelTocubic_yardTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BUSHEL_TO_CUBIC_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void bushelTocubic_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BUSHEL_TO_CUBIC_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void bushelToboard_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BUSHEL_TO_BOARD_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void bushelToregister_tonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BUSHEL_TO_REGISTER_TON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void bushelToUS_gallonsTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BUSHEL_TO_US_GALLONS); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void bushelToliterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BUSHEL_TO_LITER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void bushelTogallonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BUSHEL_TO_GALLON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void bushelToquart_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BUSHEL_TO_QUART_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void bushelTopint_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.BUSHEL_TO_PINT_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void gallonToliterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.GALLON_TO_LITER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void gallonTobarrel_oilTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.GALLON_TO_BARREL_OIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void gallonTocubic_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.GALLON_TO_CUBIC_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void gallonToquart_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.GALLON_TO_QUART_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void gallonTopint_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.GALLON_TO_PINT_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void gallonTocubic_meterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.GALLON_TO_CUBIC_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void gallonToUS_gallonsTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.GALLON_TO_US_GALLONS); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void gallonToacre_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.GALLON_TO_ACRE_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void gallonTocubic_yardTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.GALLON_TO_CUBIC_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void gallonToboard_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.GALLON_TO_BOARD_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void gallonToregister_tonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.GALLON_TO_REGISTER_TON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void gallonTobushelTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.GALLON_TO_BUSHEL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void quart_liquidToliterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.QUART_LIQUID_TO_LITER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void quart_liquidTobarrel_oilTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.QUART_LIQUID_TO_BARREL_OIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void quart_liquidTocubic_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.QUART_LIQUID_TO_CUBIC_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void quart_liquidTogallonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.QUART_LIQUID_TO_GALLON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void quart_liquidTopint_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.QUART_LIQUID_TO_PINT_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void quart_liquidTocubic_meterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.QUART_LIQUID_TO_CUBIC_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void quart_liquidToUS_gallonsTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.QUART_LIQUID_TO_US_GALLONS); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void quart_liquidToacre_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.QUART_LIQUID_TO_ACRE_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void quart_liquidTocubic_yardTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.QUART_LIQUID_TO_CUBIC_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void quart_liquidToboard_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.QUART_LIQUID_TO_BOARD_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void quart_liquidToregister_tonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.QUART_LIQUID_TO_REGISTER_TON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void quart_liquidTobushelTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.QUART_LIQUID_TO_BUSHEL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pint_liquidToliterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.PINT_LIQUID_TO_LITER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pint_liquidTobarrel_oilTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.PINT_LIQUID_TO_BARREL_OIL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pint_liquidTocubic_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.PINT_LIQUID_TO_CUBIC_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pint_liquidTogallonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.PINT_LIQUID_TO_GALLON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pint_liquidToquart_liquidTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.PINT_LIQUID_TO_QUART_LIQUID); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pint_liquidTocubic_meterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.PINT_LIQUID_TO_CUBIC_METER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pint_liquidToUS_gallonsTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.PINT_LIQUID_TO_US_GALLONS); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pint_liquidToacre_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.PINT_LIQUID_TO_ACRE_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pint_liquidTocubic_yardTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.PINT_LIQUID_TO_CUBIC_YARD); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pint_liquidToboard_footTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.PINT_LIQUID_TO_BOARD_FOOT); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pint_liquidToregister_tonTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.PINT_LIQUID_TO_REGISTER_TON); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void pint_liquidTobushelTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.PINT_LIQUID_TO_BUSHEL); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void milliliterTofluid_ounceTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.MILLILITER_TO_FLUID_OUNCE); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void fluid_ounceTomilliliterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.FLUID_OUNCE_TO_MILLILITER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_centimeterTocubic_inchTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_CENTIMETER_TO_CUBIC_INCH); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - - [TestMethod] - public void cubic_inchTocubic_centimeterTest() - { - double result = UnitConverter.ConvertVolume(100, UnitConverter.VolumeConversionType.CUBIC_INCH_TO_CUBIC_CENTIMETER); - double expected = 100; - - if (expected - result < -0.0001 || expected - result > 0.0001) - Assert.Fail(); - } - } -}