From ad882fc21affca0b828cf0006a862585bf40d2d8 Mon Sep 17 00:00:00 2001 From: Taylor Shuler Date: Wed, 19 Jun 2013 09:57:23 -0700 Subject: [PATCH 1/3] Refined project - Added number string parser - Cleaned up code, whitespace, and comments - (WIP) Converted tests to run by NUnit --- Readme.txt => CHANGELOG.txt | 0 Cubico.Tests/ConversionResultTest.cs | 282 + Cubico.Tests/Cubico.Tests.csproj | 58 + Cubico.Tests/MeasurementTests.cs | 1508 +++ Cubico.Tests/ModifierTest.cs | 169 + Cubico.Tests/SymbolTest.cs | 414 + Cubico.Tests/UnitConverterTest.cs | 9084 ++++++++++++++ Cubico.Tests/UnitConverterTest2.cs | 10164 +++++++++++++++ Cubico.Tests/UnitConverterTest3.cs | 8699 +++++++++++++ Cubico.Tests/UnitConverterTest4.cs | 2949 +++++ .../UnitProviderTest.cs | 71 +- Cubico.Tests/UnitTest.cs | 420 + {Units.Test => Cubico.Tests}/UnitTest1.cs | 12 +- .../UnitTestCategory.cs | 22 +- Cubico.Tests/UnitTypeTest.cs | 316 + Cubico.sln | 168 + Cubico.userprefs | 28 + Cubico/ConversionResult.cs | 119 + {Units => Cubico}/Cubico.csproj | 16 +- Cubico/Measurement.cs | 602 + Cubico/MeasurementFlags.cs | 19 + Cubico/Modifier.cs | 92 + Cubico/ModifierType.cs | 12 + {Units => Cubico}/Properties/AssemblyInfo.cs | 4 +- Cubico/Result.cs | 35 + Cubico/Symbol.cs | 178 + Cubico/Unit.cs | 232 + Cubico/UnitConverter.cs | 342 + {Units => Cubico}/UnitData.xml | 0 Cubico/UnitProvider.cs | 401 + {Units => Cubico}/UnitType.cs | 86 +- Units.Test/ConversionResultTest.cs | 284 - Units.Test/Cubico.Test.csproj | 101 - Units.Test/MeasurementTests.cs | 1518 --- Units.Test/ModifierTest.cs | 177 - Units.Test/Properties/AssemblyInfo.cs | 36 - Units.Test/SymbolTest.cs | 422 - Units.Test/UnitConverterTest.cs | 9119 -------------- Units.Test/UnitConverterTest2.cs | 10202 ---------------- Units.Test/UnitConverterTest3.cs | 8725 ------------- Units.Test/UnitConverterTest4.cs | 2967 ----- Units.Test/UnitTest.cs | 427 - Units.Test/UnitTypeTest.cs | 321 - Units.sln | 26 - Units/ConversionResult.cs | 134 - Units/Measurement.cs | 746 -- Units/MeasurementFlags.cs | 26 - Units/Modifier.cs | 101 - Units/ModifierType.cs | 12 - Units/Result.cs | 56 - Units/Symbol.cs | 206 - Units/Unit.cs | 288 - Units/UnitConverter.cs | 419 - Units/UnitProvider.cs | 466 - 54 files changed, 36386 insertions(+), 36895 deletions(-) rename Readme.txt => CHANGELOG.txt (100%) create mode 100644 Cubico.Tests/ConversionResultTest.cs create mode 100644 Cubico.Tests/Cubico.Tests.csproj create mode 100644 Cubico.Tests/MeasurementTests.cs create mode 100644 Cubico.Tests/ModifierTest.cs create mode 100644 Cubico.Tests/SymbolTest.cs create mode 100644 Cubico.Tests/UnitConverterTest.cs create mode 100644 Cubico.Tests/UnitConverterTest2.cs create mode 100644 Cubico.Tests/UnitConverterTest3.cs create mode 100644 Cubico.Tests/UnitConverterTest4.cs rename {Units.Test => Cubico.Tests}/UnitProviderTest.cs (56%) create mode 100644 Cubico.Tests/UnitTest.cs rename {Units.Test => Cubico.Tests}/UnitTest1.cs (90%) rename {Units.Test => Cubico.Tests}/UnitTestCategory.cs (60%) create mode 100644 Cubico.Tests/UnitTypeTest.cs create mode 100644 Cubico.sln create mode 100644 Cubico.userprefs create mode 100644 Cubico/ConversionResult.cs rename {Units => Cubico}/Cubico.csproj (89%) create mode 100644 Cubico/Measurement.cs create mode 100644 Cubico/MeasurementFlags.cs create mode 100644 Cubico/Modifier.cs create mode 100644 Cubico/ModifierType.cs rename {Units => Cubico}/Properties/AssemblyInfo.cs (91%) create mode 100644 Cubico/Result.cs create mode 100644 Cubico/Symbol.cs create mode 100644 Cubico/Unit.cs create mode 100644 Cubico/UnitConverter.cs rename {Units => Cubico}/UnitData.xml (100%) create mode 100644 Cubico/UnitProvider.cs rename {Units => Cubico}/UnitType.cs (55%) delete mode 100644 Units.Test/ConversionResultTest.cs delete mode 100644 Units.Test/Cubico.Test.csproj delete mode 100644 Units.Test/MeasurementTests.cs delete mode 100644 Units.Test/ModifierTest.cs delete mode 100644 Units.Test/Properties/AssemblyInfo.cs delete mode 100644 Units.Test/SymbolTest.cs delete mode 100644 Units.Test/UnitConverterTest.cs delete mode 100644 Units.Test/UnitConverterTest2.cs delete mode 100644 Units.Test/UnitConverterTest3.cs delete mode 100644 Units.Test/UnitConverterTest4.cs delete mode 100644 Units.Test/UnitTest.cs delete mode 100644 Units.Test/UnitTypeTest.cs delete mode 100644 Units.sln delete mode 100644 Units/ConversionResult.cs delete mode 100644 Units/Measurement.cs delete mode 100644 Units/MeasurementFlags.cs delete mode 100644 Units/Modifier.cs delete mode 100644 Units/ModifierType.cs delete mode 100644 Units/Result.cs delete mode 100644 Units/Symbol.cs delete mode 100644 Units/Unit.cs delete mode 100644 Units/UnitConverter.cs delete mode 100644 Units/UnitProvider.cs diff --git a/Readme.txt b/CHANGELOG.txt similarity index 100% rename from Readme.txt rename to CHANGELOG.txt diff --git a/Cubico.Tests/ConversionResultTest.cs b/Cubico.Tests/ConversionResultTest.cs new file mode 100644 index 0000000..3f002d2 --- /dev/null +++ b/Cubico.Tests/ConversionResultTest.cs @@ -0,0 +1,282 @@ +using System; +using Cubico; +using NUnit.Framework; + +namespace Cubico.Tests +{ + [TestFixture] + public class ConversionResultTest + { + private TestContext testContextInstance; + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext { + get { return testContextInstance; } + set { testContextInstance = value; } + } + #region "Additional test attributes" + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + // _ + //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) + //End Sub + // + //Use ClassCleanup to run code after all tests in a class have run + // _ + //Public Shared Sub MyClassCleanup() + //End Sub + // + //Use TestInitialize to run code before running each test + // _ + //Public Sub MyTestInitialize() + //End Sub + // + //Use TestCleanup to run code after each test has run + // _ + //Public Sub MyTestCleanup() + //End Sub + // + #endregion + + #region "ConversionResult.ConversionResult()" + [Test] + public void ConversionResultConstructorTest () + { + ConversionResult res = new ConversionResult (); + + Assert.IsNotNull (res); + Assert.AreEqual (0, res.Value); + Assert.AreEqual (Result.NoError, res.Result); + Assert.AreEqual (null, res.Symbol); + } + #endregion + + #region "ConversionResult.ConversionResult(Double)" + [Test] + public void ConversionResultConstructorDoubleTest () + { + ConversionResult res = new ConversionResult (10.5); + + Assert.IsNotNull (res); + Assert.AreEqual (10.5, res.Value); + Assert.AreEqual (Result.NoError, res.Result); + Assert.AreEqual (null, res.Symbol); + } + + [Test] + public void ConversionResultConstructorDoubleZeroTest () + { + ConversionResult res = new ConversionResult ((double)0); + + Assert.IsNotNull (res); + Assert.AreEqual (0, res.Value); + Assert.AreEqual (Result.NoError, res.Result); + Assert.AreEqual (null, res.Symbol); + } + #endregion + + #region "ConversionResult.ConversionResult(Double, String)" + [Test] + public void ConversionResultConstructorDoubleStringTest () + { + ConversionResult res = new ConversionResult (10.5, "lb"); + + Assert.IsNotNull (res); + Assert.AreEqual (10.5, res.Value); + Assert.AreEqual (Result.NoError, res.Result); + Assert.AreEqual ("lb", res.Symbol); + } + + [Test] + public void ConversionResultConstructorDoubleStringNullTest () + { + ConversionResult res = new ConversionResult (0, Convert.ToString (null)); + + Assert.IsNotNull (res); + Assert.AreEqual (0, res.Value); + Assert.AreEqual (Result.NoError, res.Result); + Assert.AreEqual (null, res.Symbol); + } + + [Test] + public void ConversionResultConstructorDoubleStringNullTest2 () + { + ConversionResult res = new ConversionResult (10.5, Convert.ToString (null)); + + Assert.IsNotNull (res); + Assert.AreEqual (10.5, res.Value); + Assert.AreEqual (Result.NoError, res.Result); + Assert.AreEqual (null, res.Symbol); + } + + [Test] + public void ConversionResultConstructorDoubleStringZeroTest3 () + { + ConversionResult res = new ConversionResult (0, "lb"); + + Assert.IsNotNull (res); + Assert.AreEqual (0, res.Value); + Assert.AreEqual (Result.NoError, res.Result); + Assert.AreEqual ("lb", res.Symbol); + } + #endregion + + #region "ConversionResult.ConversionResult(Double, Result)" + [Test] + public void ConversionResultConstructorDoubleResultTest () + { + ConversionResult res = new ConversionResult (10.5, Result.GenericError); + + Assert.IsNotNull (res); + Assert.AreEqual (10.5, res.Value); + Assert.AreEqual (Result.GenericError, res.Result); + Assert.AreEqual (null, res.Symbol); + } + + [Test] + public void ConversionResultConstructorDoubleResultNullTest () + { + ConversionResult res = new ConversionResult (0, (Result)0); + + Assert.IsNotNull (res); + Assert.AreEqual (0, res.Value); + Assert.AreEqual (Result.NoError, res.Result); + Assert.AreEqual (null, res.Symbol); + } + + [Test] + public void ConversionResultConstructorDoubleResultNullTest2 () + { + ConversionResult res = new ConversionResult (10.5, (Result)0); + + Assert.IsNotNull (res); + Assert.AreEqual (10.5, res.Value); + Assert.AreEqual (Result.NoError, res.Result); + Assert.AreEqual (null, res.Symbol); + } + + [Test] + public void ConversionResultConstructorDoubleResultNullTest3 () + { + ConversionResult res = new ConversionResult (0, Result.GenericError); + + Assert.IsNotNull (res); + Assert.AreEqual (0, res.Value); + Assert.AreEqual (Result.GenericError, res.Result); + Assert.AreEqual (null, res.Symbol); + } + #endregion + + #region "ConversionResult.ConversionResult(Result)" + [Test] + public void ConversionResultConstructorResultTest () + { + ConversionResult res = new ConversionResult (Result.GenericError); + + Assert.IsNotNull (res); + Assert.AreEqual (0, res.Value); + Assert.AreEqual (Result.GenericError, res.Result); + Assert.AreEqual (null, res.Symbol); + } + + [Test] + public void ConversionResultConstructorResultNullTest () + { + ConversionResult res = new ConversionResult (0.0); + + Assert.IsNotNull (res); + Assert.AreEqual (0, res.Value); + Assert.AreEqual (Result.NoError, res.Result); + Assert.AreEqual (null, res.Symbol); + } + #endregion + + #region "ConversionResult.Result" + [Test] + public void ConversionResultResultTest () + { + ConversionResult res = new ConversionResult (Result.GenericError); + + Assert.IsNotNull (res); + Assert.AreEqual (Result.GenericError, res.Result); + + res.Result = Result.UnitNotFound; + + Assert.AreEqual (Result.UnitNotFound, res.Result); + } + + [Test] + public void ConversionResultResultNullTest () + { + ConversionResult res = new ConversionResult (Result.GenericError); + + Assert.IsNotNull (res); + Assert.AreEqual (Result.GenericError, res.Result); + + res.Result = Result.NoError; + + Assert.AreEqual (Result.NoError, res.Result); + } + #endregion + + #region "ConversionResult.Value" + [Test] + public void ConversionResultValueTest () + { + ConversionResult res = new ConversionResult (12.1); + + Assert.IsNotNull (res); + Assert.AreEqual (12.1, res.Value); + + res.Value = 0.33; + + Assert.AreEqual (0.33, res.Value); + } + + [Test] + public void ConversionResultValueNullTest () + { + ConversionResult res = new ConversionResult (12.1); + + Assert.IsNotNull (res); + Assert.AreEqual (12.1, res.Value); + + res.Value = 0.0; + + Assert.AreEqual (0, res.Value); + } + #endregion + + #region "ConversionResult.Symbol" + [Test] + public void ConversionResultSymbolTest () + { + ConversionResult res = new ConversionResult (12.1, "ft"); + + Assert.IsNotNull (res); + Assert.AreEqual ("ft", res.Symbol); + + res.Symbol = "C"; + + Assert.AreEqual ("C", res.Symbol); + } + + [Test] + public void ConversionResultSymbolNullTest () + { + ConversionResult res = new ConversionResult (12.1, "ft"); + + Assert.IsNotNull (res); + Assert.AreEqual ("ft", res.Symbol); + + res.Symbol = null; + + Assert.AreEqual (null, res.Symbol); + } + #endregion + } +} \ No newline at end of file diff --git a/Cubico.Tests/Cubico.Tests.csproj b/Cubico.Tests/Cubico.Tests.csproj new file mode 100644 index 0000000..db7cfb6 --- /dev/null +++ b/Cubico.Tests/Cubico.Tests.csproj @@ -0,0 +1,58 @@ + + + + Debug + AnyCPU + 12.0.0 + 2.0 + {8D4882D3-8D97-4D82-BE0E-AAC8A1D8B487} + Exe + Cubico.Tests + Cubico.Tests + + + true + false + bin\Debug + DEBUG; + prompt + 4 + false + + + true + bin\Release + prompt + 4 + false + + + + + + + + + + + + + + + + + + + + {5C21F8E4-02C4-4614-97C7-1899F4E6E634} + Cubico + + + + + + + False + + + \ No newline at end of file diff --git a/Cubico.Tests/MeasurementTests.cs b/Cubico.Tests/MeasurementTests.cs new file mode 100644 index 0000000..94a9fcb --- /dev/null +++ b/Cubico.Tests/MeasurementTests.cs @@ -0,0 +1,1508 @@ +using System; +using NUnit.Framework; +using Cubico; + +namespace Cubico.Tests +{ + ///This is a test class for MeasurementTest and is intended to contain all MeasurementTest Unit Tests + [TestFixture] + public class MeasurementTests + { + private TestContext testContextInstance; + private UnitProvider unitPro = new UnitProvider (); + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext { + get { return testContextInstance; } + set { testContextInstance = value; } + } + #region "Additional test attributes" + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + // _ + //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) + //End Sub + // + //Use ClassCleanup to run code after all tests in a class have run + // _ + //Public Shared Sub MyClassCleanup() + //End Sub + // + //Use TestInitialize to run code before running each test + // _ + //Public Sub MyTestInitialize() + //End Sub + // + //Use TestCleanup to run code after each test has run + // _ + //Public Sub MyTestCleanup() + //End Sub + // + #endregion + + #region "Measurement.Value" + /// + ///A test for Value + /// + [TestMethod()] + public void MeasurementValueTest () + { + double expected = 10; + Measurement target = new Measurement (expected, "ft"); + double actual = 0; + actual = target.Value; + + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.Unit" + /// + ///A test for Unit + /// + [TestMethod()] + public void MeasurementUnitTest () + { + Unit expected = unitPro.Units ["Feet"]; + Measurement target = new Measurement (10, "ft"); + Unit actual = default(Unit); + actual = target.Unit; + + Assert.AreEqual (expected.Name, actual.Name); + } + #endregion + + #region "Measurement.Symbol" + /// + ///A test for Symbol + /// + [TestMethod()] + public void MeasurementSymbolTest () + { + string expected = "ft"; + Measurement target = new Measurement (10, expected); + string actual = null; + actual = target.Symbol; + + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementSymbolNullTest () + { + string expected = null; + Measurement target = new Measurement (10, expected); + string actual = null; + actual = target.Symbol; + + } + #endregion + + #region "Measurement.IsValid" + /// + ///A test for IsValid + /// + [TestMethod()] + public void MeasurementIsValidTest () + { + bool expected = true; + Measurement target = new Measurement (10, "ft"); + bool actual = false; + actual = target.IsValid; + + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementIsValidNullTest () + { + bool expected = false; + Measurement target = new Measurement (null); + bool actual = false; + actual = target.IsValid; + + Assert.AreEqual (expected, actual); + } + //[TestMethod()] + //public void MeasurementIsValidNullTest2() + //{ + // bool expected = false; + // Measurement target = null; + // bool actual = false; + // actual = target.IsValid; + + // Assert.AreEqual(expected, actual); + // Assert.IsTrue(target == null); + // Assert.IsFalse(target != null); + //} + + [TestMethod()] + public void MeasurementIsValidBadUnitTest () + { + bool expected = false; + Measurement target = new Measurement (10, "ft", Result.BadUnit); + bool actual = false; + actual = target.IsValid; + + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.FullValue" + /// + ///A test for FullValue + /// + [TestMethod()] + public void MeasurementFullValueTest () + { + string expected = "10ft"; + Measurement target = new Measurement (10, "ft"); + string actual = null; + actual = target.FullValue; + + Assert.AreEqual (expected, actual); + } + // _ + //Public Sub MeasurementFullValueNullTest() + // Dim expected As String = "10" + // Dim target As Measurement = New Measurement(10, DirectCast(Nothing, String)) + // Dim actual As String + // actual = target.FullValue + + // Assert.AreEqual(Of String)(expected, actual) + //End Sub + #endregion + + #region "Measurement.Flags" + /// + ///A test for Flags + /// + [TestMethod()] + public void MeasurementFlagsTest () + { + Measurement target = new Measurement (10, "ft"); + MeasurementFlags expected = MeasurementFlags.UseMaxBound; + MeasurementFlags actual = default(MeasurementFlags); + target.Flags = expected; + actual = target.Flags; + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.Converter" + /// + ///A test for Converter + /// + [TestMethod()] + public void MeasurementConverterTest () + { + Measurement target = new Measurement (10, "ft"); + UnitConverter actual = default(UnitConverter); + actual = target.Converter; + + Assert.IsNotNull (actual); + } + #endregion + + #region "Measurement.ConversionResult" + /// + ///A test for ConversionResult + /// + [TestMethod()] + public void MeasurementConversionResultTest () + { + Measurement target = new Measurement (10, "ft"); + Result expected = Result.GroupNotFound; + Result actual = default(Result); + target.ConversionResult = expected; + actual = target.ConversionResult; + + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementConversionResultNullTest () + { + Measurement target = new Measurement (10, "ft"); + Result expected = Result.NoError; + Result actual = default(Result); + target.ConversionResult = Result.NoError; + actual = target.ConversionResult; + + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.ValidateEntry(Value,Symbol)" + /// + ///A test for ValidateEntry + /// + [TestMethod()] + public void MeasurementValidateEntryValueSymbolTest () + { + Measurement target = new Measurement (10, "ft"); + double value = 100; + string symbol = "in"; + Result expected = Result.NoError; + Result actual = default(Result); + actual = target.ValidateEntry (value, symbol); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementValidateEntryValueSymbolIncompatibleTest () + { + Measurement target = new Measurement (10, "ft"); + double value = 100; + string symbol = "hr"; + Result expected = Result.UnitMismatch; + Result actual = default(Result); + actual = target.ValidateEntry (value, symbol); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementValidateEntryValueSymbolMaxTest () + { + Measurement target = new Measurement (10, "ft"); + target.SetMaxBound (100, "ft"); + target.Flags = MeasurementFlags.UseMaxBound; + double value = 200; + string symbol = "ft"; + Result expected = Result.ValueTooHigh; + Result actual = default(Result); + actual = target.ValidateEntry (value, symbol); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementValidateEntryValueSymbolMinTest () + { + Measurement target = new Measurement (10, "ft"); + target.SetMinBound (5, "ft"); + target.Flags = MeasurementFlags.UseMinBound; + double value = 1; + string symbol = "ft"; + Result expected = Result.ValueTooLow; + Result actual = default(Result); + actual = target.ValidateEntry (value, symbol); + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.ValidateEntry(entry)" + /// + ///A test for ValidateEntry + /// + [TestMethod()] + public void MeasurementValidateEntrySymbolTest () + { + Measurement target = new Measurement (10, "ft"); + string entry = "100in"; + Result expected = Result.NoError; + Result actual = default(Result); + actual = target.ValidateEntry (entry); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementValidateEntrySymbolIncompatibleTest () + { + Measurement target = new Measurement (10, "ft"); + string entry = "100hr"; + Result expected = Result.UnitMismatch; + Result actual = default(Result); + actual = target.ValidateEntry (entry); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementValidateEntrySymbolMaxTest () + { + Measurement target = new Measurement (10, "ft"); + target.SetMaxBound (100, "ft"); + target.Flags = MeasurementFlags.UseMaxBound; + string entry = "200ft"; + Result expected = Result.ValueTooHigh; + Result actual = default(Result); + actual = target.ValidateEntry (entry); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementValidateEntrySymbolMinTest () + { + Measurement target = new Measurement (10, "ft"); + target.SetMinBound (5, "ft"); + target.Flags = MeasurementFlags.UseMinBound; + string entry = "1ft"; + Result expected = Result.ValueTooLow; + Result actual = default(Result); + actual = target.ValidateEntry (entry); + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.ToString" + /// + ///A test for ToString + /// + [TestMethod()] + public void MeasurementToStringTest () + { + Measurement target = new Measurement (10, "ft"); + string expected = "10ft"; + string actual = null; + actual = target.ToString (); + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.SetValue(measurementString)" + /// + ///A test for SetValue + /// + [TestMethod()] + public void MeasurementSetValueStringTest () + { + Measurement target = new Measurement ("ft"); + string measurement = "10ft"; + Result expected = Result.NoError; + Result actual = default(Result); + actual = target.SetValue (measurement); + Assert.AreEqual (expected, actual); + Assert.AreEqual (10, target.Value); + } + + [TestMethod()] + public void MeasurementSetValueStringTest2 () + { + Measurement target = new Measurement ("ft"); + string measurement = "12in"; + Result expected = Result.NoError; + Result actual = default(Result); + actual = target.SetValue (measurement); + Assert.AreEqual (expected, actual); + Assert.AreEqual (12, target.Value); + } + + [TestMethod()] + public void MeasurementSetValueStringTest3 () + { + Measurement target = new Measurement ("ft"); + target.Flags = MeasurementFlags.ForceUnit; + string measurement = "12in"; + Result expected = Result.NoError; + Result actual = default(Result); + actual = target.SetValue (measurement); + Assert.AreEqual (expected, actual); + Assert.AreEqual (1, target.Value); + } + + [TestMethod()] + public void MeasurementSetValueStringInvalidTest () + { + Measurement target = new Measurement ("ft"); + string measurement = "12hr"; + Result expected = Result.UnitMismatch; + Result actual = default(Result); + actual = target.SetValue (measurement); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + [ExpectedException(typeof(ArgumentNullException))] + public void MeasurementSetValueStringNullTest () + { + Measurement target = new Measurement ("ft"); + Result actual = default(Result); + actual = target.SetValue ((string)null); + Assert.Fail (); + } + + [TestMethod()] + [ExpectedException(typeof(ArgumentNullException))] + public void MeasurementSetValueStringEmptyTest () + { + Measurement target = new Measurement ("ft"); + Result actual = default(Result); + actual = target.SetValue (string.Empty); + Assert.Fail (); + } + #endregion + + #region "Measurement.SetValue(value)" + /// + ///A test for SetValue + /// + [TestMethod()] + public void MeasurementSetValueTest () + { + Measurement target = new Measurement ("ft"); + double value = 15; + Result expected = Result.NoError; + Result actual = default(Result); + actual = target.SetValue (value); + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.SetUnit(symbol)" + /// + ///A test for SetUnit + /// + [TestMethod()] + public void MeasurementSetUnitTest () + { + Measurement target = new Measurement ("ft"); + string unitSymbol = "s"; + Result expected = Result.NoError; + Result actual = default(Result); + actual = target.SetUnit (unitSymbol); + Assert.AreEqual (expected, actual); + Assert.AreEqual ("Second", target.Unit.Name); + } + + [TestMethod()] + public void MeasurementSetUnitTest2 () + { + Measurement target = new Measurement ("ft"); + string unitSymbol = "ft"; + Result expected = Result.NoError; + Result actual = default(Result); + actual = target.SetUnit (unitSymbol); + Assert.AreEqual (expected, actual); + Assert.AreEqual ("Feet", target.Unit.Name); + } + + [TestMethod()] + [ExpectedException(typeof(ArgumentNullException))] + public void MeasurementSetUnitNullTest () + { + Measurement target = new Measurement ("ft"); + Result expected = Result.BadUnit; + Result actual = default(Result); + actual = target.SetUnit (null); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + [ExpectedException(typeof(ArgumentNullException))] + public void MeasurementSetUnitEmptyTest () + { + Measurement target = new Measurement ("ft"); + Result expected = Result.BadUnit; + Result actual = default(Result); + actual = target.SetUnit (string.Empty); + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.SetMinBound" + /// + ///A test for SetMinBound + /// + [TestMethod()] + public void MeasurementSetMinBoundTest () + { + Measurement target = new Measurement (10, "ft"); + double minbound = 0; + string unitSymbol = "ft"; + Result expected = Result.NoError; + Result actual = default(Result); + actual = target.SetMinBound (minbound, unitSymbol); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementSetMinBoundTest2 () + { + Measurement target = new Measurement (10, "ft"); + double minbound = 12; + string unitSymbol = "in"; + Result expected = Result.NoError; + Result actual = default(Result); + actual = target.SetMinBound (minbound, unitSymbol); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + [ExpectedException(typeof(ArgumentNullException))] + public void MeasurementSetMinBoundNullTest () + { + Measurement target = new Measurement (10, "ft"); + Result actual; + actual = target.SetMinBound (0, null); + Assert.Fail (); + } + + [TestMethod()] + [ExpectedException(typeof(ArgumentNullException))] + public void MeasurementSetMinBoundEmptyTest () + { + Measurement target = new Measurement (10, "ft"); + Result actual = default(Result); + actual = target.SetMinBound (1, string.Empty); + Assert.Fail (); + } + #endregion + + #region "Measurement.SetMaxBound" + /// + ///A test for SetMinBound + /// + [TestMethod()] + public void MeasurementSetMaxBoundTest () + { + Measurement target = new Measurement (10, "ft"); + double maxbound = 100; + string unitSymbol = "ft"; + Result expected = Result.NoError; + Result actual = default(Result); + actual = target.SetMaxBound (maxbound, unitSymbol); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementSetMaxBoundTest2 () + { + Measurement target = new Measurement (10, "ft"); + double maxbound = 8; + string unitSymbol = "in"; + Result expected = Result.NoError; + Result actual = default(Result); + actual = target.SetMaxBound (maxbound, unitSymbol); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + [ExpectedException(typeof(ArgumentNullException))] + public void MeasurementSetMaxBoundNullTest () + { + Measurement target = new Measurement (10, "ft"); + Result actual = default(Result); + actual = target.SetMinBound (0, null); + Assert.Fail (); + } + + [TestMethod()] + [ExpectedException(typeof(ArgumentNullException))] + public void MeasurementSetMaxBoundEmptyTest () + { + Measurement target = new Measurement (10, "ft"); + Result actual = default(Result); + actual = target.SetMinBound (1, string.Empty); + Assert.Fail (); + } + #endregion + + #region "Measurement.Operator -" + /// + ///A test for op_Subtraction + /// + [TestMethod()] + public void Measurementop_SubtractionTest () + { + Measurement d1 = new Measurement (5, "ft"); + Measurement d2 = new Measurement (5, "ft"); + Measurement expected = new Measurement (0, "ft"); + Measurement actual = default(Measurement); + actual = (d1 - d2); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_SubtractionDiffUnitTest () + { + Measurement d1 = new Measurement (5, "ft"); + Measurement d2 = new Measurement (60, "in"); + Measurement expected = new Measurement (0, "ft"); + Measurement actual = default(Measurement); + actual = (d1 - d2); + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.Operator *" + /// + ///A test for op_Multiply + /// + [TestMethod()] + public void Measurementop_MultiplyTest () + { + Measurement d1 = new Measurement (5, "ft"); + Measurement d2 = new Measurement (5, "ft"); + Measurement expected = new Measurement (25, "ft"); + Measurement actual = default(Measurement); + actual = (d1 * d2); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_MultiplyDiffUnitTest () + { + Measurement d1 = new Measurement (5, "ft"); + Measurement d2 = new Measurement (60, "in"); + Measurement expected = new Measurement (25, "ft"); + Measurement actual = default(Measurement); + actual = (d1 * d2); + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.Operator <=" + /// + ///A test for op_LessThanOrEqual + /// + [TestMethod()] + public void Measurementop_LessThanOrEqualTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (6, "ft"); + bool expected = true; + bool actual = false; + actual = (left <= right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_LessThanOrEqualTest2 () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (5, "ft"); + bool expected = true; + bool actual = false; + actual = (left <= right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_LessThanOrEqualFalseTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (4, "ft"); + bool expected = false; + bool actual = false; + actual = (left <= right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_LessThanOrEqualDiffUnitTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (600, "in"); + bool expected = true; + bool actual = false; + actual = (left <= right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_LessThanOrEqualDiffUnitTest2 () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (60, "in"); + bool expected = true; + bool actual = false; + actual = (left <= right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_LessThanOrEqualFalseDiffUnitTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (4, "in"); + bool expected = false; + bool actual = false; + actual = (left <= right); + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.Operator <" + /// + ///A test for op_LessThan + /// + [TestMethod()] + public void Measurementop_LessThanTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (6, "ft"); + bool expected = true; + bool actual = false; + actual = (left < right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_LessThanFalseTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (5, "ft"); + bool expected = false; + bool actual = false; + actual = (left < right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_LessThanDiffUnitTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (400, "in"); + bool expected = true; + bool actual = false; + actual = (left < right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_LessThanFalseDiffUnitTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (60, "in"); + bool expected = false; + bool actual = false; + actual = (left < right); + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.Operator <>" + /// + ///A test for op_Inequality + /// + [TestMethod()] + public void Measurementop_InequalityTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (4, "ft"); + bool expected = true; + bool actual = false; + actual = (left != right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_InequalityFalseTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (5, "ft"); + bool expected = false; + bool actual = false; + actual = (left != right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_InequalityDiffUnitTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (4, "in"); + bool expected = true; + bool actual = false; + actual = (left != right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_InequalityDiffUnitFalseTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (60, "in"); + bool expected = false; + bool actual = false; + actual = (left != right); + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.Operator >=" + /// + ///A test for op_GreaterThanOrEqual + /// + [TestMethod()] + public void Measurementop_GreaterThanOrEqualTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (4, "ft"); + bool expected = true; + bool actual = false; + actual = (left >= right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_GreaterThanOrEqualTest2 () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (5, "ft"); + bool expected = true; + bool actual = false; + actual = (left >= right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_GreaterThanOrEqualFalseTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (6, "ft"); + bool expected = false; + bool actual = false; + actual = (left >= right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_GreaterThanOrEqualDiffUnitTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (4, "in"); + bool expected = true; + bool actual = false; + actual = (left >= right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_GreaterThanOrEqualDiffUnitTest2 () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (60, "in"); + bool expected = true; + bool actual = false; + actual = (left >= right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_GreaterThanOrEqualDiffUnitFalseTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (600, "in"); + bool expected = false; + bool actual = false; + actual = (left >= right); + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.Operator >" + /// + ///A test for op_GreaterThan + /// + [TestMethod()] + public void Measurementop_GreaterThanTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (4, "ft"); + bool expected = true; + bool actual = false; + actual = (left > right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_GreaterThanFalseTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (5, "ft"); + bool expected = false; + bool actual = false; + actual = (left > right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_GreaterThanDiffUnitTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (4, "in"); + bool expected = true; + bool actual = false; + actual = (left > right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_GreaterThanDiffUnitFalseTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (60, "in"); + bool expected = false; + bool actual = false; + actual = (left > right); + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.Operator =" + /// + ///A test for op_Equality + /// + [TestMethod()] + public void Measurementop_EqualityTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (5, "ft"); + bool expected = true; + bool actual = false; + actual = (left == right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_EqualityDiffUnitTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (60, "in"); + bool expected = true; + bool actual = false; + actual = (left == right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_EqualityFalseTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (4, "ft"); + bool expected = false; + bool actual = false; + actual = (left == right); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_EqualityDiffUnitFalseTest () + { + Measurement left = new Measurement (5, "ft"); + Measurement right = new Measurement (61, "in"); + bool expected = false; + bool actual = false; + actual = (left == right); + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.Operator /" + /// + ///A test for op_Division + /// + [TestMethod()] + public void Measurementop_DivisionTest () + { + Measurement d1 = new Measurement (25, "ft"); + Measurement d2 = new Measurement (5, "ft"); + Measurement expected = new Measurement (5, "ft"); + Measurement actual = default(Measurement); + actual = (d1 / d2); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_DivisionDiffUnitTest () + { + Measurement d1 = new Measurement (25, "ft"); + Measurement d2 = new Measurement (60, "in"); + Measurement expected = new Measurement (5, "ft"); + Measurement actual = default(Measurement); + actual = (d1 / d2); + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.Operator +" + /// + ///A test for op_Addition + /// + [TestMethod()] + public void Measurementop_AdditionTest () + { + Measurement d1 = new Measurement (5, "ft"); + Measurement d2 = new Measurement (5, "ft"); + Measurement expected = new Measurement (10, "ft"); + Measurement actual = default(Measurement); + actual = (d1 + d2); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void Measurementop_AdditionDiffUnitTest () + { + Measurement d1 = new Measurement (5, "ft"); + Measurement d2 = new Measurement (60, "in"); + Measurement expected = new Measurement (10, "ft"); + Measurement actual = default(Measurement); + actual = (d1 + d2); + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.GetValueAs(unitSymbol)" + /// + ///A test for GetValueAs + /// + //[TestMethod()] + //public void MeasurementGetValueAsTest() + //{ + // Measurement target = new Measurement(5, "ft"); + // string unitSymbol = "in"; + // Measurement expected = new Measurement(Convert.ToDecimal("60.0000"), "in"); + // Measurement actual = default(Measurement); + // actual = target.GetValueAs(unitSymbol); + // Assert.AreEqual(expected.Value, actual.Value); + // Assert.AreEqual(expected.ToString, actual.ToString); + //} + + [TestMethod()] + public void MeasurementGetValueAsInvalidUnitSymbolTest () + { + Measurement target = new Measurement (5, "ft"); + string unitSymbol = "F"; + Measurement actual = default(Measurement); + actual = target.GetValueAs (unitSymbol); + + Assert.IsTrue (actual.ConversionResult == Result.UnitMismatch); + Assert.IsTrue (actual.Value == 0); + Assert.IsTrue (actual.Value == 0); + } + #endregion + + #region "Measurement.GetStringValueAs(unitSymbol)" + /// + ///A test for GetStringValueAs + /// + [TestMethod()] + public void MeasurementGetStringValueAsTest () + { + Measurement target = new Measurement (5, "ft"); + string unitSymbol = "in"; + string expected = "60in"; + string actual = null; + actual = target.GetStringValueAs (unitSymbol); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementGetStringValueAsInvalidUnitSymbolTest () + { + Measurement target = new Measurement (10, "ft"); + string unitSymbol = "F"; + string expected = "Conversion Error"; + string actual = null; + actual = target.GetStringValueAs (unitSymbol); + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.GetHashCode" + /// + ///A test for GetHashCode + /// + [TestMethod()] + public void MeasurementGetHashCodeTest () + { + Measurement target = new Measurement (10, "ft"); + + Measurement Mes = target.Converter.ConvertUnits (target.Value, target.Unit.DefaultSymbol, "m"); + + string expectedStr = null; + + if (Mes.ConversionResult != Result.NoError) { + expectedStr = target.Value.ToString () + "|" + target.ConversionResult.ToString (); + } else { + expectedStr = Mes.Value.ToString () + "|" + Mes.Symbol; + } + + int expected = (expectedStr).GetHashCode (); + int actual = 0; + actual = target.GetHashCode (); + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.Equals(Of Measurement)" + /// + ///A test for Equals + /// + [TestMethod()] + public void MeasurementEqualsOfTest () + { + IEquatable target = new Measurement (5, "ft"); + Measurement other = new Measurement (60, "in"); + bool expected = true; + bool actual = false; + actual = target.Equals (other); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementEqualsOfTest2 () + { + IEquatable target = new Measurement (5, "ft"); + Measurement other = new Measurement (5, "ft"); + bool expected = true; + bool actual = false; + actual = target.Equals (other); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementEqualsOfFalseTest () + { + IEquatable target = new Measurement (5, "ft"); + Measurement other = new Measurement (5, "in"); + bool expected = false; + bool actual = false; + actual = target.Equals (other); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementEqualsOfInvalidUnitTest () + { + IEquatable target = new Measurement (5, "ft"); + Measurement other = new Measurement (5, "F"); + bool expected = false; + bool actual = false; + actual = target.Equals (other); + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.Equals(obj)" + /// + ///A test for Equals + /// + [TestMethod()] + public void MeasurementEqualsTest () + { + Measurement target = new Measurement (5, "ft"); + object obj = new Measurement (5, "ft"); + bool expected = true; + bool actual = false; + actual = target.Equals (obj); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementEqualsTest2 () + { + Measurement target = new Measurement (5, "ft"); + object obj = new Measurement (60, "in"); + bool expected = true; + bool actual = false; + actual = target.Equals (obj); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementEqualsFalseTest () + { + Measurement target = new Measurement (5, "ft"); + object obj = new Measurement (5, "in"); + bool expected = false; + bool actual = false; + actual = target.Equals (obj); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementEqualsInvalidTest () + { + Measurement target = new Measurement (5, "ft"); + object obj = new Measurement (5, "F"); + bool expected = false; + bool actual = false; + actual = target.Equals (obj); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementEqualsInvalidTypeTest () + { + Measurement target = new Measurement (5, "ft"); + object obj = 5; + bool expected = false; + bool actual = false; + actual = target.Equals (obj); + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.CompareTo" + /// + ///A test for CompareTo + /// + [TestMethod()] + public void MeasurementCompareToTest () + { + IComparable target = new Measurement (5, "ft"); + Measurement other = new Measurement (5, "ft"); + int expected = 0; + int actual = 0; + actual = target.CompareTo (other); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementCompareToGreaterTest () + { + IComparable target = new Measurement (5, "ft"); + Measurement other = new Measurement (4, "ft"); + int expected = 1; + int actual = 0; + actual = target.CompareTo (other); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementCompareToGreaterDifferentUnitTest () + { + IComparable target = new Measurement (5, "ft"); + Measurement other = new Measurement (41, "in"); + int expected = 1; + int actual; + actual = target.CompareTo (other); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementCompareToLessTest () + { + IComparable target = new Measurement (5, "ft"); + Measurement other = new Measurement (6, "ft"); + int expected = -1; + int actual = 0; + actual = target.CompareTo (other); + Assert.AreEqual (expected, actual); + } + + [TestMethod()] + public void MeasurementCompareToGreaterLessUnitTest () + { + IComparable target = new Measurement (5, "ft"); + Measurement other = new Measurement (61, "in"); + int expected = -1; + int actual = 0; + actual = target.CompareTo (other); + Assert.AreEqual (expected, actual); + } + #endregion + + #region "Measurement.Measurement(Value, UnitSymbol)" + /// + ///A test for Measurement Constructor + /// + [TestMethod()] + public void MeasurementConstructorValueUnitSymbolTest () + { + double value = 10; + string unitSymbol = "ft"; + Measurement target = new Measurement (value, unitSymbol); + + Assert.IsNotNull (target); + Assert.IsTrue (target.Flags == MeasurementFlags.None); + Assert.IsTrue (target.ConversionResult == Result.NoError); + Assert.AreEqual ("Feet", target.Unit.Name); + Assert.AreEqual (10, target.Value); + } + + [TestMethod()] + public void MeasurementConstructorValueUnitSymbolNullNullTest () + { + Measurement target = new Measurement (0, (string)null); + + Assert.IsNotNull (target); + Assert.IsTrue (target.Flags == MeasurementFlags.None); + Assert.IsTrue (target.ConversionResult == Result.BadUnit); + Assert.AreEqual (null, target.Unit); + Assert.AreEqual (0, target.Value); + } + + [TestMethod()] + public void MeasurementConstructorValueUnitSymbolValueNullTest () + { + Measurement target = new Measurement (0, "ft"); + + Assert.IsNotNull (target); + Assert.IsTrue (target.Flags == MeasurementFlags.None); + Assert.IsTrue (target.ConversionResult == Result.NoError); + Assert.AreEqual ("Feet", target.Unit.Name); + Assert.AreEqual (0, target.Value); + } + + [TestMethod()] + public void MeasurementConstructorValueUnitSymbolUnitSymbolNullTest () + { + Measurement target = new Measurement (10, (string)null); + + Assert.IsNotNull (target); + Assert.IsTrue (target.Flags == MeasurementFlags.None); + Assert.IsTrue (target.ConversionResult == Result.BadUnit); + Assert.AreEqual (null, target.Unit); + Assert.AreEqual (10, target.Value); + } + + [TestMethod()] + public void MeasurementConstructorValueUnitSymbolEmptyTest () + { + Measurement target = new Measurement (10, string.Empty); + + Assert.IsNotNull (target); + Assert.IsTrue (target.Flags == MeasurementFlags.None); + Assert.IsTrue (target.ConversionResult == Result.BadUnit); + Assert.AreEqual (null, target.Unit); + Assert.AreEqual (10, target.Value); + } + #endregion + + #region "Measurement.Measurement(unitSymbol)" + /// + ///A test for Measurement Constructor + /// + [TestMethod()] + public void MeasurementConstructorUnitSymbolTest () + { + string unitSymbol = "ft"; + Measurement target = new Measurement (unitSymbol); + + Assert.IsNotNull (target); + Assert.IsTrue (target.Flags == MeasurementFlags.None); + Assert.IsTrue (target.ConversionResult == Result.NoError); + Assert.AreEqual ("Feet", target.Unit.Name); + Assert.AreEqual (0, target.Value); + } + + [TestMethod()] + public void MeasurementConstructorUnitSymbolNullTest () + { + Measurement target = new Measurement (null); + + Assert.IsNotNull (target); + Assert.IsTrue (target.Flags == MeasurementFlags.None); + Assert.IsTrue (target.ConversionResult == Result.BadUnit); + Assert.AreEqual (null, target.Unit); + Assert.AreEqual (0, target.Value); + } + + [TestMethod()] + public void MeasurementConstructorUnitSymbolEmptyTest () + { + Measurement target = new Measurement (null); + + Assert.IsNotNull (target); + Assert.IsTrue (target.Flags == MeasurementFlags.None); + Assert.IsTrue (target.ConversionResult == Result.BadUnit); + Assert.AreEqual (null, target.Unit); + Assert.AreEqual (0, target.Value); + } + #endregion + + #region "Measurement.Measurement(Value, UnitSymbol, ConversionResult)" + /// + ///A test for Measurement Constructor + /// + [TestMethod()] + public void MeasurementConstructorValueUnitSymbolResultTest () + { + double value = 10; + string unitSymbol = "ft"; + Result ConversionResult = Result.NoError; + Measurement target = new Measurement (value, unitSymbol, ConversionResult); + + Assert.IsNotNull (target); + Assert.IsTrue (target.Flags == MeasurementFlags.None); + Assert.IsTrue (target.ConversionResult == Result.NoError); + Assert.AreEqual ("Feet", target.Unit.Name); + Assert.AreEqual (10, target.Value); + } + + [TestMethod()] + public void MeasurementConstructorValueUnitSymbolResultTest2 () + { + double value = 10; + string unitSymbol = "ft"; + Result ConversionResult = Result.GenericError; + Measurement target = new Measurement (value, unitSymbol, ConversionResult); + + Assert.IsNotNull (target); + Assert.IsTrue (target.Flags == MeasurementFlags.None); + Assert.IsTrue (target.ConversionResult == Result.GenericError); + Assert.AreEqual ("Feet", target.Unit.Name); + Assert.AreEqual (10, target.Value); + } + #endregion + + #region "Measurement.Measurement(Value,Unit,ConversionResult)" + /// + ///A test for Measurement Constructor + /// + [TestMethod()] + public void MeasurementConstructorValueUnitConversionResultTest () + { + double value = 10; + Unit unit = unitPro.Units ["Feet"]; + Result ConversionResult = Result.NoError; + Measurement target = new Measurement (value, unit, ConversionResult); + + Assert.IsNotNull (target); + Assert.IsTrue (target.Flags == MeasurementFlags.None); + Assert.IsTrue (target.ConversionResult == Result.NoError); + Assert.AreEqual ("Feet", target.Unit.Name); + Assert.AreEqual (10, target.Value); + } + + [TestMethod()] + public void MeasurementConstructorValueUnitConversionResultNullTest () + { + Measurement target = new Measurement (0, (Unit)null, Result.NoError); + + Assert.IsNotNull (target); + Assert.IsTrue (target.Flags == MeasurementFlags.None); + Assert.IsTrue (target.ConversionResult == Result.NoError); + Assert.IsNull (target.Unit); + Assert.AreEqual (0, target.Value); + } + #endregion + + #region "Measurement.Measurement(Value,Result)" + /// + ///A test for Measurement Constructor + /// + [TestMethod()] + public void MeasurementConstructorValueResultTest () + { + double value = 10; + Result ConversionResult = Result.NoError; + Measurement target = new Measurement (value, ConversionResult); + + Assert.IsNotNull (target); + Assert.IsTrue (target.Flags == MeasurementFlags.None); + Assert.IsTrue (target.ConversionResult == Result.NoError); + Assert.IsNull (target.Unit); + Assert.AreEqual (10, target.Value); + } + + [TestMethod()] + public void MeasurementConstructorValueResultNullTest () + { + Measurement target = new Measurement (0, Result.NoError); + + Assert.IsNotNull (target); + Assert.IsTrue (target.Flags == MeasurementFlags.None); + Assert.IsTrue (target.ConversionResult == Result.NoError); + Assert.IsNull (target.Unit); + Assert.AreEqual (0, target.Value); + } + #endregion + } +} \ No newline at end of file diff --git a/Cubico.Tests/ModifierTest.cs b/Cubico.Tests/ModifierTest.cs new file mode 100644 index 0000000..74406ac --- /dev/null +++ b/Cubico.Tests/ModifierTest.cs @@ -0,0 +1,169 @@ +using System; +using System.Diagnostics.Contracts; +using Units; +using NUnit.Framework; + +namespace Cubico.Tests +{ + ///This is a test class for UnitTest and is intended to contain all UnitTest Unit Tests + [TestFixture] + public class ModifierTest + { + private TestContext testContextInstance; + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext { + get { return testContextInstance; } + set { testContextInstance = value; } + } + #region "Additional test attributes" + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + // _ + //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) + //End Sub + // + //Use ClassCleanup to run code after all tests in a class have run + // _ + //Public Shared Sub MyClassCleanup() + //End Sub + // + //Use TestInitialize to run code before running each test + // _ + //Public Sub MyTestInitialize() + //End Sub + // + //Use TestCleanup to run code after each test has run + // _ + //Public Sub MyTestCleanup() + //End Sub + // + #endregion + + #region "Modifier.Modifier()" + [TestMethod()] + public void ModifierNewTest () + { + Modifier testObj = new Modifier (); + + Assert.IsNotNull (testObj); + Assert.IsTrue (testObj.ID == 0); + Assert.IsTrue (testObj.Value == 0); + Assert.IsNull (testObj.ParentUnit); + } + #endregion + + #region "Modifier.ID" + [TestMethod()] + public void ModifierIDTest () + { + Modifier testObj = new Modifier (); + + testObj.ID = 99; + + Assert.AreEqual (99, testObj.ID); + } + #endregion + + #region "Modifier.ParentUnit" + [TestMethod()] + public void ModifierParentUnitTest () + { + Unit testUnitObj = new Unit { + ID = 99, + Name = "Name" + }; + Modifier testObj = new Modifier (); + + testObj.ParentUnit = testUnitObj; + + Assert.IsNotNull (testObj.ParentUnit); + Assert.AreEqual (testUnitObj.ID, testObj.ParentUnit.ID); + Assert.AreEqual (testUnitObj.Name, testObj.ParentUnit.Name); + } + + [TestMethod()] + public void ModifierParentUnitNullTest () + { + Modifier testObj = new Modifier (); + + testObj.ParentUnit = null; + + Assert.IsNull (testObj.ParentUnit); + } + #endregion + + #region "Modifier.Value" + [TestMethod()] + public void ModifierValueTest () + { + Modifier testObj = new Modifier (); + + testObj.Value = Convert.ToDecimal (0.001); + + Assert.AreEqual (Convert.ToDecimal(0.001), testObj.Value); + } + #endregion + + #region "Modifier.Order" + [TestMethod()] + public void ModifierOrderTest () + { + Modifier testObj = new Modifier (); + + testObj.Order = 10; + + Assert.AreEqual (10, testObj.Order); + } + #endregion + + #region "Modifier.ModifierType" + [TestMethod()] + public void ModifierTypeTest () + { + Modifier testObj = new Modifier (); + + testObj.ModifierType = ModifierType.Multiply; + + Assert.AreEqual (ModifierType.Multiply, testObj.ModifierType); + } + #endregion + + //Private Function InitEfObjects() As EFUnit + //Dim efUnitTypeObj As New EFUnitType + //efUnitTypeObj.ID = 10 + //efUnitTypeObj.Name = "Test Type" + //efUnitTypeObj.Description = "Test Desc" + + //Dim efUnitObj As New EFUnit + //efUnitObj.ID = 2 + //efUnitObj.Name = "Test Unit" + //efUnitObj.UnitType = efUnitTypeObj + + //Dim efUnitModifierObj As New EFUnitModifier + //efUnitModifierObj.ID = 2 + //efUnitModifierObj.ModifierID = 2 + //efUnitModifierObj.Order = 1 + //efUnitModifierObj.Value = 0.5 + + //Dim efUnitSymbolObj As New EFUnitSymbol + //efUnitSymbolObj.ID = 3 + //efUnitSymbolObj.IsDefault = True + //efUnitSymbolObj.Symbol = "Tst" + + //efUnitModifierObj.Unit = efUnitObj + //efUnitSymbolObj.Unit = efUnitObj + + //efUnitTypeObj.Unit.Add(efUnitObj) + //efUnitObj.UnitModifiers.Add(efUnitModifierObj) + //efUnitObj.UnitSymbol.Add(efUnitSymbolObj) + + //Return efUnitObj + //End Function + + } +} \ No newline at end of file diff --git a/Cubico.Tests/SymbolTest.cs b/Cubico.Tests/SymbolTest.cs new file mode 100644 index 0000000..7acfc95 --- /dev/null +++ b/Cubico.Tests/SymbolTest.cs @@ -0,0 +1,414 @@ +using System; +using System.Diagnostics.Contracts; +using Cubico; +using NUnit.Framework; + +namespace Cubico.Tests +{ + ///This is a test class for UnitTest and is intended to contain all UnitTest Unit Tests + [TestClass()] + public class SymbolTest + { + private TestContext testContextInstance; + private UnitProvider unitPro = new UnitProvider (); + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext { + get { return testContextInstance; } + set { testContextInstance = value; } + } + #region "Additional test attributes" + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + // _ + //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) + //End Sub + // + //Use ClassCleanup to run code after all tests in a class have run + // _ + //Public Shared Sub MyClassCleanup() + //End Sub + // + //Use TestInitialize to run code before running each test + // _ + //Public Sub MyTestInitialize() + //End Sub + // + //Use TestCleanup to run code after each test has run + // _ + //Public Sub MyTestCleanup() + //End Sub + // + #endregion + + #region "Symbol.Symbol()" + [TestMethod()] + public void SymbolNewTest () + { + Symbol testObj = new Symbol (); + + Assert.IsNotNull (testObj); + Assert.IsTrue (testObj.Id == 0); + Assert.IsTrue (testObj.Value == null); + Assert.IsNull (testObj.Unit); + } + #endregion + + #region "Symbol.Symbol(Unit)" + [TestMethod()] + [ExpectedException(typeof(ArgumentNullException))] + public void SymbolNewEfUnitSymbolUnitNullTest () + { + Symbol testObj = new Symbol (null); + + Assert.Fail ("Null values are not allowed for this constructor."); + } + + [TestMethod()] + public void SymbolNewEfUnitSymbolUnitTest () + { + Unit unitObj = new Unit { + ID = 99, + Name = "Name" + }; + Symbol testObj = new Symbol (unitObj); + + Assert.IsNotNull (testObj); + + Assert.IsTrue (string.IsNullOrEmpty(testObj.Value)); + + Assert.IsNotNull (testObj.Unit); + Assert.IsTrue (testObj.Unit.ID == unitObj.ID); + } + #endregion + + #region "Symbol.ID" + //[TestMethod()] + //public void SymbolIDNullTest() + //{ + // Symbol testObj = new Symbol(); + + // testObj.Id = null; + + // Assert.AreEqual(null, testObj.Id); + //} + + //[TestMethod()] + //public void SymbolIDNegativeTest() + //{ + // Symbol testObj = new Symbol(); + + // testObj.Id = -1; + + // Assert.IsTrue(testObj.Id == -1); + + // List data = Validation.DataAnnotationValidator.GetErrors(testObj).ToList; + + // Assert.IsNotNull(data); + // Assert.IsTrue(data.Count > 0); + // Assert.IsTrue(data[0].PropertyName == "ID"); + //} + + [TestMethod()] + public void SymbolIDTest () + { + Symbol testObj = new Symbol (); + + testObj.Id = 99; + + Assert.AreEqual (99, testObj.Id); + } + #endregion + + #region "Symbol.ParentUnit" + [TestMethod()] + public void SymbolParentUnitTest () + { + Unit testUnitObj = new Unit (); + Symbol testObj = new Symbol (testUnitObj); + + + + testObj.Unit = testUnitObj; + + Assert.IsNotNull (testObj.Unit); + Assert.AreEqual (testUnitObj.ID, testObj.Unit.ID); + Assert.AreEqual (testUnitObj.Name, testObj.Unit.Name); + } + + [TestMethod()] + public void SymbolParentUnitNullTest () + { + Symbol testObj = new Symbol (); + + testObj.Unit = null; + + Assert.IsNull (testObj.Unit); + } + #endregion + + #region "Symbol.Value" + [TestMethod()] + public void SymbolValueTest () + { + Symbol testObj = new Symbol (); + + testObj.Value = "Test Name"; + + Assert.AreEqual ("Test Name", testObj.Value); + } + //[TestMethod()] + //public void SymbolValueNullTest() + //{ + // Symbol testObj = new Symbol(); + + // testObj.Value = null; + + // Assert.IsTrue(string.IsNullOrWhiteSpace(testObj.Value)); + + // List data = Validation.DataAnnotationValidator.GetErrors(testObj).ToList; + + // Assert.IsNotNull(data); + // Assert.IsTrue(data.Count > 0); + // Assert.IsTrue(data[0].PropertyName == "Value"); + //} + #endregion + + #region "Symbol.IsDefault" + [TestMethod()] + public void SymbolIsDefaultTest () + { + Symbol testObj = new Symbol (); + + testObj.IsDefault = true; + + Assert.AreEqual (true, testObj.IsDefault); + } + #endregion + + #region "IEquatable" + [TestMethod()] + public void Symbol_EqualityTest () + { + Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; + Symbol target = unitPro.Symbols ["ft"].Symbols [0]; + + Assert.IsTrue (expected == target); + } + + [TestMethod()] + public void Unit_EqualityTest2 () + { + Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; + Symbol target = unitPro.Symbols ["in"].Symbols [0]; + + Assert.IsFalse (expected == target); + } + + [TestMethod()] + public void Unit_EqualityTest3 () + { + Symbol expected = null; + Symbol target = unitPro.Symbols ["in"].Symbols [0]; + + Assert.IsFalse (expected == target); + } + + [TestMethod()] + public void Unit_EqualityTest4 () + { + Symbol expected = unitPro.Symbols ["in"].Symbols [0]; + Symbol target = null; + + Assert.IsFalse (expected == target); + } + + [TestMethod()] + public void Unit_EqualityTest5 () + { + Symbol expected = null; + Symbol target = null; + + Assert.IsTrue (expected == target); + } + + [TestMethod()] + public void Unit_EqualityTest6 () + { + Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; + Symbol target = unitPro.Symbols ["in"].Symbols [0]; + + Assert.IsTrue (expected != target); + } + + [TestMethod()] + public void Unit_EqualityTest7 () + { + Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; + Symbol target = null; + + Assert.IsTrue (expected != target); + } + + [TestMethod()] + public void Unit_EqualityTest8 () + { + Symbol expected = null; + Symbol target = unitPro.Symbols ["ft"].Symbols [0]; + + Assert.IsTrue (expected != target); + } + + [TestMethod()] + public void Unit_EqualityTest8_1 () + { + Symbol expected = null; + Symbol target = null; + + Assert.IsFalse (expected != target); + } + + [TestMethod()] + public void Unit_EqualityTest9 () + { + Symbol expected = unitPro.Symbols ["in"].Symbols [0]; + Symbol target = unitPro.Symbols ["ft"].Symbols [0]; + + Assert.IsFalse (expected.Equals(target)); + } + + [TestMethod()] + public void Unit_EqualityTest10 () + { + Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; + Symbol target = unitPro.Symbols ["ft"].Symbols [0]; + + Assert.IsTrue (expected.Equals(target)); + } + + [TestMethod()] + public void Unit_EqualityTest11 () + { + Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; + Symbol target = unitPro.Symbols ["in"].Symbols [0]; + + Assert.IsFalse (expected.Equals(target)); + } + + [TestMethod()] + public void Unit_EqualityTest12 () + { + Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; + Symbol target = null; + + Assert.IsFalse (expected.Equals(target)); + } + + [TestMethod()] + public void Unit_EqualityTest13 () + { + Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; + Symbol target = unitPro.Symbols ["ft"].Symbols [0]; + + Assert.IsTrue (expected.Equals((object)target)); + } + + [TestMethod()] + public void Unit_EqualityTest14 () + { + Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; + Symbol target = unitPro.Symbols ["in"].Symbols [0]; + + Assert.IsFalse (expected.Equals((object)target)); + } + + [TestMethod()] + public void Unit_EqualityTest154 () + { + Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; + Symbol target = null; + + Assert.IsFalse (expected.Equals((object)target)); + } + + [TestMethod()] + public void Unit_EqualityTest15 () + { + Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; + + Assert.IsTrue (expected.GetHashCode() == expected.Value.GetHashCode()); + } + #endregion + + #region "Serialization" + //[TestMethod()] + //public void Unit_BinarySerializationTest() + //{ + // Symbol expected = unitPro.Symbols["ft"].Symbols[0]; + // Symbol actual = default(Symbol); + + // byte[] data = Utility.BinarySerialize(expected); + // actual = (Symbol)Utility.BinaryDeserialize(data); + + // Assert.IsNotNull(actual); + // Assert.AreEqual(expected.Id, actual.Id); + // Assert.AreEqual(expected.Value, actual.Value); + // Assert.AreEqual(expected.IsDefault, actual.IsDefault); + // Assert.AreEqual(expected.UnitId, actual.UnitId); + //} + + //[TestMethod()] + //public void Unit_DataContractSerializationTest() + //{ + // Symbol expected = unitPro.Symbols["ft"].Symbols[0]; + // Symbol actual = default(Symbol); + + // string data = Utility.DataContractSerialize(expected); + // actual = (Symbol)Utility.DataContractDeserialize(data, typeof(Symbol)); + + // Assert.IsNotNull(actual); + // Assert.AreEqual(expected.Id, actual.Id); + // Assert.AreEqual(expected.Value, actual.Value); + // Assert.AreEqual(expected.IsDefault, actual.IsDefault); + // Assert.AreEqual(expected.UnitId, actual.UnitId); + //} + #endregion + + //Private Function InitEfObjects() As EFUnit + //Dim efUnitTypeObj As New EFUnitType + //efUnitTypeObj.ID = 10 + //efUnitTypeObj.Name = "Test Type" + //efUnitTypeObj.Description = "Test Desc" + + //Dim efUnitObj As New EFUnit + //efUnitObj.ID = 2 + //efUnitObj.Name = "Test Unit" + //efUnitObj.UnitType = efUnitTypeObj + + //Dim efUnitModifierObj As New EFUnitModifier + //efUnitModifierObj.ID = 2 + //efUnitModifierObj.ModifierID = 2 + //efUnitModifierObj.Order = 1 + //efUnitModifierObj.Value = 0.5 + + //Dim efSymbolsymbolObj As New EFUnitSymbol + //efUnitSymbolObj.ID = 3 + //efUnitSymbolObj.IsDefault = True + //efUnitSymbolObj.Symbol = "Tst" + + //efUnitModifierObj.Unit = efUnitObj + //efUnitSymbolObj.Unit = efUnitObj + + //efUnitTypeObj.Unit.Add(efUnitObj) + //efUnitObj.UnitModifiers.Add(efUnitModifierObj) + //efUnitObj.UnitSymbol.Add(efUnitSymbolObj) + + //Return efUnitObj + //End Function + + } +} \ No newline at end of file diff --git a/Cubico.Tests/UnitConverterTest.cs b/Cubico.Tests/UnitConverterTest.cs new file mode 100644 index 0000000..dfa3413 --- /dev/null +++ b/Cubico.Tests/UnitConverterTest.cs @@ -0,0 +1,9084 @@ +using System; +using NUnit.Framework; +using Cubico; + +namespace Cubico.Tests +{ + ///This is a test class for UnitConverterTest and is intended to contain all UnitConverterTest Unit Tests + [TestFixture] + public class UnitConverterTest + { + private TestContext testContextInstance; + private UnitProvider unitPro = new UnitProvider (); + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext { + get { return testContextInstance; } + set { testContextInstance = value; } + } + #region "Additional test attributes" + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + // _ _ + //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) + //End Sub + // + //Use ClassCleanup to run code after all tests in a class have run + // _ _ + //Public Shared Sub MyClassCleanup() + //End Sub + // + //Use TestInitialize to run code before running each test + // _ _ + //Public Sub MyTestInitialize() + //End Sub + // + //Use TestCleanup to run code after each test has run + // _ _ + //Public Sub MyTestCleanup() + //End Sub + // + + #endregion + + #region "UnitConverter.ParseUnitString" + /// + ///A test for ParseUnitString + /// + [Test] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverter_ParseUnitStringTest () + { + UnitConverter target = new UnitConverter (); + string input = "10ft"; + Measurement expected = new Measurement (10, "ft"); + Measurement actual = default(Measurement); + actual = target.ParseUnitString (input); + Assert.AreEqual (expected, actual); + } + + [Test] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverter_ParseUnitStringTest2 () + { + UnitConverter target = new UnitConverter (); + string input = "10 ft"; + Measurement expected = new Measurement (10, "ft"); + Measurement actual = default(Measurement); + actual = target.ParseUnitString (input); + Assert.AreEqual (expected, actual); + } + + [Test] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverter_ParseUnitStringTest3 () + { + UnitConverter target = new UnitConverter (); + string input = "10 m/s"; + Measurement expected = new Measurement (10, "m/s"); + Measurement actual = default(Measurement); + actual = target.ParseUnitString (input); + Assert.AreEqual (expected, actual); + } + + [Test] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverter_ParseUnitStringTest4 () + { + UnitConverter target = new UnitConverter (); + string input = "10'"; + Measurement expected = new Measurement (10, "'"); + Measurement actual = default(Measurement); + actual = target.ParseUnitString (input); + Assert.AreEqual (expected, actual); + } + + [Test] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverter_ParseUnitStringTest5 () + { + UnitConverter target = new UnitConverter (); + string input = "10ft²"; + Measurement expected = new Measurement (10, "ft²"); + Measurement actual = default(Measurement); + actual = target.ParseUnitString (input); + Assert.AreEqual (expected, actual); + } + + [Test] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverter_ParseUnitStringTest6 () + { + UnitConverter target = new UnitConverter (); + string input = "10˚"; + Measurement expected = new Measurement (10, "˚"); + Measurement actual = default(Measurement); + actual = target.ParseUnitString (input); + Assert.AreEqual (expected, actual); + } + + [Test] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverter_ParseUnitStringTest7 () + { + UnitConverter target = new UnitConverter (); + string input = "10 ˚F"; + Measurement expected = new Measurement (10, "˚F"); + Measurement actual = default(Measurement); + actual = target.ParseUnitString (input); + Assert.AreEqual (expected, actual); + } + + [Test] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverter_ParseUnitStringTest8 () + { + UnitConverter target = new UnitConverter (); + string input = "10 µK"; + Measurement expected = new Measurement (10, "µK"); + Measurement actual = default(Measurement); + actual = target.ParseUnitString (input); + Assert.AreEqual (expected, actual); + } + + [Test] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverter_ParseUnitStringTest9 () + { + UnitConverter target = new UnitConverter (); + string input = "-10 µK"; + Measurement expected = new Measurement (-10, "µK"); + Measurement actual = default(Measurement); + actual = target.ParseUnitString (input); + Assert.AreEqual (expected, actual); + } + + [Test] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverter_ParseUnitStringNotFoundTest () + { + UnitConverter target = new UnitConverter (); + string input = "10 ZZZZ"; + Measurement expected = new Measurement (0, Result.BadUnit); + Measurement actual = default(Measurement); + actual = target.ParseUnitString (input); + + Assert.AreNotEqual (expected, actual); + Assert.AreEqual (expected.ConversionResult, actual.ConversionResult); + } + + [Test] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverter_ParseUnitStringNoSymbolTest () + { + UnitConverter target = new UnitConverter (); + string input = "10"; + Measurement expected = new Measurement (0, Result.BadUnit); + Measurement actual = default(Measurement); + actual = target.ParseUnitString (input); + + Assert.AreNotEqual (expected, actual); + Assert.AreEqual (expected.ConversionResult, actual.ConversionResult); + } + + [Test] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverter_ParseUnitStringNoValueTest () + { + UnitConverter target = new UnitConverter (); + string input = "ft"; + Measurement expected = new Measurement (0, "ft"); + Measurement actual = default(Measurement); + actual = target.ParseUnitString (input); + Assert.AreEqual (expected, actual); + } + + [Test] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverter_ParseUnitStringNullTest () + { + UnitConverter target = new UnitConverter (); + Measurement expected = new Measurement (0, Result.BadValue); + Measurement actual = default(Measurement); + actual = target.ParseUnitString (null); + Assert.AreNotEqual (expected, actual); + Assert.AreEqual (expected.ConversionResult, actual.ConversionResult); + } + + [Test] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverter_ParseUnitStringEmptyTest () + { + UnitConverter target = new UnitConverter (); + Measurement expected = new Measurement (0, Result.BadValue); + Measurement actual = default(Measurement); + actual = target.ParseUnitString (string.Empty); + Assert.AreNotEqual (expected, actual); + Assert.AreEqual (expected.ConversionResult, actual.ConversionResult); + } + #endregion + + #region "UnitConverter.IsCompatible" + /// + ///A test for IsCompatible + /// + [Test] + [TestCategory(UnitTestCategory.Integration)] + public void UnitConverter_IsCompatibleTest () + { + UnitConverter target = new UnitConverter (); + string leftSymbol = "C"; + string rightSymbol = "F"; + bool actual = false; + actual = target.IsCompatible (leftSymbol, rightSymbol); + Assert.IsTrue (actual); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + public void UnitConverter_IsCompatibleFalseTest () + { + UnitConverter target = new UnitConverter (); + string leftSymbol = "C"; + string rightSymbol = "in"; + bool actual = false; + actual = target.IsCompatible (leftSymbol, rightSymbol); + Assert.IsFalse (actual); + } + + [Test] + [TestCategory(UnitTestCategory.Unit)] + [ExpectedException(typeof(ArgumentException))] + public void UnitConverter_IsCompatibleNullTest () + { + UnitConverter target = new UnitConverter (); + bool actual = false; + actual = target.IsCompatible (null, null); + + Assert.Fail (); + } + + [Test] + [TestCategory(UnitTestCategory.Unit)] + [ExpectedException(typeof(ArgumentException))] + public void UnitConverter_IsCompatibleLeftNullTest () + { + UnitConverter target = new UnitConverter (); + string rightSymbol = "in"; + bool actual = false; + actual = target.IsCompatible (null, rightSymbol); + + Assert.Fail (); + } + + [Test] + [TestCategory(UnitTestCategory.Unit)] + [ExpectedException(typeof(ArgumentException))] + public void UnitConverter_IsCompatibleRightNullTest () + { + UnitConverter target = new UnitConverter (); + string leftSymbol = "C"; + bool actual = false; + actual = target.IsCompatible (leftSymbol, null); + + Assert.Fail (); + } + + [Test] + [TestCategory(UnitTestCategory.Unit)] + [ExpectedException(typeof(ArgumentException))] + public void UnitConverter_IsCompatibleEmptyTest () + { + UnitConverter target = new UnitConverter (); + bool actual = false; + actual = target.IsCompatible (string.Empty, string.Empty); + + Assert.Fail (); + } + + [Test] + [TestCategory(UnitTestCategory.Unit)] + [ExpectedException(typeof(ArgumentException))] + public void UnitConverter_IsCompatibleLeftEmptyTest () + { + UnitConverter target = new UnitConverter (); + string rightSymbol = "in"; + bool actual = false; + actual = target.IsCompatible (string.Empty, rightSymbol); + + Assert.Fail (); + } + + [Test] + [TestCategory(UnitTestCategory.Unit)] + [ExpectedException(typeof(ArgumentException))] + public void UnitConverter_IsCompatibleRightEmptyTest () + { + UnitConverter target = new UnitConverter (); + string leftSymbol = "C"; + bool actual = false; + actual = target.IsCompatible (leftSymbol, string.Empty); + + Assert.Fail (); + } + #endregion + + #region "UnitProvider.GetUnitBySymbol" + /// + ///A test for GetUnitBySymbol + /// + [Test] + [TestCategory(UnitTestCategory.CRUD)] + public void UnitConverter_GetUnitBySymbol_Test () + { + UnitConverter target = new UnitConverter (); + string unitSymbol = "C"; + Unit expected = unitPro.Symbols ["C"]; + Unit actual = default(Unit); + actual = target.GetUnitBySymbol (unitSymbol); + Assert.AreEqual (expected, actual); + } + + [Test] + [TestCategory(UnitTestCategory.ExceptionTest)] + [ExpectedException(typeof(ArgumentNullException))] + public void UnitConverter_GetUnitBySymbolNull_Test () + { + UnitConverter target = new UnitConverter (); + Unit actual = default(Unit); + actual = target.GetUnitBySymbol (null); + + Assert.Fail (); + } + + [Test] + [TestCategory(UnitTestCategory.ExceptionTest)] + [ExpectedException(typeof(ArgumentNullException))] + public void UnitConverter_GetUnitBySymbolEmpty_Test () + { + UnitConverter target = new UnitConverter (); + Unit actual = default(Unit); + actual = target.GetUnitBySymbol (string.Empty); + + Assert.Fail (); + } + + [Test] + [TestCategory(UnitTestCategory.ExceptionTest)] + [ExpectedException(typeof(ArgumentException))] + public void UnitConverter_GetUnitBySymbol_UnrecognizedSymbol_Test () + { + UnitConverter target = new UnitConverter (); + string unitName = "BogusUnitSymbol"; + Unit actual = default(Unit); + actual = target.GetUnitByName (unitName); + Assert.Fail (); + } + #endregion + + #region "UnitConverter.GetUnitByName" + /// + ///A test for GetUnitByName + /// + [Test] + [TestCategory(UnitTestCategory.CRUD)] + public void UnitConverter_GetUnitByName_Test () + { + UnitConverter target = new UnitConverter (); + string unitName = "Celsius"; + Unit expected = unitPro.Units ["Celsius"]; + Unit actual = default(Unit); + actual = target.GetUnitByName (unitName); + Assert.AreEqual (expected, actual); + } + + [Test] + [TestCategory(UnitTestCategory.ExceptionTest)] + [ExpectedException(typeof(ArgumentException))] + public void UnitConverter_GetUnitByNameNull_Test () + { + UnitConverter target = new UnitConverter (); + + Unit actual = default(Unit); + actual = target.GetUnitByName (null); + + Assert.Fail (); + } + + [Test] + [TestCategory(UnitTestCategory.ExceptionTest)] + [ExpectedException(typeof(ArgumentException))] + public void UnitConverter_GetUnitByNameEmpty_Test () + { + UnitConverter target = new UnitConverter (); + + Unit actual = default(Unit); + actual = target.GetUnitByName (string.Empty); + + Assert.Fail (); + } + + [Test] + [TestCategory(UnitTestCategory.ExceptionTest)] + [ExpectedException(typeof(ArgumentException))] + public void UnitConverter_GetUnitByName_UnrecognizedName_Test () + { + UnitConverter target = new UnitConverter (); + string unitName = "BogusUnitName"; + Unit actual = default(Unit); + actual = target.GetUnitByName (unitName); + Assert.Fail (); + } + #endregion + + #region "UnitConverter.ConvertUnits" + #region "Temperature Tests" + #region "Source as Kelvin" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_Celcius_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "K"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(-173.15), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_Celcius_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "K"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(-272.65), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_Celcius_Test3 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0); + string currentUnitName = "K"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(-273.15), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_Fahrenheit_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "K"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(-279.67), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_Fahrenheit_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "K"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(-458.77), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_Fahrenheit_Test3 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0); + string currentUnitName = "K"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(-459.67), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_Millikelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "K"; + string targetUnitName = "mK"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "mK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_Millikelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "K"; + string targetUnitName = "mK"; + Measurement expected = new Measurement (Convert.ToDouble(500), "mK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_Microkelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "K"; + string targetUnitName = "µK"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "µK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_Microkelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "K"; + string targetUnitName = "µK"; + Measurement expected = new Measurement (Convert.ToDouble(500000), "µK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_nK_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "K"; + string targetUnitName = "nK"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "nK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_nK_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "K"; + string targetUnitName = "nK"; + Measurement expected = new Measurement (Convert.ToDouble(500000000), "nK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_kK_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "K"; + string targetUnitName = "kK"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "kK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_kK_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "K"; + string targetUnitName = "kK"; + Measurement expected = new Measurement (Convert.ToDouble(0.0005), "kK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_Megakelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "K"; + string targetUnitName = "MK"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "MK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_Megakelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "K"; + string targetUnitName = "MK"; + Measurement expected = new Measurement (Convert.ToDouble(5E-07), "MK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_Reaumur_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "K"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(-138.52), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_Reaumur_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "K"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(-218.12), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_Reaumur_Test3 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0); + string currentUnitName = "K"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(-218.52), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_Rankine_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "K"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(180), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_Rankine_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "K"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(0.9), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kelvin_to_Rankine_Test3 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0); + string currentUnitName = "K"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(0), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Celsius" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celcius_to_Kelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "C"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(373.15), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celcius_to_Kelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "C"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(273.65), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celcius_to_Kelvin_Test3 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0); + string currentUnitName = "C"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(273.15), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celsius_to_Fahrenheit_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "C"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(212), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celsius_to_Fahrenheit_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "C"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(32.9), "F"); + Measurement actual; + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celsius_to_Fahrenheit_Test3 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0); + string currentUnitName = "C"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(32), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celsius_to_Millikelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "C"; + string targetUnitName = "mK"; + Measurement expected = new Measurement (Convert.ToDouble(373150), "mK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celsius_to_Millikelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "C"; + string targetUnitName = "mK"; + Measurement expected = new Measurement (Convert.ToDouble(273650), "mK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celsius_to_Microkelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "C"; + string targetUnitName = "µK"; + Measurement expected = new Measurement (Convert.ToDouble(373150000), "µK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celsius_to_Microkelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "C"; + string targetUnitName = "µK"; + Measurement expected = new Measurement (Convert.ToDouble(273650000), "µK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celsius_to_nK_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "C"; + string targetUnitName = "nK"; + Measurement expected = new Measurement (Convert.ToDouble(373150000000L), "nK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celsius_to_nK_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "C"; + string targetUnitName = "nK"; + Measurement expected = new Measurement (Convert.ToDouble(273650000000L), "nK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celsius_to_kK_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "C"; + string targetUnitName = "kK"; + Measurement expected = new Measurement (Convert.ToDouble(0.37315), "kK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celsius_to_kK_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "C"; + string targetUnitName = "kK"; + Measurement expected = new Measurement (Convert.ToDouble(0.27365), "kK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celsius_to_Megakelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "C"; + string targetUnitName = "MK"; + Measurement expected = new Measurement (Convert.ToDouble(0.00037315), "MK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celsius_to_Megakelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "C"; + string targetUnitName = "MK"; + Measurement expected = new Measurement (Convert.ToDouble(0.00027365), "MK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celsius_to_Reaumur_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "C"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(80), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celsius_to_Reaumur_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "C"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(0.4), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celsius_to_Reaumur_Test3 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0); + string currentUnitName = "C"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(0), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celsius_to_Rankine_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "C"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(671.67), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celsius_to_Rankine_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "C"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(492.57), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Celsius_to_Rankine_Test3 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0); + string currentUnitName = "C"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(491.67), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Fahrenheit" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_Kelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "F"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(310.93), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_Kelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "F"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(255.65), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_Kelvin_Test3 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0); + string currentUnitName = "F"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(255.37), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_Celsius_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "F"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(37.78), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_Celsius_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "F"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(-17.5), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_Celsius_Test3 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0); + string currentUnitName = "F"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(-17.78), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_Millikelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "F"; + string targetUnitName = "mK"; + Measurement expected = new Measurement (Convert.ToDouble(310927.78), "mK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_Millikelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "F"; + string targetUnitName = "mK"; + Measurement expected = new Measurement (Convert.ToDouble(255650), "mK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_Microkelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "F"; + string targetUnitName = "µK"; + Measurement expected = new Measurement (Convert.ToDouble(310927777.78), "µK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_Microkelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "F"; + string targetUnitName = "µK"; + Measurement expected = new Measurement (Convert.ToDouble(255650000), "µK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_nK_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "F"; + string targetUnitName = "nK"; + Measurement expected = new Measurement (Convert.ToDouble(310927777777.78), "nK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_nK_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "F"; + string targetUnitName = "nK"; + Measurement expected = new Measurement (Convert.ToDouble(255650000000L), "nK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_kK_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "F"; + string targetUnitName = "kK"; + Measurement expected = new Measurement (Convert.ToDouble(0.310927777777778), "kK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_kK_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "F"; + string targetUnitName = "kK"; + Measurement expected = new Measurement (Convert.ToDouble(0.25565), "kK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_Megakelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "F"; + string targetUnitName = "MK"; + Measurement expected = new Measurement (Convert.ToDouble(0.000310927777778), "MK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_Megakelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "F"; + string targetUnitName = "MK"; + Measurement expected = new Measurement (Convert.ToDouble(0.00025565), "MK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_Reaumur_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "F"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(30.22), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_Reaumur_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "F"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(-14), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_Reaumur_Test3 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0); + string currentUnitName = "F"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(-14.22), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_Rankine_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "F"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(559.67), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_Rankine_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "F"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(460.17), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Fahrenheit_to_Rankine_Test3 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0); + string currentUnitName = "F"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(459.67), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Millikelvin" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Millikelvin_to_Kelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mK"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Millikelvin_to_Kelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "mK"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(0.0005), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Millikelvin_to_Celsius_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mK"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(-273.05), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Millikelvin_to_Celsius_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "mK"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(-273.15), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Millikelvin_to_Fahrenheit_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mK"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(-459.49), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Millikelvin_to_Fahrenheit_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "mK"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(-459.67), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Millikelvin_to_Microkelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mK"; + string targetUnitName = "µK"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "µK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Millikelvin_to_Microkelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "mK"; + string targetUnitName = "µK"; + Measurement expected = new Measurement (Convert.ToDouble(500), "µK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Millikelvin_to_nK_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mK"; + string targetUnitName = "nK"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "nK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Millikelvin_to_nK_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "mK"; + string targetUnitName = "nK"; + Measurement expected = new Measurement (Convert.ToDouble(500000), "nK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Millikelvin_to_kK_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mK"; + string targetUnitName = "kK"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "kK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Millikelvin_to_kK_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "mK"; + string targetUnitName = "kK"; + Measurement expected = new Measurement (Convert.ToDouble(5E-07), "kK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Millikelvin_to_Megakelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mK"; + string targetUnitName = "MK"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "MK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Millikelvin_to_Megakelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "mK"; + string targetUnitName = "MK"; + Measurement expected = new Measurement (Convert.ToDouble(5E-10), "MK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Millikelvin_to_Reaumur_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mK"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(-218.44), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Millikelvin_to_Reaumur_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "mK"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(-218.52), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Millikelvin_to_Rankine_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mK"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(0.18), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Millikelvin_to_Rankine_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "mK"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(0.0009), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Millikelvin" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microkelvin_to_Kelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µK"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microkelvin_to_Kelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "µK"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(5E-07), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microkelvin_to_Celsius_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µK"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(-273.15), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microkelvin_to_Celsius_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "µK"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(-273.15), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microkelvin_to_Fahrenheit_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µK"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(-459.67), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microkelvin_to_Fahrenheit_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "µK"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(-459.67), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microkelvin_to_Millikelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µK"; + string targetUnitName = "mK"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "mK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microkelvin_to_Millikelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "µK"; + string targetUnitName = "mK"; + Measurement expected = new Measurement (Convert.ToDouble(0.0005), "mK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microkelvin_to_nK_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µK"; + string targetUnitName = "nK"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "nK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microkelvin_to_nK_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "µK"; + string targetUnitName = "nK"; + Measurement expected = new Measurement (Convert.ToDouble(500), "nK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microkelvin_to_kK_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µK"; + string targetUnitName = "kK"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "kK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microkelvin_to_kK_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "µK"; + string targetUnitName = "kK"; + Measurement expected = new Measurement (Convert.ToDouble(5E-10), "kK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microkelvin_to_Megakelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µK"; + string targetUnitName = "MK"; + Measurement expected = new Measurement (Convert.ToDouble(1E-10), "MK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microkelvin_to_Megakelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "µK"; + string targetUnitName = "MK"; + Measurement expected = new Measurement (Convert.ToDouble(5E-13), "MK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microkelvin_to_Reaumur_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µK"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(-218.52), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microkelvin_to_Reaumur_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "µK"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(-218.52), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microkelvin_to_Rankine_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µK"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(0.00018), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microkelvin_to_Rankine_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "µK"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(9E-07), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Millikelvin" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nK_to_Kelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nK"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nK_to_Kelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "nK"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(5E-10), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nK_to_Celsius_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nK"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(-273.15), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nK_to_Celsius_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "nK"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(-273.15), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nK_to_Fahrenheit_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nK"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(-459.67), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nK_to_Fahrenheit_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "nK"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(-459.67), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nK_to_Millikelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nK"; + string targetUnitName = "mK"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "mK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nK_to_Millikelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "nK"; + string targetUnitName = "mK"; + Measurement expected = new Measurement (Convert.ToDouble(5E-07), "mK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nK_to_Microkelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nK"; + string targetUnitName = "µK"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "µK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nK_to_Microkelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "nK"; + string targetUnitName = "µK"; + Measurement expected = new Measurement (Convert.ToDouble(0.0005), "µK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nK_to_kK_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nK"; + string targetUnitName = "kK"; + Measurement expected = new Measurement (Convert.ToDouble(1E-10), "kK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nK_to_kK_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "nK"; + string targetUnitName = "kK"; + Measurement expected = new Measurement (Convert.ToDouble(5E-13), "kK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nK_to_Megakelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nK"; + string targetUnitName = "MK"; + Measurement expected = new Measurement (Convert.ToDouble(1E-13), "MK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nK_to_Megakelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "nK"; + string targetUnitName = "MK"; + Measurement expected = new Measurement (Convert.ToDouble(0), "MK"); + //should be 0.0000000000000005; can only round to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nK_to_Reaumur_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nK"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(-218.52), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nK_to_Reaumur_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "nK"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(-218.52), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nK_to_Rankine_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nK"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(1.8E-07), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nK_to_Rankine_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "nK"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(9E-10), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Kilokelvin" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kK_to_Kelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kK"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kK_to_Kelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "kK"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(500), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kK_to_Celsius_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kK"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(99726.85), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kK_to_Celsius_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "kK"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(226.85), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kK_to_Fahrenheit_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kK"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(179540.33), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kK_to_Fahrenheit_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "kK"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(440.33), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kK_to_Millikelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kK"; + string targetUnitName = "mK"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "mK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kK_to_Millikelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "kK"; + string targetUnitName = "mK"; + Measurement expected = new Measurement (Convert.ToDouble(500000), "mK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kK_to_Microkelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kK"; + string targetUnitName = "µK"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "µK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kK_to_Microkelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "kK"; + string targetUnitName = "µK"; + Measurement expected = new Measurement (Convert.ToDouble(500000000), "µK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kK_to_nK_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kK"; + string targetUnitName = "nK"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000L), "nK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kK_to_nK_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "kK"; + string targetUnitName = "nK"; + Measurement expected = new Measurement (Convert.ToDouble(500000000000L), "nK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kK_to_Megakelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kK"; + string targetUnitName = "MK"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "MK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kK_to_Megakelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "kK"; + string targetUnitName = "MK"; + Measurement expected = new Measurement (Convert.ToDouble(0.0005), "MK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kK_to_Reaumur_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kK"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(79781.48), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kK_to_Reaumur_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "kK"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(181.48), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kK_to_Rankine_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kK"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(180000), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kK_to_Rankine_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "kK"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(900), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Megakelvin" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megakelvin_to_Kelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "MK"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megakelvin_to_Kelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "MK"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(500000), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megakelvin_to_Celsius_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "MK"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(99999726.85), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megakelvin_to_Celsius_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "MK"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(499726.85), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megakelvin_to_Fahrenheit_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "MK"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(179999540.33), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megakelvin_to_Fahrenheit_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "MK"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(899540.33), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megakelvin_to_Millikelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "MK"; + string targetUnitName = "mK"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "mK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megakelvin_to_Millikelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "MK"; + string targetUnitName = "mK"; + Measurement expected = new Measurement (Convert.ToDouble(500000000), "mK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megakelvin_to_Microkelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "MK"; + string targetUnitName = "µK"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000L), "µK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megakelvin_to_Microkelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "MK"; + string targetUnitName = "µK"; + Measurement expected = new Measurement (Convert.ToDouble(500000000000L), "µK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megakelvin_to_nK_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "MK"; + string targetUnitName = "nK"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000000L), "nK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megakelvin_to_nK_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "MK"; + string targetUnitName = "nK"; + Measurement expected = new Measurement (Convert.ToDouble(500000000000000L), "nK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megakelvin_to_kK_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "MK"; + string targetUnitName = "kK"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "kK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megakelvin_to_kK_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "MK"; + string targetUnitName = "kK"; + Measurement expected = new Measurement (Convert.ToDouble(500), "kK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megakelvin_to_Reaumur_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "MK"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(79999781.48), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megakelvin_to_Reaumur_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "MK"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(399781.48), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megakelvin_to_Rankine_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "MK"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(180000000), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megakelvin_to_Rankine_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "MK"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(900000), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Reaumur" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_Kelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Re"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(398.15), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_Kelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "Re"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(273.77), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_Kelvin_Test3 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0); + string currentUnitName = "Re"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(273.15), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_Fahrenheit_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Re"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(257), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_Fahrenheit_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "Re"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(33.12), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_Fahrenheit_Test3 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0); + string currentUnitName = "Re"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(32), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_Millikelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Re"; + string targetUnitName = "mK"; + Measurement expected = new Measurement (Convert.ToDouble(398150), "mK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_Millikelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "Re"; + string targetUnitName = "mK"; + Measurement expected = new Measurement (Convert.ToDouble(273775), "mK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_Microkelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Re"; + string targetUnitName = "µK"; + Measurement expected = new Measurement (Convert.ToDouble(398150000), "µK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_Microkelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "Re"; + string targetUnitName = "µK"; + Measurement expected = new Measurement (Convert.ToDouble(273775000), "µK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_nK_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Re"; + string targetUnitName = "nK"; + Measurement expected = new Measurement (Convert.ToDouble(398150000000L), "nK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_nK_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "Re"; + string targetUnitName = "nK"; + Measurement expected = new Measurement (Convert.ToDouble(273775000000L), "nK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_kK_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Re"; + string targetUnitName = "kK"; + Measurement expected = new Measurement (Convert.ToDouble(0.39815), "kK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_kK_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "Re"; + string targetUnitName = "kK"; + Measurement expected = new Measurement (Convert.ToDouble(0.273775), "kK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_Megakelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Re"; + string targetUnitName = "MK"; + Measurement expected = new Measurement (Convert.ToDouble(0.00039815), "MK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_Megakelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "Re"; + string targetUnitName = "MK"; + Measurement expected = new Measurement (Convert.ToDouble(0.000273775), "MK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_Celsius_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Re"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(125), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_Celsius_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "Re"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(0.62), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_Celsius_Test3 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0); + string currentUnitName = "Re"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(0), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_Rankine_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Re"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(716.67), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_Rankine_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "Re"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(492.8), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Reaumur_to_Rankine_Test3 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0); + string currentUnitName = "Re"; + string targetUnitName = "Ra"; + Measurement expected = new Measurement (Convert.ToDouble(491.67), "Ra"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Rankine" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_Kelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Ra"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(55.56), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_Kelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "Ra"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(0.28), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_Kelvin_Test3 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0); + string currentUnitName = "Ra"; + string targetUnitName = "K"; + Measurement expected = new Measurement (Convert.ToDouble(0), "K"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_Fahrenheit_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Ra"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(-359.67), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_Fahrenheit_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "Ra"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(-459.17), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_Fahrenheit_Test3 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0); + string currentUnitName = "Ra"; + string targetUnitName = "F"; + Measurement expected = new Measurement (Convert.ToDouble(-459.67), "F"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_Millikelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Ra"; + string targetUnitName = "mK"; + Measurement expected = new Measurement (Convert.ToDouble(55555.56), "mK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_Millikelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "Ra"; + string targetUnitName = "mK"; + Measurement expected = new Measurement (Convert.ToDouble(277.78), "mK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_Microkelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Ra"; + string targetUnitName = "µK"; + Measurement expected = new Measurement (Convert.ToDouble(55555555.56), "µK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_Microkelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "Ra"; + string targetUnitName = "µK"; + Measurement expected = new Measurement (Convert.ToDouble(277777.78), "µK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_nK_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Ra"; + string targetUnitName = "nK"; + Measurement expected = new Measurement (Convert.ToDouble(55555555555.56), "nK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_nK_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "Ra"; + string targetUnitName = "nK"; + Measurement expected = new Measurement (Convert.ToDouble(277777777.78), "nK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_kK_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Ra"; + string targetUnitName = "kK"; + Measurement expected = new Measurement (Convert.ToDouble(0.055555555555556), "kK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_kK_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "Ra"; + string targetUnitName = "kK"; + Measurement expected = new Measurement (Convert.ToDouble(0.000277777777778), "kK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_Megakelvin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Ra"; + string targetUnitName = "MK"; + Measurement expected = new Measurement (Convert.ToDouble(5.5555555556E-05), "MK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_Megakelvin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "Ra"; + string targetUnitName = "MK"; + Measurement expected = new Measurement (Convert.ToDouble(2.77777778E-07), "MK"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_Celsius_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Ra"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(-217.59), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_Celsius_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "Ra"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(-272.87), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_Celsius_Test3 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0); + string currentUnitName = "Ra"; + string targetUnitName = "C"; + Measurement expected = new Measurement (Convert.ToDouble(-273.15), "C"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_Reaumur_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Ra"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(-174.08), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_Reaumur_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.5); + string currentUnitName = "Ra"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(-218.3), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Rankine_to_Reaumur_Test3 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0); + string currentUnitName = "Ra"; + string targetUnitName = "Re"; + Measurement expected = new Measurement (Convert.ToDouble(-218.52), "Re"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + #endregion + + #region "Mass Tests" + #region "Source as kg" + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_g_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kg"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_g_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kg"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_mg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kg"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_mg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kg"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_µg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kg"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_µg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kg"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(999999999), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_ng_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kg"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000L), "ng"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_ng_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kg"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000L), "ng"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_Megagram_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kg"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "Mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_Megagram_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kg"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "Mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_Gg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kg"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "Gg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_Gg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kg"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "Gg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_tonne_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kg"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_tonne_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kg"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_ton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kg"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(0.110231131092439), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_ton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kg"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(0.001102311309822), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_stone_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kg"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(15.747304441777), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_stone_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kg"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(0.157473044260297), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_cwt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kg"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(2.20462262184878), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_cwt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kg"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(0.022046226196442), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_lb_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kg"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(220.462262184878), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_lb_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kg"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(2.20462261964415), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_oz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kg"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(3527.39619495804), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kg_to_oz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kg"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(35.2739619143064), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as g" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_kg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "g"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_kg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "g"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_mg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "g"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_mg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "g"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_µg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "g"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_µg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "g"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_ng_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "g"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "ng"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_ng_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "g"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(999999999), "ng"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_Megagram_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "g"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "Mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_Megagram_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "g"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "Mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_Gg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "g"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "Gg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_Gg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "g"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "Gg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_tonne_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "g"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_tonne_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "g"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_ton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "g"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(0.000110231131092), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_ton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "g"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(1.10231131E-06), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_stone_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "g"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(0.015747304441777), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_stone_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "g"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(0.00015747304426), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_cwt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "g"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(0.002204622621849), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_cwt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "g"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(2.2046226196E-05), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_lb_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "g"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(0.220462262184878), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_lb_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "g"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(0.002204622619644), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_oz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "g"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(3.5273961949580408), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_g_to_oz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "g"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(0.035273961914306), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as mg" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_kg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mg"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_kg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mg"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_g_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mg"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_g_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mg"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_µg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mg"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_µg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mg"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_ng_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mg"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "ng"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_ng_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mg"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "ng"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_Megagram_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mg"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "Mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_Megagram_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mg"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "Mg"); + //should be 0.000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_Gg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mg"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(1E-10), "Gg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_Gg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mg"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(1E-12), "Gg"); + //value should be 0.000000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_tonne_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mg"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_tonne_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mg"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "t"); + // value should be 0.000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_ton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mg"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(1.10231131E-07), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_ton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mg"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(1.102311E-09), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_stone_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mg"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(1.5747304442E-05), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_stone_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mg"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(1.57473044E-07), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_cwt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mg"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(2.204622622E-06), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_cwt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mg"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(2.2046226E-08), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_lb_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mg"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(0.000220462262185), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_lb_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mg"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(2.20462262E-06), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_oz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mg"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(0.003527396194958), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mg_to_oz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mg"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(3.5273961914E-05), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as µg" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_kg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µg"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_kg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µg"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_g_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µg"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_g_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µg"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_mg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µg"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_mg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µg"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_ng_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µg"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "ng"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_ng_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µg"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "ng"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_Megagram_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µg"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(1E-10), "Mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_Megagram_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µg"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(1E-12), "Mg"); + //should be 0.000000000000099999999, .net rounds at 15 total digits + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_Gg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µg"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(1E-13), "Gg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_Gg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µg"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(1E-15), "Gg"); + //should be 0.00000000000000099999999, .net rounds at 15 total digits + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_tonne_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µg"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(1E-10), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_tonne_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µg"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(1E-12), "t"); + //value should be 0.000000000000999999999, .net rounds at 15 total digits + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_ton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µg"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(1.10231E-10), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_ton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µg"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(1.102E-12), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_stone_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µg"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(1.5747304E-08), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_stone_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µg"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(1.57473E-10), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_cwt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µg"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(2.204623E-09), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_cwt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µg"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(2.2046E-11), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_lb_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µg"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(2.20462262E-07), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_lb_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µg"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(2.204623E-09), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_oz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µg"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(3.527396195E-06), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µg_to_oz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µg"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(3.5273962E-08), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as ng" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_kg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ng"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(1E-10), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_kg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ng"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(1E-12), "kg"); + //value should be 0.000000000000999999999, .net rounds at 15 total digits + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_g_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ng"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_g_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ng"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "g"); + //value should be 0.000000000999999999, .net rounds at 15 total digits + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_mg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ng"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_mg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ng"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_µg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ng"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_µg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ng"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_Megagram_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ng"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(1E-13), "Mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_Megagram_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ng"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(1E-15), "Mg"); + //should be 0.000000000000000999999999, .net rounds at 15 total digits + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_Gg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ng"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(0), "Gg"); + //value should be 0.0000000000000001, .net rounds at 15 total digits + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_Gg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ng"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(0.0), "Gg"); + //value should be 9.99999999E-19, .net rounds at 15 total digits + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_tonne_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ng"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(1E-13), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_tonne_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ng"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(1E-15), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_ton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ng"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(1.1E-13), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_ton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ng"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(1E-15), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_stone_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ng"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(1.5747E-11), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_stone_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ng"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(1.57E-13), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_cwt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ng"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(2.205E-12), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_cwt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ng"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(2.2E-14), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_lb_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ng"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(2.20462E-10), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_lb_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ng"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(2.205E-12), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_oz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ng"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(3.527396E-09), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ng_to_oz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ng"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(3.5274E-11), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Megagram" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_kg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mg"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_kg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mg"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_g_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mg"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_g_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mg"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_µg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mg"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000L), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_µg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mg"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000L), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_ng_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mg"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000000L), "ng"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_ng_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mg"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000000L), "ng"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_mg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mg"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_mg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mg"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(999999999), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_Gg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mg"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "Gg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_Gg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mg"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "Gg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagrams_to_tonne_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mg"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(100), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagrams_to_tonne_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mg"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(0.999999999), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_ton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mg"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(110.231131092439), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_ton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mg"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(1.10231130982208), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_stone_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mg"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(15747.304441777), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_stone_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mg"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(157.473044260297), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_cwt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mg"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(2204.62262184878), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_cwt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mg"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(22.0462261964415), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_lb_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mg"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(220462.262184878), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_lb_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mg"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(2204.62261964415), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_oz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mg"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(3527396.194958), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megagram_to_oz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mg"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(35273.961914306), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Gigagram" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_kg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gg"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_kg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gg"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_g_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gg"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_g_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gg"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(999999999), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_mg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gg"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000.0), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_mg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gg"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000L), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_µg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gg"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000000L), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_µg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gg"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000000L), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_ng_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gg"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(1E+20), "ng"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_ng_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gg"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000000000L), "ng"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_Megagram_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gg"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_Megagram_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gg"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "Mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_tonne_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gg"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_tonne_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gg"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_ton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gg"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(110231.131092439), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_ton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gg"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(1102.31130982208), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_stone_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gg"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(15747304.441777), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_stone_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gg"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(157473.044260297), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_cwt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gg"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(2204622.62184878), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_cwt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gg"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(22046.2261964415), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_lb_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gg"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(220462262.184878), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_lb_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gg"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(2204622.61964415), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_oz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gg"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(3527396194.95804), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gg_to_oz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gg"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(35273961.9143064), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Tonnes" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_kg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "t"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_kg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "t"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_mg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "t"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_mg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "t"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(999999999), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_g_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "t"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_g_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "t"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_µg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "t"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000L), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_µg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "t"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000L), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_ng_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "t"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000000L), "ng"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_ng_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "t"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000000L), "ng"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_Megagrams_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "t"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(100), "Mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_Megagrams_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "t"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(0.999999999), "Mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_Gg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "t"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "Gg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_Gg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "t"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "Gg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_ton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "t"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(110.231131092439), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_ton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "t"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(1.10231130982208), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_cwt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "t"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(2204.62262184878), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_cwt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "t"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(22.0462261964415), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_stone_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "t"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(15747.304441777), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_stone_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "t"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(157.473044260297), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_lb_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "t"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(220462.262184878), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_lb_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "t"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(2204.62261964415), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_oz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "t"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(3527396.194958), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonne_to_oz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "t"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(35273.961914306), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Tons" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ton_to_kg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ton"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(90718.474), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ton_to_kg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ton"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(907.184739092815), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ton_to_mg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ton"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(90718474000L), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ton_to_mg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ton"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(907184739.092815), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ton_to_g_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ton"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(90718474), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ton_to_g_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ton"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(907184.739092815), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ton_to_µg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ton"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(90718474000000.0), "µg"); + //should be 90718474000000, .net bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ton_to_µg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ton"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(907184739092.815), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ton_to_ng_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ton"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(90718474000000016L), "ng"); + //should be 90718474000000000, .net bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ton_to_ng_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ton"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(907184739092815.0), "ng"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ton_to_Megagrams_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ton"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(90.718474), "Mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ton_to_Megagrams_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ton"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(0.907184739092815), "Mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ton_to_Gg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ton"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(0.090718474), "Gg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ton_to_Gg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ton"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(0.000907184739093), "Gg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ton_to_tonne_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ton"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(90.718474), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ton_to_tonne_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ton"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(0.907184739092815), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ton_to_lb_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ton"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(200000), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ton_to_lb_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ton"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(1999.999998), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ton_to_oz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ton"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(3200000), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ton_to_oz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ton"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(31999.999968), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Stone" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_kg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "st"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(635.029318), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_kg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "st"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(6.35029317364971), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_g_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "st"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(635029.318), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_g_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "st"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(6350.29317364971), "g"); + //actual value 6350.29318, .net bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_mg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "st"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(635029318.0), "mg"); + //actual value 635029318, .net bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_mg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "st"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(6350293.17364971), "mg"); + //actual value 6350293.1736, .net bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_µg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "st"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(635029318000L), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_µg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "st"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(6350293173.64971), "µg"); + //actual value 6350293173.6, .net bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_ng_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "st"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(635029318000000L), "ng"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_ng_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "st"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(6350293173649.71), "ng"); + //actual value 6350293173600, .net bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_Megagram_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "st"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(0.635029318), "Mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_Megagram_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "st"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(0.00635029317365), "Mg"); + //actual value .006350293173600, .net bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_Gg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "st"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(0.000635029318), "Gg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_Gg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "st"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(6.350293174E-06), "Gg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_tonne_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "st"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(0.635029318), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_tonne_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "st"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(0.00635029317365), "t"); + //actual value 0.006350293, .net bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_ton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "st"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(0.7), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_ton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "st"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(0.006999999993), "ton"); + //should be 0.007, .net bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_cwt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "st"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(14), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_cwt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "st"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(0.13999999986), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_lb_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "st"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(1400), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_lb_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "st"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(13.999999986), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_oz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "st"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(22400), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_stone_to_oz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "st"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(223.999999776), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as CWT" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_kg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cwt"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(4535.9237), "kg"); + // actual value 4535.9237, .net bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_kg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cwt"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(45.3592369546408), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_mg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cwt"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(4535923700L), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_mg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cwt"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(45359236.9546408), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_g_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cwt"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(4535923.7), "g"); + //should be 4535923.7, .net bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_g_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cwt"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(45359.2369546408), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + + //var d = Math.(expected.Value); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_µg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cwt"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(4535923700000.0), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_µg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cwt"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(45359236954.640762), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_ng_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cwt"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(4.5359237E+15), "ng"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_ng_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cwt"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(45359236954640.8), "ng"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_Megagram_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cwt"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(4.5359237), "Mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_Megagram_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cwt"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(0.045359236954641), "Mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_Gg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cwt"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(0.0045359237), "Gg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_Gg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cwt"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(4.5359236955E-05), "Gg"); + //actual value 0.000045359, .net bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_tonne_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cwt"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(4.5359237), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_tonne_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cwt"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(0.045359236954641), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_ton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cwt"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(5), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_ton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cwt"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(0.04999999995), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_stone_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cwt"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(714.285714285714), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_stone_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cwt"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(7.14285713571429), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_lb_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cwt"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(10000), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_lb_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cwt"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(99.9999999), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_oz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cwt"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(160000), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cwt_to_oz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cwt"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(1599.9999984), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Pound" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_kg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(45.359237), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_kg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(0.453592369546408), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_g_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(45359.237), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_g_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(453.592369546408), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_mg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(45359237), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_mg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(453592.369546408), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_µg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(45359237000.0), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_µg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(453592369.546408), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_ng_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(45359237000000.0), "ng"); + //should be 45359237000000, .net conversion bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_ng_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(453592369546.41), "ng"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_Megagram_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(0.045359237), "Mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_Megagram_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(0.000453592369546), "Mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_Gg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(4.5359237E-05), "Gg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_Gg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(4.5359237E-07), "Gg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_tonne_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(0.045359237), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_tonne_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(0.000453592369546), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_ton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(0.05), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_ton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(0.0004999999995), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_stone_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(7.14285714285714), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_stone_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(0.071428571357143), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_cwt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(1), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_cwt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(0.00999999999), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_oz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(1600), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lb_to_oz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb"; + string targetUnitName = "oz"; + Measurement expected = new Measurement (Convert.ToDouble(15.999999984), "oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Ounce" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_kg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "oz"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(2.8349523125), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_kg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "oz"; + string targetUnitName = "kg"; + Measurement expected = new Measurement (Convert.ToDouble(0.02834952309665), "kg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_g_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "oz"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(2834.9523125), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_g_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "oz"; + string targetUnitName = "g"; + Measurement expected = new Measurement (Convert.ToDouble(28.3495230966505), "g"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_mg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "oz"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(2834952.3125), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_mg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "oz"; + string targetUnitName = "mg"; + Measurement expected = new Measurement (Convert.ToDouble(28349.5230966505), "mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_µg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "oz"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(2834952312.5), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_µg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "oz"; + string targetUnitName = "µg"; + Measurement expected = new Measurement (Convert.ToDouble(28349523.0966505), "µg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_ng_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "oz"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(2834952312500.0), "ng"); + //should be 2834952312500, .net conversion bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_ng_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "oz"; + string targetUnitName = "ng"; + Measurement expected = new Measurement (Convert.ToDouble(28349523096.6505), "ng"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_Megagram_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "oz"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(0.0028349523125), "Mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_Megagram_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "oz"; + string targetUnitName = "Mg"; + Measurement expected = new Measurement (Convert.ToDouble(2.8349523097E-05), "Mg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_Gg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "oz"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(2.834952313E-06), "Gg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_Gg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "oz"; + string targetUnitName = "Gg"; + Measurement expected = new Measurement (Convert.ToDouble(2.8349523E-08), "Gg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_tonne_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "oz"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(0.0028349523125), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_tonne_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "oz"; + string targetUnitName = "t"; + Measurement expected = new Measurement (Convert.ToDouble(2.8349523097E-05), "t"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_ton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "oz"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(0.003125), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_ton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "oz"; + string targetUnitName = "ton"; + Measurement expected = new Measurement (Convert.ToDouble(3.1249999969E-05), "ton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_stone_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "oz"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(0.446428571428571), "st"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_stone_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "oz"; + string targetUnitName = "st"; + Measurement expected = new Measurement (Convert.ToDouble(0.004464285709821), "st"); + //UK stone; US stone 0.005 + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_cwt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "oz"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(0.0625), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_cwt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "oz"; + string targetUnitName = "cwt"; + Measurement expected = new Measurement (Convert.ToDouble(0.000624999999375), "cwt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_lb_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "oz"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(6.25), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_oz_to_lb_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "oz"; + string targetUnitName = "lb"; + Measurement expected = new Measurement (Convert.ToDouble(0.0624999999375), "lb"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + #endregion + + #region "Time Tests" + #region "Source as Seconds" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_sec_to_min_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "s"; + string targetUnitName = "min"; + Measurement expected = new Measurement (Convert.ToDouble(1.66666666666667), "min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_sec_to_min_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "s"; + string targetUnitName = "min"; + Measurement expected = new Measurement (Convert.ToDouble(0.01666666665), "min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_sec_to_hr_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "s"; + string targetUnitName = "hr"; + Measurement expected = new Measurement (Convert.ToDouble(0.027777777777778), "hr"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_sec_to_hr_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "s"; + string targetUnitName = "hr"; + Measurement expected = new Measurement (Convert.ToDouble(0.0002777777775), "hr"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_sec_to_ms_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "s"; + string targetUnitName = "ms"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "ms"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_sec_to_ms_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "s"; + string targetUnitName = "ms"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "ms"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_sec_to_day_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "s"; + string targetUnitName = "d"; + Measurement expected = new Measurement (Convert.ToDouble(0.001157407407407), "d"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_sec_to_day_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "s"; + string targetUnitName = "d"; + Measurement expected = new Measurement (Convert.ToDouble(1.1574074062E-05), "d"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_sec_to_wk_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "s"; + string targetUnitName = "wk"; + Measurement expected = new Measurement (Convert.ToDouble(0.000165343915344), "wk"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_sec_to_wk_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "s"; + string targetUnitName = "wk"; + Measurement expected = new Measurement (Convert.ToDouble(1.653439152E-06), "wk"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Minutes" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_min_to_sec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "min"; + string targetUnitName = "s"; + Measurement expected = new Measurement (Convert.ToDouble(6000), "s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_min_to_sec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "min"; + string targetUnitName = "s"; + Measurement expected = new Measurement (Convert.ToDouble(59.99999994), "s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_min_to_hr_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "min"; + string targetUnitName = "hr"; + Measurement expected = new Measurement (Convert.ToDouble(1.66666666666667), "hr"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_min_to_hr_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "min"; + string targetUnitName = "hr"; + Measurement expected = new Measurement (Convert.ToDouble(0.01666666665), "hr"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_min_to_ms_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "min"; + string targetUnitName = "ms"; + Measurement expected = new Measurement (Convert.ToDouble(6000000), "ms"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_min_to_ms_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "min"; + string targetUnitName = "ms"; + Measurement expected = new Measurement (Convert.ToDouble(59999.99994), "ms"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_min_to_day_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "min"; + string targetUnitName = "d"; + Measurement expected = new Measurement (Convert.ToDouble(0.069444444444444), "d"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_min_to_day_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "min"; + string targetUnitName = "d"; + Measurement expected = new Measurement (Convert.ToDouble(0.00069444444375), "d"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_min_to_wk_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "min"; + string targetUnitName = "wk"; + Measurement expected = new Measurement (Convert.ToDouble(0.009920634920635), "wk"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_min_to_wk_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "min"; + string targetUnitName = "wk"; + Measurement expected = new Measurement (Convert.ToDouble(9.9206349107E-05), "wk"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Hours" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_hr_to_sec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "hr"; + string targetUnitName = "s"; + Measurement expected = new Measurement (Convert.ToDouble(360000), "s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_hr_to_sec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "hr"; + string targetUnitName = "s"; + Measurement expected = new Measurement (Convert.ToDouble(3599.9999964), "s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_hr_to_min_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "hr"; + string targetUnitName = "min"; + Measurement expected = new Measurement (Convert.ToDouble(6000), "min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_hr_to_min_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "hr"; + string targetUnitName = "min"; + Measurement expected = new Measurement (Convert.ToDouble(59.99999994), "min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_hr_to_ms_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "hr"; + string targetUnitName = "ms"; + Measurement expected = new Measurement (Convert.ToDouble(360000000), "ms"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_hr_to_ms_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "hr"; + string targetUnitName = "ms"; + Measurement expected = new Measurement (Convert.ToDouble(3599999.9964), "ms"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_hr_to_day_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "hr"; + string targetUnitName = "d"; + Measurement expected = new Measurement (Convert.ToDouble(4.16666666666667), "d"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_hr_to_day_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "hr"; + string targetUnitName = "d"; + Measurement expected = new Measurement (Convert.ToDouble(0.041666666625), "d"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_hr_to_wk_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "hr"; + string targetUnitName = "wk"; + Measurement expected = new Measurement (Convert.ToDouble(0.595238095238095), "wk"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_hr_to_wk_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "hr"; + string targetUnitName = "wk"; + Measurement expected = new Measurement (Convert.ToDouble(0.005952380946429), "wk"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Milliseconds" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ms_to_sec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ms"; + string targetUnitName = "s"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ms_to_sec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ms"; + string targetUnitName = "s"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ms_to_min_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ms"; + string targetUnitName = "min"; + Measurement expected = new Measurement (Convert.ToDouble(0.001666666666667), "min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ms_to_min_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ms"; + string targetUnitName = "min"; + Measurement expected = new Measurement (Convert.ToDouble(1.666666665E-05), "min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ms_to_hr_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ms"; + string targetUnitName = "hr"; + Measurement expected = new Measurement (Convert.ToDouble(2.7777777778E-05), "hr"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ms_to_hr_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ms"; + string targetUnitName = "hr"; + Measurement expected = new Measurement (Convert.ToDouble(2.77777778E-07), "hr"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ms_to_day_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ms"; + string targetUnitName = "d"; + Measurement expected = new Measurement (Convert.ToDouble(1.157407407E-06), "d"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ms_to_day_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ms"; + string targetUnitName = "d"; + Measurement expected = new Measurement (Convert.ToDouble(1.1574074E-08), "d"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ms_to_wk_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ms"; + string targetUnitName = "wk"; + Measurement expected = new Measurement (Convert.ToDouble(1.65343915E-07), "wk"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ms_to_wk_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ms"; + string targetUnitName = "wk"; + Measurement expected = new Measurement (Convert.ToDouble(1.653439E-09), "wk"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Days" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_day_to_sec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "d"; + string targetUnitName = "s"; + Measurement expected = new Measurement (Convert.ToDouble(8640000), "s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_day_to_sec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "d"; + string targetUnitName = "s"; + Measurement expected = new Measurement (Convert.ToDouble(86399.9999136), "s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_day_to_min_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "d"; + string targetUnitName = "min"; + Measurement expected = new Measurement (Convert.ToDouble(144000), "min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_day_to_min_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "d"; + string targetUnitName = "min"; + Measurement expected = new Measurement (Convert.ToDouble(1439.99999856), "min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_day_to_hr_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "d"; + string targetUnitName = "hr"; + Measurement expected = new Measurement (Convert.ToDouble(2400), "hr"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_day_to_hr_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "d"; + string targetUnitName = "hr"; + Measurement expected = new Measurement (Convert.ToDouble(23.999999976), "hr"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_day_to_ms_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "d"; + string targetUnitName = "ms"; + Measurement expected = new Measurement (Convert.ToDouble(8640000000L), "ms"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_day_to_ms_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "d"; + string targetUnitName = "ms"; + Measurement expected = new Measurement (Convert.ToDouble(86399999.9136), "ms"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_day_to_wk_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "d"; + string targetUnitName = "wk"; + Measurement expected = new Measurement (Convert.ToDouble(14.2857142857143), "wk"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_day_to_wk_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "d"; + string targetUnitName = "wk"; + Measurement expected = new Measurement (Convert.ToDouble(0.142857142714286), "wk"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Weeks" + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_wk_to_sec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "wk"; + string targetUnitName = "s"; + Measurement expected = new Measurement (Convert.ToDouble(60480000), "s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_wk_to_sec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "wk"; + string targetUnitName = "s"; + Measurement expected = new Measurement (Convert.ToDouble(604799.9993952), "s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_wk_to_min_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "wk"; + string targetUnitName = "min"; + Measurement expected = new Measurement (Convert.ToDouble(1008000), "min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_wk_to_min_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "wk"; + string targetUnitName = "min"; + Measurement expected = new Measurement (Convert.ToDouble(10079.99998992), "min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_wk_to_hr_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "wk"; + string targetUnitName = "hr"; + Measurement expected = new Measurement (Convert.ToDouble(16800), "hr"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_wk_to_hr_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "wk"; + string targetUnitName = "hr"; + Measurement expected = new Measurement (Convert.ToDouble(167.999999832), "hr"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_wk_to_ms_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "wk"; + string targetUnitName = "ms"; + Measurement expected = new Measurement (Convert.ToDouble(60480000000L), "ms"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_wk_to_ms_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "wk"; + string targetUnitName = "ms"; + Measurement expected = new Measurement (Convert.ToDouble(604799999.3952), "ms"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_wk_to_day_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "wk"; + string targetUnitName = "d"; + Measurement expected = new Measurement (Convert.ToDouble(700), "d"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_wk_to_day_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "wk"; + string targetUnitName = "d"; + Measurement expected = new Measurement (Convert.ToDouble(6.999999993), "d"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + #endregion + + + #endregion + } +} \ No newline at end of file diff --git a/Cubico.Tests/UnitConverterTest2.cs b/Cubico.Tests/UnitConverterTest2.cs new file mode 100644 index 0000000..3eecfea --- /dev/null +++ b/Cubico.Tests/UnitConverterTest2.cs @@ -0,0 +1,10164 @@ +using System; +using NUnit.Framework; +using Cubico; + +namespace Cubico.Test +{ + [TestClass()] + public class UnitConverterTest2 + { + private TestContext testContextInstance; + private UnitProvider unitPro = new UnitProvider (); + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext { + get { return testContextInstance; } + set { testContextInstance = value; } + } + #region "Additional test attributes" + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + // _ _ + //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) + //End Sub + // + //Use ClassCleanup to run code after all tests in a class have run + // _ _ + //Public Shared Sub MyClassCleanup() + //End Sub + // + //Use TestInitialize to run code before running each test + // _ _ + //Public Sub MyTestInitialize() + //End Sub + // + //Use TestCleanup to run code after each test has run + // _ _ + //Public Sub MyTestCleanup() + //End Sub + // + + #endregion + #region "UnitConverter.ConvertUnits" + + #region "Force Tests" + #region "Source as Newton (N)" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_N_to_dyn_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "N"; + string targetUnitName = "dyn"; + Measurement expected = new Measurement (Convert.ToDouble(10000000.0), "dyn"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_N_to_dyn_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "N"; + string targetUnitName = "dyn"; + Measurement expected = new Measurement (Convert.ToDouble(99999.9999), "dyn"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_N_to_lbf_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "N"; + string targetUnitName = "lbf"; + Measurement expected = new Measurement (Convert.ToDouble(22.4808943099999), "lbf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_N_to_lbf_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "N"; + string targetUnitName = "lbf"; + Measurement expected = new Measurement (Convert.ToDouble(0.22480894287519), "lbf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_N_to_tonf_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "N"; + string targetUnitName = "tonf"; + Measurement expected = new Measurement (Convert.ToDouble(0.011240447154986), "tonf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_N_to_tonf_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "N"; + string targetUnitName = "tonf"; + Measurement expected = new Measurement (Convert.ToDouble(0.000112404471437), "tonf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_N_to_tonnef_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "N"; + string targetUnitName = "tonnef"; + Measurement expected = new Measurement (Convert.ToDouble(0.010197162129779), "tonnef"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_N_to_tonnef_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "N"; + string targetUnitName = "tonnef"; + Measurement expected = new Measurement (Convert.ToDouble(0.000101971621196), "tonnef"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_N_to_Meganewton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "N"; + string targetUnitName = "Meganewton"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "Meganewton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_N_to_Meganewton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "N"; + string targetUnitName = "Meganewton"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "Meganewton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_N_to_GN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "N"; + string targetUnitName = "GN"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "GN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_N_to_GN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "N"; + string targetUnitName = "GN"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "GN"); + //should be 0.000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_N_to_kN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "N"; + string targetUnitName = "kN"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "kN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_N_to_kN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "N"; + string targetUnitName = "kN"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "kN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_N_to_mN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "N"; + string targetUnitName = "mN"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "mN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_N_to_mN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "N"; + string targetUnitName = "mN"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "mN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_N_to_µN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "N"; + string targetUnitName = "µN"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "µN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_N_to_µN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "N"; + string targetUnitName = "µN"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "µN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_N_to_nN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "N"; + string targetUnitName = "nN"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000.0), "nN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_N_to_nN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "N"; + string targetUnitName = "nN"; + Measurement expected = new Measurement (Convert.ToDouble(999999999), "nN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Dyne (dyn)" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_dyn_to_N_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "dyn"; + string targetUnitName = "N"; + Measurement expected = new Measurement (Convert.ToDouble(0.001), "N"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_dyn_to_N_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "dyn"; + string targetUnitName = "N"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-06), "N"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_dyn_to_lbf_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "dyn"; + string targetUnitName = "lbf"; + Measurement expected = new Measurement (Convert.ToDouble(0.0002248089431), "lbf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_dyn_to_lbf_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "dyn"; + string targetUnitName = "lbf"; + Measurement expected = new Measurement (Convert.ToDouble(2.248089429E-06), "lbf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_dyn_to_tonf_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "dyn"; + string targetUnitName = "tonf"; + Measurement expected = new Measurement (Convert.ToDouble(1.12404472E-07), "tonf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_dyn_to_tonf_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "dyn"; + string targetUnitName = "tonf"; + Measurement expected = new Measurement (Convert.ToDouble(1.124045E-09), "tonf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_dyn_to_ng_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "dyn"; + string targetUnitName = "tonnef"; + Measurement expected = new Measurement (Convert.ToDouble(1.01971621E-07), "tonnef"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_dyn_to_tonnef_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "dyn"; + string targetUnitName = "tonnef"; + Measurement expected = new Measurement (Convert.ToDouble(1.019716E-09), "tonnef"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_dyn_to_Meganewton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "dyn"; + string targetUnitName = "Meganewton"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "Meganewton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_dyn_to_Meganewton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "dyn"; + string targetUnitName = "Meganewton"; + Measurement expected = new Measurement (Convert.ToDouble(1E-11), "Meganewton"); + //should be 0.00000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_dyn_to_GN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "dyn"; + string targetUnitName = "GN"; + Measurement expected = new Measurement (Convert.ToDouble(1E-12), "GN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_dyn_to_GN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "dyn"; + string targetUnitName = "GN"; + Measurement expected = new Measurement (Convert.ToDouble(1E-14), "GN"); + //should be 0.00000000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_dyn_to_kN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "dyn"; + string targetUnitName = "kN"; + Measurement expected = new Measurement (Convert.ToDouble(1E-06), "kN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_dyn_to_kN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "dyn"; + string targetUnitName = "kN"; + Measurement expected = new Measurement (Convert.ToDouble(1E-08), "kN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_dyn_to_mN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "dyn"; + string targetUnitName = "mN"; + Measurement expected = new Measurement (Convert.ToDouble(1), "mN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_dyn_to_mN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "dyn"; + string targetUnitName = "mN"; + Measurement expected = new Measurement (Convert.ToDouble(0.00999999999), "mN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_dyn_to_µN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "dyn"; + string targetUnitName = "µN"; + Measurement expected = new Measurement (Convert.ToDouble(1000), "µN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_dyn_to_µN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "dyn"; + string targetUnitName = "µN"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999), "µN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_dyn_to_nN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "dyn"; + string targetUnitName = "nN"; + Measurement expected = new Measurement (Convert.ToDouble(1000000), "nN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_dyn_to_nN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "dyn"; + string targetUnitName = "nN"; + Measurement expected = new Measurement (Convert.ToDouble(9999.99999), "nN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Pound-force (lbf)" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbf_to_N_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lbf"; + string targetUnitName = "N"; + Measurement expected = new Measurement (Convert.ToDouble(444.82216152548), "N"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbf_to_N_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lbf"; + string targetUnitName = "N"; + Measurement expected = new Measurement (Convert.ToDouble(4.44822161080658), "N"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbf_to_dyn_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lbf"; + string targetUnitName = "dyn"; + Measurement expected = new Measurement (Convert.ToDouble(44482216.152548), "dyn"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbf_to_dyn_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lbf"; + string targetUnitName = "dyn"; + Measurement expected = new Measurement (Convert.ToDouble(444822.161080658), "dyn"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbf_to_tonf_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lbf"; + string targetUnitName = "tonf"; + Measurement expected = new Measurement (Convert.ToDouble(0.05), "tonf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbf_to_tonf_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lbf"; + string targetUnitName = "tonf"; + Measurement expected = new Measurement (Convert.ToDouble(0.0004999999995), "tonf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbf_to_tonnef_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lbf"; + string targetUnitName = "tonnef"; + Measurement expected = new Measurement (Convert.ToDouble(0.045359236999934), "tonnef"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbf_to_tonnef_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lbf"; + string targetUnitName = "tonnef"; + Measurement expected = new Measurement (Convert.ToDouble(0.000453592369546), "tonnef"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbf_to_Meganewton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lbf"; + string targetUnitName = "Meganewton"; + Measurement expected = new Measurement (Convert.ToDouble(0.000444822161525), "Meganewton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbf_to_Meganewton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lbf"; + string targetUnitName = "Meganewton"; + Measurement expected = new Measurement (Convert.ToDouble(4.448221611E-06), "Meganewton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbf_to_GN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lbf"; + string targetUnitName = "GN"; + Measurement expected = new Measurement (Convert.ToDouble(4.44822162E-07), "GN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbf_to_GN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lbf"; + string targetUnitName = "GN"; + Measurement expected = new Measurement (Convert.ToDouble(4.448222E-09), "GN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbf_to_kN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lbf"; + string targetUnitName = "kN"; + Measurement expected = new Measurement (Convert.ToDouble(0.44482216152548), "kN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbf_to_kN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lbf"; + string targetUnitName = "kN"; + Measurement expected = new Measurement (Convert.ToDouble(0.004448221610807), "kN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbf_to_mN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lbf"; + string targetUnitName = "mN"; + Measurement expected = new Measurement (Convert.ToDouble(444822.16152548), "mN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbf_to_mN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lbf"; + string targetUnitName = "mN"; + Measurement expected = new Measurement (Convert.ToDouble(4448.22161080658), "mN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbf_to_µN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lbf"; + string targetUnitName = "µN"; + Measurement expected = new Measurement (Convert.ToDouble(444822161.52548), "µN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbf_to_µN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lbf"; + string targetUnitName = "µN"; + Measurement expected = new Measurement (Convert.ToDouble(4448221.61080658), "µN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbf_to_nN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lbf"; + string targetUnitName = "nN"; + Measurement expected = new Measurement (Convert.ToDouble(444822161525.48), "nN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbf_to_nN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lbf"; + string targetUnitName = "nN"; + Measurement expected = new Measurement (Convert.ToDouble(4448221610.80658), "nN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Ton-force(short) (tonf)" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonf_to_N_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "tonf"; + string targetUnitName = "N"; + Measurement expected = new Measurement (Convert.ToDouble(889644.3230521), "N"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonf_to_N_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "tonf"; + string targetUnitName = "N"; + Measurement expected = new Measurement (Convert.ToDouble(8896.44322162456), "N"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonf_to_dyn_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "tonf"; + string targetUnitName = "dyn"; + Measurement expected = new Measurement (Convert.ToDouble(88964432305.21), "dyn"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonf_to_dyn_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "tonf"; + string targetUnitName = "dyn"; + Measurement expected = new Measurement (Convert.ToDouble(889644322.162456), "dyn"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonf_to_lbf_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "tonf"; + string targetUnitName = "lbf"; + Measurement expected = new Measurement (Convert.ToDouble(200000), "lbf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonf_to_lbf_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "tonf"; + string targetUnitName = "lbf"; + Measurement expected = new Measurement (Convert.ToDouble(1999.999998), "lbf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonf_to_tonnef_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "tonf"; + string targetUnitName = "tonnef"; + Measurement expected = new Measurement (Convert.ToDouble(90.718474), "tonnef"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonf_to_tonnef_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "tonf"; + string targetUnitName = "tonnef"; + Measurement expected = new Measurement (Convert.ToDouble(0.907184739092815), "tonnef"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonf_to_Meganewton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "tonf"; + string targetUnitName = "Meganewton"; + Measurement expected = new Measurement (Convert.ToDouble(0.8896443230521), "Meganewton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonf_to_Meganewton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "tonf"; + string targetUnitName = "Meganewton"; + Measurement expected = new Measurement (Convert.ToDouble(0.008896443221625), "Meganewton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonf_to_GN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "tonf"; + string targetUnitName = "GN"; + Measurement expected = new Measurement (Convert.ToDouble(0.000889644323052), "GN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonf_to_GN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "tonf"; + string targetUnitName = "GN"; + Measurement expected = new Measurement (Convert.ToDouble(8.896443222E-06), "GN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonf_to_kN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "tonf"; + string targetUnitName = "kN"; + Measurement expected = new Measurement (Convert.ToDouble(889.6443230521), "kN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonf_to_kN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "tonf"; + string targetUnitName = "kN"; + Measurement expected = new Measurement (Convert.ToDouble(8.89644322162456), "kN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonf_to_mN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "tonf"; + string targetUnitName = "mN"; + Measurement expected = new Measurement (Convert.ToDouble(889644323.0521), "mN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonf_to_mN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "tonf"; + string targetUnitName = "mN"; + Measurement expected = new Measurement (Convert.ToDouble(8896443.22162456), "mN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonf_to_µN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "tonf"; + string targetUnitName = "µN"; + Measurement expected = new Measurement (Convert.ToDouble(889644323052.1), "µN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonf_to_µN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "tonf"; + string targetUnitName = "µN"; + Measurement expected = new Measurement (Convert.ToDouble(8896443221.62456), "µN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonf_to_nN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "tonf"; + string targetUnitName = "nN"; + Measurement expected = new Measurement (Convert.ToDouble(889644323052100L), "nN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonf_to_nN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "tonf"; + string targetUnitName = "nN"; + Measurement expected = new Measurement (Convert.ToDouble(8896443221624.56), "nN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Tonnes force(metric) (tonnef,tf)" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonnef_to_N_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "tonnef"; + string targetUnitName = "N"; + Measurement expected = new Measurement (Convert.ToDouble(980665), "N"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonnef_to_N_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "tonnef"; + string targetUnitName = "N"; + Measurement expected = new Measurement (Convert.ToDouble(9806.64999019335), "N"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonnef_to_dyn_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "tonnef"; + string targetUnitName = "dyn"; + Measurement expected = new Measurement (Convert.ToDouble(98066500000.0), "dyn"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonnef_to_dyn_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "tonnef"; + string targetUnitName = "dyn"; + Measurement expected = new Measurement (Convert.ToDouble(980664999.019335), "dyn"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonnef_to_lbf_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "tonnef"; + string targetUnitName = "lbf"; + Measurement expected = new Measurement (Convert.ToDouble(220462.2621852), "lbf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonnef_to_lbf_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "tonnef"; + string targetUnitName = "lbf"; + Measurement expected = new Measurement (Convert.ToDouble(2204.62261964738), "lbf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonnef_to_tonf_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "tonnef"; + string targetUnitName = "tonf"; + Measurement expected = new Measurement (Convert.ToDouble(110.231131092439), "tonf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonnef_to_tonf_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "tonnef"; + string targetUnitName = "tonf"; + Measurement expected = new Measurement (Convert.ToDouble(1.10231130982208), "tonf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonnef_to_Meganewton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "tonnef"; + string targetUnitName = "Meganewton"; + Measurement expected = new Measurement (Convert.ToDouble(0.980665), "Meganewton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonnef_to_Meganewton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "tonnef"; + string targetUnitName = "Meganewton"; + Measurement expected = new Measurement (Convert.ToDouble(0.009806649990193), "Meganewton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonnef_to_GN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "tonnef"; + string targetUnitName = "GN"; + Measurement expected = new Measurement (Convert.ToDouble(0.000980665), "GN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonnef_to_GN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "tonnef"; + string targetUnitName = "GN"; + Measurement expected = new Measurement (Convert.ToDouble(9.80664999E-06), "GN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonnef_to_kN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "tonnef"; + string targetUnitName = "kN"; + Measurement expected = new Measurement (Convert.ToDouble(980.665), "kN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonnef_to_kN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "tonnef"; + string targetUnitName = "kN"; + Measurement expected = new Measurement (Convert.ToDouble(9.80664999019335), "kN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonnef_to_mN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "tonnef"; + string targetUnitName = "mN"; + Measurement expected = new Measurement (Convert.ToDouble(980665000), "mN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonnef_to_mN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "tonnef"; + string targetUnitName = "mN"; + Measurement expected = new Measurement (Convert.ToDouble(9806649.99019335), "mN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonnef_to_µN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "tonnef"; + string targetUnitName = "µN"; + Measurement expected = new Measurement (Convert.ToDouble(980665000000.0), "µN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonnef_to_µN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "tonnef"; + string targetUnitName = "µN"; + Measurement expected = new Measurement (Convert.ToDouble(9806649990.19335), "µN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonnef_to_nN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "tonnef"; + string targetUnitName = "nN"; + Measurement expected = new Measurement (Convert.ToDouble(980665000000000.0), "nN"); + //should be 98066500000000, .net conversion bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_tonnef_to_nN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "tonnef"; + string targetUnitName = "nN"; + Measurement expected = new Measurement (Convert.ToDouble(9806649990193.35), "nN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Meganewton (MN)" + + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Meganewton_to_N_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Meganewton"; + string targetUnitName = "N"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "N"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Meganewton_to_N_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Meganewton"; + string targetUnitName = "N"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "N"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Meganewton_to_dyn_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Meganewton"; + string targetUnitName = "dyn"; + Measurement expected = new Measurement (Convert.ToDouble(10000000000000.0), "dyn"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Meganewton_to_dyn_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Meganewton"; + string targetUnitName = "dyn"; + Measurement expected = new Measurement (Convert.ToDouble(99999999900.0), "dyn"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Meganewton_to_lbf_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Meganewton"; + string targetUnitName = "lbf"; + Measurement expected = new Measurement (Convert.ToDouble(22480894.3099999), "lbf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Meganewton_to_lbf_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Meganewton"; + string targetUnitName = "lbf"; + Measurement expected = new Measurement (Convert.ToDouble(224808.94287519), "lbf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Meganewton_to_tonf_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Meganewton"; + string targetUnitName = "tonf"; + Measurement expected = new Measurement (Convert.ToDouble(11240.4471549855), "tonf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Meganewton_to_tonf_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Meganewton"; + string targetUnitName = "tonf"; + Measurement expected = new Measurement (Convert.ToDouble(112.404471437451), "tonf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Meganewton_to_tonnef_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Meganewton"; + string targetUnitName = "tonnef"; + Measurement expected = new Measurement (Convert.ToDouble(10197.1621297793), "tonnef"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Meganewton_to_tonnef_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Meganewton"; + string targetUnitName = "tonnef"; + Measurement expected = new Measurement (Convert.ToDouble(101.971621195821), "tonnef"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Meganewton_to_GN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Meganewton"; + string targetUnitName = "GN"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "GN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Meganewton_to_GN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Meganewton"; + string targetUnitName = "GN"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "GN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Meganewton_to_kN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Meganewton"; + string targetUnitName = "kN"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "kN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Meganewton_to_kN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Meganewton"; + string targetUnitName = "kN"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "kN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Meganewton_to_mN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Meganewton"; + string targetUnitName = "mN"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "mN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Meganewton_to_mN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Meganewton"; + string targetUnitName = "mN"; + Measurement expected = new Measurement (Convert.ToDouble(999999999.0), "mN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Meganewton_to_µN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Meganewton"; + string targetUnitName = "µN"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000.0), "µN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Meganewton_to_µN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Meganewton"; + string targetUnitName = "µN"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000.0), "µN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Meganewton_to_nN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Meganewton"; + string targetUnitName = "nN"; + Measurement expected = new Measurement (Convert.ToDouble(1E+17), "nN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Meganewton_to_nN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Meganewton"; + string targetUnitName = "nN"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000000.0), "nN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Giganewton (GN)" + + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GN_to_N_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "GN"; + string targetUnitName = "N"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000.0), "N"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GN_to_N_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "GN"; + string targetUnitName = "N"; + Measurement expected = new Measurement (Convert.ToDouble(999999999), "N"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GN_to_dyn_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "GN"; + string targetUnitName = "dyn"; + Measurement expected = new Measurement (Convert.ToDouble(1E+16), "dyn"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GN_to_dyn_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "GN"; + string targetUnitName = "dyn"; + Measurement expected = new Measurement (Convert.ToDouble(99999999900000.0), "dyn"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GN_to_lbf_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "GN"; + string targetUnitName = "lbf"; + Measurement expected = new Measurement (Convert.ToDouble(22480894309.9999), "lbf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GN_to_lbf_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "GN"; + string targetUnitName = "lbf"; + Measurement expected = new Measurement (Convert.ToDouble(224808942.87519), "lbf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GN_to_tonf_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "GN"; + string targetUnitName = "tonf"; + Measurement expected = new Measurement (Convert.ToDouble(11240447.154986), "tonf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GN_to_tonf_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "GN"; + string targetUnitName = "tonf"; + Measurement expected = new Measurement (Convert.ToDouble(112404.471437456), "tonf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GN_to_ng_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "GN"; + string targetUnitName = "tonnef"; + Measurement expected = new Measurement (Convert.ToDouble(10197162.1297793), "tonnef"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GN_to_tonnef_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "GN"; + string targetUnitName = "tonnef"; + Measurement expected = new Measurement (Convert.ToDouble(101971.621195821), "tonnef"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GN_to_Meganewton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "GN"; + string targetUnitName = "Meganewton"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "Meganewton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GN_to_Meganewton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "GN"; + string targetUnitName = "Meganewton"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "Meganewton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GN_to_kN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "GN"; + string targetUnitName = "kN"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "kN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GN_to_kN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "GN"; + string targetUnitName = "kN"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "kN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GN_to_mN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "GN"; + string targetUnitName = "mN"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000.0), "mN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GN_to_mN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "GN"; + string targetUnitName = "mN"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000.0), "mN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GN_to_µN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "GN"; + string targetUnitName = "µN"; + Measurement expected = new Measurement (Convert.ToDouble(1E+17), "µN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GN_to_µN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "GN"; + string targetUnitName = "µN"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000000.0), "µN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GN_to_nN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "GN"; + string targetUnitName = "nN"; + Measurement expected = new Measurement (Convert.ToDouble(1E+20), "nN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GN_to_nN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "GN"; + string targetUnitName = "nN"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E+17), "nN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Kilonewton (kN)" + + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kN_to_N_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kN"; + string targetUnitName = "N"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "N"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kN_to_N_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kN"; + string targetUnitName = "N"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "N"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kN_to_dyn_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kN"; + string targetUnitName = "dyn"; + Measurement expected = new Measurement (Convert.ToDouble(10000000000L), "dyn"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kN_to_dyn_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kN"; + string targetUnitName = "dyn"; + Measurement expected = new Measurement (Convert.ToDouble(99999999.9), "dyn"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kN_to_lbf_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kN"; + string targetUnitName = "lbf"; + Measurement expected = new Measurement (Convert.ToDouble(22480.8943099999), "lbf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kN_to_lbf_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kN"; + string targetUnitName = "lbf"; + Measurement expected = new Measurement (Convert.ToDouble(224.80894287519), "lbf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kN_to_tonf_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kN"; + string targetUnitName = "tonf"; + Measurement expected = new Measurement (Convert.ToDouble(11.2404471549855), "tonf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kN_to_tonf_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kN"; + string targetUnitName = "tonf"; + Measurement expected = new Measurement (Convert.ToDouble(0.112404471437451), "tonf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kN_to_tonnef_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kN"; + string targetUnitName = "tonnef"; + Measurement expected = new Measurement (Convert.ToDouble(10.1971621297793), "tonnef"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kN_to_tonnef_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kN"; + string targetUnitName = "tonnef"; + Measurement expected = new Measurement (Convert.ToDouble(0.101971621195821), "tonnef"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kN_to_Meganewton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kN"; + string targetUnitName = "Meganewton"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "Meganewton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kN_to_Meganewton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kN"; + string targetUnitName = "Meganewton"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "Meganewton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kN_to_GN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kN"; + string targetUnitName = "GN"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "GN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kN_to_GN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kN"; + string targetUnitName = "GN"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "GN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kN_to_mN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kN"; + string targetUnitName = "mN"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "mN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kN_to_mN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kN"; + string targetUnitName = "mN"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "mN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kN_to_µN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kN"; + string targetUnitName = "µN"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000.0), "µN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kN_to_µN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kN"; + string targetUnitName = "µN"; + Measurement expected = new Measurement (Convert.ToDouble(999999999), "µN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kN_to_nN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kN"; + string targetUnitName = "nN"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000.0), "nN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kN_to_nN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kN"; + string targetUnitName = "nN"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000.0), "nN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Milinewton (mN)" + + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mN_to_N_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mN"; + string targetUnitName = "N"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "N"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mN_to_N_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mN"; + string targetUnitName = "N"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "N"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mN_to_dyn_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mN"; + string targetUnitName = "dyn"; + Measurement expected = new Measurement (Convert.ToDouble(10000), "dyn"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mN_to_dyn_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mN"; + string targetUnitName = "dyn"; + Measurement expected = new Measurement (Convert.ToDouble(99.9999999), "dyn"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mN_to_lbf_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mN"; + string targetUnitName = "lbf"; + Measurement expected = new Measurement (Convert.ToDouble(0.02248089431), "lbf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mN_to_lbf_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mN"; + string targetUnitName = "lbf"; + Measurement expected = new Measurement (Convert.ToDouble(0.000224808942875), "lbf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mN_to_tonf_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mN"; + string targetUnitName = "tonf"; + Measurement expected = new Measurement (Convert.ToDouble(1.1240447155E-05), "tonf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mN_to_tonf_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mN"; + string targetUnitName = "tonf"; + Measurement expected = new Measurement (Convert.ToDouble(1.12404471E-07), "tonf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mN_to_tonnef_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mN"; + string targetUnitName = "tonnef"; + Measurement expected = new Measurement (Convert.ToDouble(1.019716213E-05), "tonnef"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mN_to_tonnef_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mN"; + string targetUnitName = "tonnef"; + Measurement expected = new Measurement (Convert.ToDouble(1.01971621E-07), "tonnef"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mN_to_Meganewton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mN"; + string targetUnitName = "Meganewton"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "Meganewton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mN_to_Meganewton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mN"; + string targetUnitName = "Meganewton"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "Meganewton"); + //should be 0.000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mN_to_GN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mN"; + string targetUnitName = "GN"; + Measurement expected = new Measurement (Convert.ToDouble(1E-10), "GN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mN_to_GN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mN"; + string targetUnitName = "GN"; + Measurement expected = new Measurement (Convert.ToDouble(1E-12), "GN"); + //should be 0.000000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mN_to_kN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mN"; + string targetUnitName = "kN"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "kN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mN_to_kN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mN"; + string targetUnitName = "kN"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "kN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mN_to_µN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mN"; + string targetUnitName = "µN"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "µN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mN_to_µN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mN"; + string targetUnitName = "µN"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "µN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mN_to_nN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mN"; + string targetUnitName = "nN"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "nN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mN_to_nN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mN"; + string targetUnitName = "nN"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "nN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Micronewton (µN)" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µN_to_N_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µN"; + string targetUnitName = "N"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "N"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µN_to_N_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µN"; + string targetUnitName = "N"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "N"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µN_to_dyn_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µN"; + string targetUnitName = "dyn"; + Measurement expected = new Measurement (Convert.ToDouble(10), "dyn"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µN_to_dyn_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µN"; + string targetUnitName = "dyn"; + Measurement expected = new Measurement (Convert.ToDouble(0.0999999999), "dyn"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µN_to_lbf_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µN"; + string targetUnitName = "lbf"; + Measurement expected = new Measurement (Convert.ToDouble(2.248089431E-05), "lbf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µN_to_lbf_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µN"; + string targetUnitName = "lbf"; + Measurement expected = new Measurement (Convert.ToDouble(2.24808943E-07), "lbf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µN_to_tonf_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µN"; + string targetUnitName = "tonf"; + Measurement expected = new Measurement (Convert.ToDouble(1.1240447E-08), "tonf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µN_to_tonf_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µN"; + string targetUnitName = "tonf"; + Measurement expected = new Measurement (Convert.ToDouble(1.12404E-10), "tonf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µN_to_tonnef_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µN"; + string targetUnitName = "tonnef"; + Measurement expected = new Measurement (Convert.ToDouble(1.0197162E-08), "tonnef"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µN_to_tonnef_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µN"; + string targetUnitName = "tonnef"; + Measurement expected = new Measurement (Convert.ToDouble(1.01972E-10), "tonnef"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µN_to_Meganewton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µN"; + string targetUnitName = "Meganewton"; + Measurement expected = new Measurement (Convert.ToDouble(1E-10), "Meganewton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µN_to_Meganewton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µN"; + string targetUnitName = "Meganewton"; + Measurement expected = new Measurement (Convert.ToDouble(1E-12), "Meganewton"); + //should be 0.000000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µN_to_GN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µN"; + string targetUnitName = "GN"; + Measurement expected = new Measurement (Convert.ToDouble(1E-13), "GN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µN_to_GN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µN"; + string targetUnitName = "GN"; + Measurement expected = new Measurement (Convert.ToDouble(1E-15), "GN"); + //should be 0.000000000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µN_to_kN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µN"; + string targetUnitName = "kN"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "kN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µN_to_kN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µN"; + string targetUnitName = "kN"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "kN"); + //should be 0.000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µN_to_mN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µN"; + string targetUnitName = "mN"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "mN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µN_to_mN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µN"; + string targetUnitName = "mN"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "mN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µN_to_nN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µN"; + string targetUnitName = "nN"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "nN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µN_to_nN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µN"; + string targetUnitName = "nN"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "nN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Nananewton (nN)" + + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nN_to_N_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nN"; + string targetUnitName = "N"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "N"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nN_to_N_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nN"; + string targetUnitName = "N"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "N"); + //should be 0.000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nN_to_dyn_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nN"; + string targetUnitName = "dyn"; + Measurement expected = new Measurement (Convert.ToDouble(0.01), "dyn"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nN_to_dyn_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nN"; + string targetUnitName = "dyn"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-05), "dyn"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nN_to_lbf_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nN"; + string targetUnitName = "lbf"; + Measurement expected = new Measurement (Convert.ToDouble(2.2480894E-08), "lbf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nN_to_lbf_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nN"; + string targetUnitName = "lbf"; + Measurement expected = new Measurement (Convert.ToDouble(2.24809E-10), "lbf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nN_to_tonf_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nN"; + string targetUnitName = "tonf"; + Measurement expected = new Measurement (Convert.ToDouble(1.124E-11), "tonf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nN_to_tonf_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nN"; + string targetUnitName = "tonf"; + Measurement expected = new Measurement (Convert.ToDouble(1.12E-13), "tonf"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nN_to_tonnef_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nN"; + string targetUnitName = "tonnef"; + Measurement expected = new Measurement (Convert.ToDouble(1.0197E-11), "tonnef"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nN_to_tonnef_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nN"; + string targetUnitName = "tonnef"; + Measurement expected = new Measurement (Convert.ToDouble(1.02E-13), "tonnef"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nN_to_Meganewton_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nN"; + string targetUnitName = "Meganewton"; + Measurement expected = new Measurement (Convert.ToDouble(1E-13), "Meganewton"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nN_to_Meganewton_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nN"; + string targetUnitName = "Meganewton"; + Measurement expected = new Measurement (Convert.ToDouble(1E-15), "Meganewton"); + //should be 0.000000000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nN_to_GN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nN"; + string targetUnitName = "GN"; + Measurement expected = new Measurement (Convert.ToDouble(0), "GN"); + //should be .0000000000000001, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nN_to_GN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nN"; + string targetUnitName = "GN"; + Measurement expected = new Measurement (Convert.ToDouble(0), "GN"); + //should be 9.99999999E-19, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nN_to_kN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nN"; + string targetUnitName = "kN"; + Measurement expected = new Measurement (Convert.ToDouble(1E-10), "kN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nN_to_kN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nN"; + string targetUnitName = "kN"; + Measurement expected = new Measurement (Convert.ToDouble(1E-12), "kN"); + //should be 0.000000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nN_to_mN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nN"; + string targetUnitName = "mN"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "mN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nN_to_mN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nN"; + string targetUnitName = "mN"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "mN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nN_to_µN_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nN"; + string targetUnitName = "µN"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "µN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nN_to_µN_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nN"; + string targetUnitName = "µN"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "µN"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + #endregion + + #region "Momentum Tests" + #region "Source as kg m/s" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kgMetersPerSec_to_lbFtPerHr_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kg m/s"; + string targetUnitName = "lb ft/hr"; + Measurement expected = new Measurement (Convert.ToDouble(2603884.98643556), "lb ft/hr"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kgMetersPerSec_to_lbFtPerHr_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kg m/s"; + string targetUnitName = "lb ft/hr"; + Measurement expected = new Measurement (Convert.ToDouble(26038.8498383168), "lb ft/hr"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kgMeterPerSec_to_GramCentimeterPerSec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kg m/s"; + string targetUnitName = "g cm/s"; + Measurement expected = new Measurement (Convert.ToDouble(10000000), "g cm/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kgMeterPerSec_to_GramCentimeterPerSec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kg m/s"; + string targetUnitName = "g cm/s"; + Measurement expected = new Measurement (Convert.ToDouble(99999.9999), "g cm/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kgMeterPerSec_to_lbFtPerMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kg m/s"; + string targetUnitName = "lb ft/min"; + Measurement expected = new Measurement (Convert.ToDouble(43398.0831072594), "lb ft/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kgMeterPerSec_to_lbFtPerMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kg m/s"; + string targetUnitName = "lb ft/min"; + Measurement expected = new Measurement (Convert.ToDouble(433.980830638613), "lb ft/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kgMeterPerSec_to_lbFtPerSec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kg m/s"; + string targetUnitName = "lb ft/s"; + Measurement expected = new Measurement (Convert.ToDouble(723.301385120989), "lb ft/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kgMeterPerSec_to_lbFtPerSec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kg m/s"; + string targetUnitName = "lb ft/s"; + Measurement expected = new Measurement (Convert.ToDouble(7.23301384397688), "lb ft/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as lb ft/hr" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerHr_to_kgMetersPerSec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb ft/hr"; + string targetUnitName = "kg m/s"; + Measurement expected = new Measurement (Convert.ToDouble(0.003840415399333), "kg m/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerHr_to_kgMetersPerSec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb ft/hr"; + string targetUnitName = "kg m/s"; + Measurement expected = new Measurement (Convert.ToDouble(3.8404153955E-05), "kg m/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerHr_to_GramCentimeterPerSec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb ft/hr"; + string targetUnitName = "g cm/s"; + Measurement expected = new Measurement (Convert.ToDouble(384.041539933333), "g cm/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerHr_to_GramCentimeterPerSec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb ft/hr"; + string targetUnitName = "g cm/s"; + Measurement expected = new Measurement (Convert.ToDouble(3.84041539549292), "g cm/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerHr_to_lbFtPerMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb ft/hr"; + string targetUnitName = "lb ft/min"; + Measurement expected = new Measurement (Convert.ToDouble(1.66666666666667), "lb ft/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerHr_to_lbFtPerMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb ft/hr"; + string targetUnitName = "lb ft/min"; + Measurement expected = new Measurement (Convert.ToDouble(0.01666666665), "lb ft/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerHr_to_lbFtPerSec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb ft/hr"; + string targetUnitName = "lb ft/s"; + Measurement expected = new Measurement (Convert.ToDouble(0.027777777777778), "lb ft/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerHr_to_lbFtPerSec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb ft/hr"; + string targetUnitName = "lb ft/s"; + Measurement expected = new Measurement (Convert.ToDouble(0.0002777777775), "lb ft/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as g cm/s" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_kgMetersPerSec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "g cm/s"; + string targetUnitName = "kg m/s"; + Measurement expected = new Measurement (Convert.ToDouble(0.001), "kg m/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_kgMetersPerSec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "g cm/s"; + string targetUnitName = "kg m/s"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-06), "kg m/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerHr_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "g cm/s"; + string targetUnitName = "lb ft/hr"; + Measurement expected = new Measurement (Convert.ToDouble(26.0388498643556), "lb ft/hr"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerHr_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "g cm/s"; + string targetUnitName = "lb ft/hr"; + Measurement expected = new Measurement (Convert.ToDouble(0.260388498383168), "lb ft/hr"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "g cm/s"; + string targetUnitName = "lb ft/min"; + Measurement expected = new Measurement (Convert.ToDouble(0.4339808310726), "lb ft/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "g cm/s"; + string targetUnitName = "lb ft/min"; + Measurement expected = new Measurement (Convert.ToDouble(0.004339808306386), "lb ft/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerSec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "g cm/s"; + string targetUnitName = "lb ft/s"; + Measurement expected = new Measurement (Convert.ToDouble(0.0072330138512), "lb ft/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerSec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "g cm/s"; + string targetUnitName = "lb ft/s"; + Measurement expected = new Measurement (Convert.ToDouble(7.233013844E-05), "lb ft/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as lb ft/min" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerMin_to_kgMetersPerSec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb ft/min"; + string targetUnitName = "kg m/s"; + Measurement expected = new Measurement (Convert.ToDouble(0.23042492396), "kg m/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerMin_to_kgMetersPerSec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb ft/min"; + string targetUnitName = "kg m/s"; + Measurement expected = new Measurement (Convert.ToDouble(0.002304249237296), "kg m/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerMin_to_lbFtPerHr_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb ft/min"; + string targetUnitName = "lb ft/hr"; + Measurement expected = new Measurement (Convert.ToDouble(6000), "lb ft/hr"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerMin_to_lbFtPerHr_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb ft/min"; + string targetUnitName = "lb ft/hr"; + Measurement expected = new Measurement (Convert.ToDouble(59.99999994), "lb ft/hr"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerMin_to_GramCentimeterPerSec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb ft/min"; + string targetUnitName = "g cm/s"; + Measurement expected = new Measurement (Convert.ToDouble(23042.4923959997), "g cm/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerMin_to_GramCentimeterPerSec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb ft/min"; + string targetUnitName = "g cm/s"; + Measurement expected = new Measurement (Convert.ToDouble(230.424923729572), "g cm/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerMin_to_lbFtPerSec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb ft/min"; + string targetUnitName = "lb ft/s"; + Measurement expected = new Measurement (Convert.ToDouble(1.66666666666667), "lb ft/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerMin_to_lbFtPerSec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb ft/min"; + string targetUnitName = "lb ft/s"; + Measurement expected = new Measurement (Convert.ToDouble(0.01666666665), "lb ft/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as lb ft/sec" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerSec_to_kgMetersPerSec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb ft/s"; + string targetUnitName = "kg m/s"; + Measurement expected = new Measurement (Convert.ToDouble(13.8254954376), "kg m/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerSec_to_kgMetersPerSec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb ft/s"; + string targetUnitName = "kg m/s"; + Measurement expected = new Measurement (Convert.ToDouble(0.138254954237745), "kg m/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerSec_to_lbFtPerHr_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb ft/s"; + string targetUnitName = "lb ft/hr"; + Measurement expected = new Measurement (Convert.ToDouble(360000), "lb ft/hr"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerSec_to_lbFtPerHr_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb ft/s"; + string targetUnitName = "lb ft/hr"; + Measurement expected = new Measurement (Convert.ToDouble(3599.9999964), "lb ft/hr"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerSec_to_GramCentimeterPerSec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb ft/s"; + string targetUnitName = "g cm/s"; + Measurement expected = new Measurement (Convert.ToDouble(1382549.54376189), "g cm/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerSec_to_GramCentimeterPerSec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb ft/s"; + string targetUnitName = "g cm/s"; + Measurement expected = new Measurement (Convert.ToDouble(13825.4954237934), "g cm/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerSec_to_lbFtPerMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "lb ft/s"; + string targetUnitName = "lb ft/min"; + Measurement expected = new Measurement (Convert.ToDouble(6000), "lb ft/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_lbFtPerSec_to_lbFtPerMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "lb ft/s"; + string targetUnitName = "lb ft/min"; + Measurement expected = new Measurement (Convert.ToDouble(59.99999994), "lb ft/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + #endregion + + #region "Speed Tests" + #region "Source as Meters/Second" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MetersPerSec_to_KmPerHr_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m/s"; + string targetUnitName = "km/h"; + Measurement expected = new Measurement (Convert.ToDouble(360), "km/h"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MetersPerSec_to_KmPerHr_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m/s"; + string targetUnitName = "km/h"; + Measurement expected = new Measurement (Convert.ToDouble(3.5999999964), "km/h"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MetersPerSec_to_MilesPerHr_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m/s"; + string targetUnitName = "mph"; + Measurement expected = new Measurement (Convert.ToDouble(223.69362920544), "mph"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MetersPerSec_to_MilesPerHr_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m/s"; + string targetUnitName = "mph"; + Measurement expected = new Measurement (Convert.ToDouble(2.23693628981747), "mph"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MetersPerSec_to_MetersPerMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m/s"; + string targetUnitName = "m/min"; + Measurement expected = new Measurement (Convert.ToDouble(6000), "m/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MetersPerSec_to_MetersPerMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m/s"; + string targetUnitName = "m/min"; + Measurement expected = new Measurement (Convert.ToDouble(59.99999994), "m/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MetersPerSec_to_FtPerSec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m/s"; + string targetUnitName = "ft/s"; + Measurement expected = new Measurement (Convert.ToDouble(328.083989501312), "ft/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MetersPerSec_to_FtPerSec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m/s"; + string targetUnitName = "ft/s"; + Measurement expected = new Measurement (Convert.ToDouble(3.28083989173228), "ft/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Kilometers/Hour" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_KmPerHr_to_MetersPerSec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km/h"; + string targetUnitName = "m/s"; + Measurement expected = new Measurement (Convert.ToDouble(27.7777777777778), "m/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_KmPerHr_to_MetersPerSec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km/h"; + string targetUnitName = "m/s"; + Measurement expected = new Measurement (Convert.ToDouble(0.2777777775), "m/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_KmPerHr_to_MilesPerHr_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km/h"; + string targetUnitName = "mph"; + Measurement expected = new Measurement (Convert.ToDouble(62.1371192237334), "mph"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_KmPerHr_to_MilesPerHr_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km/h"; + string targetUnitName = "mph"; + Measurement expected = new Measurement (Convert.ToDouble(0.621371191615963), "mph"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_KmPerHr_to_MetersPerMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km/h"; + string targetUnitName = "m/min"; + Measurement expected = new Measurement (Convert.ToDouble(1666.66666666667), "m/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_KmPerHr_to_MetersPerMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km/h"; + string targetUnitName = "m/min"; + Measurement expected = new Measurement (Convert.ToDouble(16.66666665), "m/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_KmPerHr_to_FtPerSec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km/h"; + string targetUnitName = "ft/s"; + Measurement expected = new Measurement (Convert.ToDouble(91.1344415281423), "ft/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_KmPerHr_to_FtPerSec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km/h"; + string targetUnitName = "ft/s"; + Measurement expected = new Measurement (Convert.ToDouble(0.911344414370079), "ft/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Miles/Hour" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MilesPerHr_to_MetersPerSec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mph"; + string targetUnitName = "m/s"; + Measurement expected = new Measurement (Convert.ToDouble(44.704), "m/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MilesPerHr_to_MetersPerSec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mph"; + string targetUnitName = "m/s"; + Measurement expected = new Measurement (Convert.ToDouble(0.44703999955296), "m/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MilesPerHr_to_KmPerHr_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mph"; + string targetUnitName = "km/h"; + Measurement expected = new Measurement (Convert.ToDouble(160.9344), "km/h"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MilesPerHr_to_KmPerHr_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mph"; + string targetUnitName = "km/h"; + Measurement expected = new Measurement (Convert.ToDouble(1.60934399839066), "km/h"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MilesPerHr_to_MetersPerMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mph"; + string targetUnitName = "m/min"; + Measurement expected = new Measurement (Convert.ToDouble(2682.24), "m/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MilesPerHr_to_MetersPerMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mph"; + string targetUnitName = "m/min"; + Measurement expected = new Measurement (Convert.ToDouble(26.8223999731776), "m/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MilesPerHr_to_FtPerSec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mph"; + string targetUnitName = "ft/s"; + Measurement expected = new Measurement (Convert.ToDouble(146.666666666667), "ft/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MilesPerHr_to_FtPerSec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mph"; + string targetUnitName = "ft/s"; + Measurement expected = new Measurement (Convert.ToDouble(1.4666666652), "ft/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Meters/Minute" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MetersPerMin_to_MetersPerSec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m/min"; + string targetUnitName = "m/s"; + Measurement expected = new Measurement (Convert.ToDouble(1.66666666666667), "m/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MetersPerMin_to_MetersPerSec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m/min"; + string targetUnitName = "m/s"; + Measurement expected = new Measurement (Convert.ToDouble(0.01666666665), "m/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MetersPerMin_to_KmPerHr_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m/min"; + string targetUnitName = "km/h"; + Measurement expected = new Measurement (Convert.ToDouble(6), "km/h"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MetersPerMin_to_KmPerHr_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m/min"; + string targetUnitName = "km/h"; + Measurement expected = new Measurement (Convert.ToDouble(0.05999999994), "km/h"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MetersPerMin_to_MilesPerHr_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m/min"; + string targetUnitName = "mph"; + Measurement expected = new Measurement (Convert.ToDouble(3.728227153424), "mph"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MetersPerMin_to_MilesPerHr_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m/min"; + string targetUnitName = "mph"; + Measurement expected = new Measurement (Convert.ToDouble(0.037282271496958), "mph"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MetersPerMin_to_FtPerSec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m/min"; + string targetUnitName = "ft/s"; + Measurement expected = new Measurement (Convert.ToDouble(5.46806649168854), "ft/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_MetersPerMin_to_FtPerSec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m/min"; + string targetUnitName = "ft/s"; + Measurement expected = new Measurement (Convert.ToDouble(0.054680664862205), "ft/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Feet/Second" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtPerSec_to_MetersPerSec_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft/s"; + string targetUnitName = "m/s"; + Measurement expected = new Measurement (Convert.ToDouble(30.48), "m/s"); + //should be 30.48, .net conversion bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtPerSec_to_MetersPerSec_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft/s"; + string targetUnitName = "m/s"; + Measurement expected = new Measurement (Convert.ToDouble(0.3047999996952), "m/s"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtPerSec_to_KmPerHr_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft/s"; + string targetUnitName = "km/h"; + Measurement expected = new Measurement (Convert.ToDouble(109.728), "km/h"); + //should be 109.728, .net conversion bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtPerSec_to_KmPerHr_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft/s"; + string targetUnitName = "km/h"; + Measurement expected = new Measurement (Convert.ToDouble(1.09727999890272), "km/h"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtPerSec_to_MilesPerHr_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft/s"; + string targetUnitName = "mph"; + Measurement expected = new Measurement (Convert.ToDouble(68.1818181818182), "mph"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtPerSec_to_MilesPerHr_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft/s"; + string targetUnitName = "mph"; + Measurement expected = new Measurement (Convert.ToDouble(0.681818181136364), "mph"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtPerSec_to_MetersPerMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft/s"; + string targetUnitName = "m/min"; + Measurement expected = new Measurement (Convert.ToDouble(1828.8), "m/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtPerSec_to_MetersPerMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft/s"; + string targetUnitName = "m/min"; + Measurement expected = new Measurement (Convert.ToDouble(18.287999981712), "m/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + #endregion + + #region "Length Tests" + #region "Source as Metres" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_yd_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(109.361329833771), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_yd_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(1.0936132972441), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_ft_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(328.083989501312), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + Assert.AreEqual (Result.NoError, actual.ConversionResult); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_ft_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(3.28083989173228), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_chain_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(4.97096953789867), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_chain_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(0.049709695329277), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_mile_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(0.062137119223733), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_mile_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(0.000621371191616), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_km_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_km_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_Megametres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_Megametres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_Gm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_Gm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_furlong_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(0.497096953789867), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_furlong_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(0.004970969532928), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_thou_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(3937007.87401575), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_thou_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(39370.0787007874), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_µm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_µm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_in_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(3937.00787401575), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_in_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(39.3700787007874), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_cm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(10000), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_cm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(99.9999999), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_millimetres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m_to_millimetres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Yards" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_m_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(91.44), "m"); + //expected altered to meet .net conversion bug (91.44 m) + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_m_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(0.9143999990856), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_ft_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(300), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_ft_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(2.999999997), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_chain_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(4.54545454545455), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_chain_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(0.045454545409091), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_mile_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(0.056818181818182), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_mile_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(0.000568181817614), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_km_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(0.09144), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_km_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(0.000914399999086), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_Megametres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(9.144E-05), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_Megametres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(9.14399999E-07), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_Gm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(9.144E-08), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_Gm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(9.144E-10), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_furlong_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(0.454545454545454), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_furlong_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(0.004545454540909), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_thou_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(3600000), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_thou_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(35999.999964), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_µm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(91440000), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_µm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(914399.9990856), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_in_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(3600), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_in_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(35.999999964), "in"); + //expected altered to meet .net conversion bug (35.999999964) + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_cm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(9144), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_cm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(91.43999990856), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_millimetres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(91440), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd_to_millimetres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(914.3999990856), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Feet" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_m_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(30.48), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_m_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(0.3047999996952), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_m_negative_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (-0.999999999); + string currentUnitName = "ft"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(-0.3047999996952), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_yd_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(33.3333333333333), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_yd_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(0.333333333), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_chain_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(1.51515151515151), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_chain_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(0.015151515136364), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_mile_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(0.018939393939394), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_mile_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(0.000189393939205), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_km_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(0.03048), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_km_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(0.000304799999695), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_Megametres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(3.048E-05), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_Megametres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(3.048E-07), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_Gm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(3.048E-08), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_Gm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(3.048E-10), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_furlong_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(0.151515151515152), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_furlong_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(0.001515151513636), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_thou_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(1200000), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_thou_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(11999.999988), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_µm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(30480000), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_µm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(304799.9996952), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_in_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(1200), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_in_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(11.999999988), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_cm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(3048), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_cm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(30.47999996952), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_millimetres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(30480), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft_to_millimetres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(304.7999996952), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Chain" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_m_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "chain"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(2011.68), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_m_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "chain"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(20.1167999798832), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_yd_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "chain"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(2200), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_yd_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "chain"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(21.999999978), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_ft_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "chain"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(6600), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_ft_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "chain"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(65.999999934), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_mile_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "chain"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(1.25), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_mile_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "chain"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(0.0124999999875), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_km_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "chain"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(2.01168), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_km_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "chain"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(0.020116799979883), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_Megametres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "chain"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(0.00201168), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_Megametres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "chain"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(2.011679998E-05), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_Gm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "chain"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(2.01168E-06), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_Gm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "chain"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(2.01168E-08), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_furlong_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "chain"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(10), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_furlong_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "chain"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(0.0999999999), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_thou_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "chain"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(79200000), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_thou_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "chain"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(791999.999208), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_µm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "chain"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(2011680000), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_µm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "chain"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(20116799.979883), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_in_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "chain"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(79200), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_in_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "chain"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(791.999999208), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_cm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "chain"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(201168), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_cm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "chain"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(2011.67999798832), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_millimetres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "chain"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(2011680), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_chain_to_millimetres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "chain"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(20116.7999798832), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Miles" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_m_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(160934.4), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_m_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(1609.34399839066), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_yd_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(176000), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_yd_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(1759.99999824), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_ft_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(528000), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_ft_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(5279.99999472), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_chain_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(8000), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_chain_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(79.99999992), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_km_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(160.9344), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_km_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(1.60934399839066), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_Megametres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(0.1609344), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_Megametres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(0.001609343998391), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_Gm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001609344), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_Gm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(1.609343998E-06), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_furlong_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(800), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_furlong_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(7.999999992), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_thou_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(6336000000L), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_thou_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(63359999.93664), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_µm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(160934400000L), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_µm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(1609343998.391), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_in_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(6336000), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_in_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(63359.99993664), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_cm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(16093440), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_cm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(160934.399839066), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_millimetres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(160934400), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_miles_to_millimetres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(1609343.998391), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Kilometres" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_m_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_m_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_yd_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(109361.329833771), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_yd_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(1093.61329724409), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_ft_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(328083.989501312), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_ft_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(3280.83989173228), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_chain_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(4970.96953789867), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_chain_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(49.709695329277), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_miles_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(62.1371192237334), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_miles_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(0.621371191615963), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_Megametres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_Megametres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_Gm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_Gm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_furlong_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(497.096953789867), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_furlong_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(4.9709695329277), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_thou_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(3937007874.01575), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_thou_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(39370078.7007874), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_µm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_µm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(999999999), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_in_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(3937007.87401575), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_in_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(39370.0787007874), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_cm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(10000000), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_cm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(99999.9999), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_millimetres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km_to_millimetres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Megametres" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_m_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mm"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_m_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mm"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_yd_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mm"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(109361329.833771), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_yd_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mm"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(1093613.29724409), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_ft_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mm"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(328083989.501312), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_ft_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mm"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(3280839.89173228), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_chain_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mm"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(4970969.53789867), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_chain_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mm"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(49709.695329277), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_miles_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mm"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(62137.1192237334), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_miles_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mm"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(621.371191615963), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_km_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mm"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_km_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mm"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_Gm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mm"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_Gm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mm"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_furlong_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mm"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(497096.953789867), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_furlong_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mm"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(4970.9695329277), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_thou_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mm"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(3937007874015.75), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_thou_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mm"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(39370078700.7874), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_µm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mm"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000L), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_µm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mm"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000L), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_in_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mm"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(3937007874.01575), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_in_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mm"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(39370078.7007874), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_cm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mm"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(10000000000L), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_cm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mm"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(99999999.9), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_millimetres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Mm"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megametres_to_millimetres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Mm"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(999999999), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Gigametres" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_m_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gm"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_m_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gm"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(999999999), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_yd_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gm"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(109361329833.771), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_yd_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gm"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(1093613297.24409), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_ft_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gm"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(328083989501.312), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_ft_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gm"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(3280839891.73228), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_chain_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gm"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(4970969537.89867), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_chain_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gm"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(49709695.329277), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_miles_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gm"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(62137119.2237334), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_miles_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gm"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(621371.191615963), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_km_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gm"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gms_to_km_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gm"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_Megametres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gm"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_Megametres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gm"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_furlong_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gm"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(497096953.789867), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_furlong_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gm"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(4970969.5329277), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_thou_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gm"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(3937007874015748L), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_thou_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gm"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(39370078700787.4), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_µm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gm"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000000L), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_µm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gm"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000000L), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_in_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gm"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(3937007874015.75), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_in_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gm"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(39370078700.7874), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_cm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gm"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(10000000000000L), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_cm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gm"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(99999999900L), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_millimetres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gm"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000L), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gm_to_millimetres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gm"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000L), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Furlongs" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_m_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "furlong"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(20116.8), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_m_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "furlong"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(201.167999798832), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_yd_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "furlong"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(22000), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_yd_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "furlong"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(219.99999978), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_ft_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "furlong"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(66000), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_ft_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "furlong"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(659.99999934), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_mile_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "furlong"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(12.5), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_mile_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "furlong"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(0.124999999875), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_km_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "furlong"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(20.1168), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_km_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "furlong"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(0.201167999798832), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_Megametres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "furlong"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(0.0201168), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_Megametres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "furlong"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(0.000201167999799), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_Gm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "furlong"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(2.01168E-05), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_Gm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "furlong"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(2.01168E-07), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_chain_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "furlong"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(1000), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_chain_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "furlong"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_thou_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "furlong"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(792000000), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_thou_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "furlong"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(7919999.99208), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_µm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "furlong"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(20116800000L), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_µm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "furlong"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(201167999.799), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_in_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "furlong"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(792000), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_in_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "furlong"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(7919.99999208), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_cm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "furlong"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(2011680), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_cm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "furlong"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(20116.7999798832), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_millimetres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "furlong"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(20116800), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_furlong_to_millimetres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "furlong"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(201167.999799), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Thou" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_m_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "thou"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(0.00254), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_m_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "thou"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(2.5399999975E-05), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_yd_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "thou"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(0.002777777777778), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_yd_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "thou"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(2.777777775E-05), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_ft_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "thou"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(0.008333333333333), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_ft_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "thou"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(8.333333325E-05), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_mile_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "thou"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(1.578282828E-06), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_mile_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "thou"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(1.5782828E-08), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_km_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "thou"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(2.54E-06), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_km_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "thou"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(2.54E-08), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_Megametres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "thou"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(2.54E-09), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_Megametres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "thou"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(2.54E-11), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_Gm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "thou"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(2.54E-12), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_Gm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "thou"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(2.5E-14), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_chain_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "thou"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(0.000126262626263), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_chain_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "thou"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(1.262626261E-06), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_in_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "thou"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_in_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "thou"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_µm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "thou"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(2540), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_µm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "thou"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(25.3999999746), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_furlong_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "thou"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(1.2626262626E-05), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_furlong_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "thou"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(1.26262626E-07), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_cm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "thou"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(0.254), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_cm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "thou"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(0.00253999999746), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_millimetres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "thou"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(2.54), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_thou_to_millimetres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "thou"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(0.0253999999746), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Microns" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_m_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µm"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_m_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µm"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_yd_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µm"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(0.000109361329834), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_yd_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µm"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(1.093613297E-06), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_ft_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µm"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(0.000328083989501), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + Assert.AreEqual (Result.NoError, actual.ConversionResult); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_ft_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µm"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(3.280839892E-06), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_chain_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µm"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(4.970969538E-06), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_chain_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µm"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(4.9709695E-08), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_mile_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µm"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(6.2137119E-08), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_mile_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µm"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(6.21371E-10), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_km_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µm"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_km_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µm"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_Megametres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µm"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(1E-10), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_Megametres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µm"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(1E-12), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_Gm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µm"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(1E-13), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_Gm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µm"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(1E-15), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_furlong_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µm"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(4.97096954E-07), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_furlong_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µm"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(4.97097E-09), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_thou_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µm"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(3.93700787401575), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_thou_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µm"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(0.039370078700787), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_in_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µm"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(0.003937007874016), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_in_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µm"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(3.9370078701E-05), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_cm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µm"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(0.01), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_cm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µm"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-05), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_millimetres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µm"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µm_to_millimetres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µm"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Inches" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_m_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(2.54), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_m_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(0.0253999999746), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_yd_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(2.77777777777778), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_yd_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(0.02777777775), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_ft_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(8.33333333333333), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_ft_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(0.08333333325), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_mile_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(0.001578282828283), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_mile_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(1.5782828267E-05), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_km_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(0.00254), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_km_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(2.5399999975E-05), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_Megametres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(2.54E-06), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_Megametres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(2.54E-08), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_Gm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(2.54E-09), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_Gm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(2.54E-11), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_chain_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(0.126262626262626), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_chain_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(0.001262626261364), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_thou_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_thou_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_µm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(2540000), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_µm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(25399.9999746), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_furlong_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(0.012626262626263), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_furlong_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(0.000126262626136), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_cm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(254), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_cm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(2.53999999746), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_millimetres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(2540), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in_to_millimetres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(25.3999999746), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Centimetres" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_m_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(1), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_m_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(0.00999999999), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_yd_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(1.09361329833771), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_yd_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(0.010936132972441), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_ft_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(3.280839895013123), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + Assert.AreEqual (Result.NoError, actual.ConversionResult); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_ft_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(0.032808398917323), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_chain_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(0.049709695378987), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_chain_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(0.000497096953293), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_mile_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(0.000621371192237), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_mile_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(6.213711916E-06), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_km_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(0.001), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_km_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-06), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_Megametres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(1E-06), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_Megametres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(1E-08), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_Gm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_Gm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(1E-11), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_furlong_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(0.004970969537899), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_furlong_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(4.9709695329E-05), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_thou_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(39370.0787401575), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_thou_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(393.700787007874), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_µm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(1000000), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_µm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(9999.99999), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_in_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(39.3700787401575), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_in_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(0.393700787007874), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_millimetres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(1000), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm_to_millimetres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm"; + string targetUnitName = "mm"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999), "mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Millimetres" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_m_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mm"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_m_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mm"; + string targetUnitName = "m"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "m"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_yd_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mm"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(0.109361329833771), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_yd_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mm"; + string targetUnitName = "yd"; + Measurement expected = new Measurement (Convert.ToDouble(0.001093613297244), "yd"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_ft_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mm"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(0.328083989501312), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + Assert.AreEqual (Result.NoError, actual.ConversionResult); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_ft_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mm"; + string targetUnitName = "ft"; + Measurement expected = new Measurement (Convert.ToDouble(0.003280839891732), "ft"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_chain_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mm"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(0.004970969537899), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_chain_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mm"; + string targetUnitName = "chain"; + Measurement expected = new Measurement (Convert.ToDouble(4.9709695329E-05), "chain"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_mile_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mm"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(6.2137119224E-05), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_mile_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mm"; + string targetUnitName = "mi"; + Measurement expected = new Measurement (Convert.ToDouble(6.21371192E-07), "mi"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_km_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mm"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_km_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mm"; + string targetUnitName = "km"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "km"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_Megametres_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mm"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_Megametres_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mm"; + string targetUnitName = "Mm"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "Mm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_Gm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mm"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(1E-10), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_Gm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mm"; + string targetUnitName = "Gm"; + Measurement expected = new Measurement (Convert.ToDouble(1E-12), "Gm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_furlong_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mm"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(0.00049709695379), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_furlong_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mm"; + string targetUnitName = "furlong"; + Measurement expected = new Measurement (Convert.ToDouble(4.970969533E-06), "furlong"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_thou_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mm"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(3937.00787401575), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_thou_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mm"; + string targetUnitName = "thou"; + Measurement expected = new Measurement (Convert.ToDouble(39.3700787007874), "thou"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_µm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mm"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_µm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mm"; + string targetUnitName = "µm"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "µm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_in_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mm"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(3.93700787401575), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_in_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mm"; + string targetUnitName = "in"; + Measurement expected = new Measurement (Convert.ToDouble(0.039370078700787), "in"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_cm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mm"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(10), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_millimetres_to_cm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mm"; + string targetUnitName = "cm"; + Measurement expected = new Measurement (Convert.ToDouble(0.0999999999), "cm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + #endregion + #endregion + } +} diff --git a/Cubico.Tests/UnitConverterTest3.cs b/Cubico.Tests/UnitConverterTest3.cs new file mode 100644 index 0000000..e645184 --- /dev/null +++ b/Cubico.Tests/UnitConverterTest3.cs @@ -0,0 +1,8699 @@ +using System; +using NUnit.Framework; +using Cubico; + +namespace Cubico.Test +{ + [TestClass()] + public class UnitConverterTest3 + { + private TestContext testContextInstance; + private UnitProvider unitPro = new UnitProvider (); + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext { + get { return testContextInstance; } + set { testContextInstance = value; } + } + #region "Additional test attributes" + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + // _ _ + //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) + //End Sub + // + //Use ClassCleanup to run code after all tests in a class have run + // _ _ + //Public Shared Sub MyClassCleanup() + //End Sub + // + //Use TestInitialize to run code before running each test + // _ _ + //Public Sub MyTestInitialize() + //End Sub + // + //Use TestCleanup to run code after each test has run + // _ _ + //Public Sub MyTestCleanup() + //End Sub + // + + #endregion + + #region "UnitConverter.ConvertUnits" + + #region "Power Tests" + #region "Source as Watts" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Watts_to_Horsepower_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "W"; + string targetUnitName = "hp"; + Measurement expected = new Measurement (Convert.ToDouble(0.134102208959503), "hp"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Watts_to_Horsepower_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "W"; + string targetUnitName = "hp"; + Measurement expected = new Measurement (Convert.ToDouble(0.001341022088254), "hp"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Watts_to_Megawatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "W"; + string targetUnitName = "MW"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "MW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Watts_to_Megawatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "W"; + string targetUnitName = "MW"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "MW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Watts_to_Kilowatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "W"; + string targetUnitName = "kW"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "kW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Watts_to_Kilowatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "W"; + string targetUnitName = "kW"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "kW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Watts_to_Microwatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "W"; + string targetUnitName = "µW"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "µW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Watts_to_Microwatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "W"; + string targetUnitName = "µW"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "µW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Watts_to_Nanowatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "W"; + string targetUnitName = "nW"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "nW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Watts_to_Nanowatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "W"; + string targetUnitName = "nW"; + Measurement expected = new Measurement (Convert.ToDouble(999999999), "nW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Watts_to_MilliWatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "W"; + string targetUnitName = "mW"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "mW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Watts_to_MilliWatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "W"; + string targetUnitName = "mW"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "mW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Watts_to_BTUperMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "W"; + string targetUnitName = "BTU/min"; + Measurement expected = new Measurement (Convert.ToDouble(5.68690192748063), "BTU/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Watts_to_BTUperMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "W"; + string targetUnitName = "BTU/min"; + Measurement expected = new Measurement (Convert.ToDouble(0.056869019217937), "BTU/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Watts_to_FtLbPerMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "W"; + string targetUnitName = "ft lb/min"; + Measurement expected = new Measurement (Convert.ToDouble(4425.37289566359), "ft lb/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Watts_to_FtLbPerMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "W"; + string targetUnitName = "ft lb/min"; + Measurement expected = new Measurement (Convert.ToDouble(44.2537289123822), "ft lb/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Horsepower" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Horsepower_to_Watts_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "hp"; + string targetUnitName = "W"; + Measurement expected = new Measurement (Convert.ToDouble(74569.987158227), "W"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Horsepower_to_Watts_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "hp"; + string targetUnitName = "W"; + Measurement expected = new Measurement (Convert.ToDouble(745.69987083657), "W"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Horsepower_to_Megawatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "hp"; + string targetUnitName = "MW"; + Measurement expected = new Measurement (Convert.ToDouble(0.074569987158227), "MW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Horsepower_to_Megawatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "hp"; + string targetUnitName = "MW"; + Measurement expected = new Measurement (Convert.ToDouble(0.000745699870837), "MW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Horsepower_to_Kilowatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "hp"; + string targetUnitName = "kW"; + Measurement expected = new Measurement (Convert.ToDouble(74.569987158227), "kW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Horsepower_to_Kilowatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "hp"; + string targetUnitName = "kW"; + Measurement expected = new Measurement (Convert.ToDouble(0.74569987083657), "kW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Horsepower_to_Microwatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "hp"; + string targetUnitName = "µW"; + Measurement expected = new Measurement (Convert.ToDouble(74569987158.227), "µW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Horsepower_to_Microwatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "hp"; + string targetUnitName = "µW"; + Measurement expected = new Measurement (Convert.ToDouble(745699870.83657), "µW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Horsepower_to_Nanowatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "hp"; + string targetUnitName = "nW"; + Measurement expected = new Measurement (Convert.ToDouble(74569987158227.0), "nW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Horsepower_to_Nanowatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "hp"; + string targetUnitName = "nW"; + Measurement expected = new Measurement (Convert.ToDouble(745699870836.57), "nW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Horsepower_to_MilliWatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "hp"; + string targetUnitName = "mW"; + Measurement expected = new Measurement (Convert.ToDouble(74569987.158227), "mW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Horsepower_to_MilliWatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "hp"; + string targetUnitName = "mW"; + Measurement expected = new Measurement (Convert.ToDouble(745699.870836571), "mW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Horsepower_to_BTUperMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "hp"; + string targetUnitName = "BTU/min"; + Measurement expected = new Measurement (Convert.ToDouble(4240.72203702327), "BTU/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Horsepower_to_BTUperMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "hp"; + string targetUnitName = "BTU/min"; + Measurement expected = new Measurement (Convert.ToDouble(42.4072203278255), "BTU/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Horsepower_to_FtLbPerMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "hp"; + string targetUnitName = "ft lb/min"; + Measurement expected = new Measurement (Convert.ToDouble(3300000), "ft lb/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Horsepower_to_FtLbPerMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "hp"; + string targetUnitName = "ft lb/min"; + Measurement expected = new Measurement (Convert.ToDouble(32999.999967), "ft lb/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Megawatts" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megawatts_to_Watts_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "MW"; + string targetUnitName = "W"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "W"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megawatts_to_Watts_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "MW"; + string targetUnitName = "W"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "W"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megawatts_to_Horsepower_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "MW"; + string targetUnitName = "hp"; + Measurement expected = new Measurement (Convert.ToDouble(134102.208959503), "hp"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megawatts_to_Horsepower_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "MW"; + string targetUnitName = "hp"; + Measurement expected = new Measurement (Convert.ToDouble(1341.02208825401), "hp"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megawatts_to_Kilowatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "MW"; + string targetUnitName = "kW"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "kW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megawatts_to_Kilowatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "MW"; + string targetUnitName = "kW"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "kW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megawatts_to_Microwatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "MW"; + string targetUnitName = "µW"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000L), "µW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megawatts_to_Microwatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "MW"; + string targetUnitName = "µW"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000L), "µW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megawatts_to_Nanowatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "MW"; + string targetUnitName = "nW"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000000L), "nW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megawatts_to_Nanowatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "MW"; + string targetUnitName = "nW"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000000L), "nW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megawatts_to_MilliWatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "MW"; + string targetUnitName = "mW"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "mW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megawatts_to_MilliWatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "MW"; + string targetUnitName = "mW"; + Measurement expected = new Measurement (Convert.ToDouble(999999999), "mW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megawatts_to_BTUperMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "MW"; + string targetUnitName = "BTU/min"; + Measurement expected = new Measurement (Convert.ToDouble(5686901.92748063), "BTU/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megawatts_to_BTUperMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "MW"; + string targetUnitName = "BTU/min"; + Measurement expected = new Measurement (Convert.ToDouble(56869.0192179373), "BTU/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megawatts_to_FtLbPerMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "MW"; + string targetUnitName = "ft lb/min"; + Measurement expected = new Measurement (Convert.ToDouble(4425372895.66359), "ft lb/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megawatts_to_FtLbPerMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "MW"; + string targetUnitName = "ft lb/min"; + Measurement expected = new Measurement (Convert.ToDouble(44253728.9123822), "ft lb/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Kilowatts" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kilowatts_to_Watts_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kW"; + string targetUnitName = "W"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "W"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kilowatts_to_Watts_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kW"; + string targetUnitName = "W"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "W"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kilowatts_to_Horsepower_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kW"; + string targetUnitName = "hp"; + Measurement expected = new Measurement (Convert.ToDouble(134.102208959503), "hp"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kilowatts_to_Horsepower_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kW"; + string targetUnitName = "hp"; + Measurement expected = new Measurement (Convert.ToDouble(1.34102208825401), "hp"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kilowatts_to_Megawatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kW"; + string targetUnitName = "MW"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "MW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kilowatts_to_Megawatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kW"; + string targetUnitName = "MW"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "MW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kilowatts_to_Microwatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kW"; + string targetUnitName = "µW"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "µW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kilowatts_to_Microwatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kW"; + string targetUnitName = "µW"; + Measurement expected = new Measurement (Convert.ToDouble(999999999), "µW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kilowatts_to_Nanowatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kW"; + string targetUnitName = "nW"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000L), "nW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kilowatts_to_Nanowatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kW"; + string targetUnitName = "nW"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000L), "nW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kilowatts_to_MilliWatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kW"; + string targetUnitName = "mW"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "mW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kilowatts_to_MilliWatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kW"; + string targetUnitName = "mW"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "mW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kilowatts_to_BTUperMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kW"; + string targetUnitName = "BTU/min"; + Measurement expected = new Measurement (Convert.ToDouble(5686.90192748063), "BTU/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kilowatts_to_BTUperMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kW"; + string targetUnitName = "BTU/min"; + Measurement expected = new Measurement (Convert.ToDouble(56.8690192179373), "BTU/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kilowatts_to_FtLbPerMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kW"; + string targetUnitName = "ft lb/min"; + Measurement expected = new Measurement (Convert.ToDouble(4425372.89566359), "ft lb/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Kilowatts_to_FtLbPerMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kW"; + string targetUnitName = "ft lb/min"; + Measurement expected = new Measurement (Convert.ToDouble(44253.7289123822), "ft lb/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Microwatts" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microwatts_to_Watts_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µW"; + string targetUnitName = "W"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "W"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microwatts_to_Watts_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µW"; + string targetUnitName = "W"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "W"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microwatts_to_Horsepower_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µW"; + string targetUnitName = "hp"; + Measurement expected = new Measurement (Convert.ToDouble(1.34102209E-07), "hp"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microwatts_to_Horsepower_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µW"; + string targetUnitName = "hp"; + Measurement expected = new Measurement (Convert.ToDouble(1.341022E-09), "hp"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microwatts_to_Megawatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µW"; + string targetUnitName = "MW"; + Measurement expected = new Measurement (Convert.ToDouble(1E-10), "MW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microwatts_to_Megawatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µW"; + string targetUnitName = "MW"; + Measurement expected = new Measurement (Convert.ToDouble(1E-12), "MW"); + //should be 0.000000000000999999999, can only round to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microwatts_to_kikowatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µW"; + string targetUnitName = "kW"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "kW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microwatts_to_Kilowatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µW"; + string targetUnitName = "kW"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "kW"); + //should be 0.000000000999999999, can only round to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microwatts_to_Nanowatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µW"; + string targetUnitName = "nW"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "nW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microwatts_to_Nanowatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µW"; + string targetUnitName = "nW"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "nW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microwatts_to_Milliwatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µW"; + string targetUnitName = "mW"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "mW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microwatts_to_Milliwatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µW"; + string targetUnitName = "mW"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "mW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microwatts_to_BTUperMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µW"; + string targetUnitName = "BTU/min"; + Measurement expected = new Measurement (Convert.ToDouble(5.686901927E-06), "BTU/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microwatts_to_BTUperMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µW"; + string targetUnitName = "BTU/min"; + Measurement expected = new Measurement (Convert.ToDouble(5.6869019E-08), "BTU/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microwatts_to_FtLbPerMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µW"; + string targetUnitName = "ft lb/min"; + Measurement expected = new Measurement (Convert.ToDouble(0.004425372895664), "ft lb/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Microwatts_to_FtLbPerMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µW"; + string targetUnitName = "ft lb/min"; + Measurement expected = new Measurement (Convert.ToDouble(4.4253728912E-05), "ft lb/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Nanowatts" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Nanowatts_to_Watts_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nW"; + string targetUnitName = "W"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "W"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Nanowatts_to_Watts_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nW"; + string targetUnitName = "W"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "W"); + //should be 0.000000000999999999, can only round to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Nanowatts_to_Horsepower_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nW"; + string targetUnitName = "hp"; + Measurement expected = new Measurement (Convert.ToDouble(1.34102E-10), "hp"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Nanowatts_to_Horsepower_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nW"; + string targetUnitName = "hp"; + Measurement expected = new Measurement (Convert.ToDouble(1.341E-12), "hp"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Nanowatts_to_Megawatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nW"; + string targetUnitName = "MW"; + Measurement expected = new Measurement (Convert.ToDouble(1E-13), "MW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Nanowatts_to_Megawatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nW"; + string targetUnitName = "MW"; + Measurement expected = new Measurement (Convert.ToDouble(1E-15), "MW"); + //should be 0.000000000000000999999999, can only round to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Nanowatts_to_Kilowatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nW"; + string targetUnitName = "kW"; + Measurement expected = new Measurement (Convert.ToDouble(1E-10), "kW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Nanowatts_to_Kilowatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nW"; + string targetUnitName = "kW"; + Measurement expected = new Measurement (Convert.ToDouble(1E-12), "kW"); + //should be 0.000000000000999999999, can only round to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Nanowatts_to_Microwatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nW"; + string targetUnitName = "µW"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "µW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Nanowatts_to_Microwatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nW"; + string targetUnitName = "µW"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "µW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Nanowatts_to_Milliwatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nW"; + string targetUnitName = "mW"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "mW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Nanowatts_to_Milliwatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nW"; + string targetUnitName = "mW"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "mW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Nanowatts_to_BTUperMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nW"; + string targetUnitName = "BTU/min"; + Measurement expected = new Measurement (Convert.ToDouble(5.686902E-09), "BTU/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Nanowatts_to_BTUperMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nW"; + string targetUnitName = "BTU/min"; + Measurement expected = new Measurement (Convert.ToDouble(5.6869E-11), "BTU/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Nanowatts_to_FtLbPerMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nW"; + string targetUnitName = "ft lb/min"; + Measurement expected = new Measurement (Convert.ToDouble(4.425372896E-06), "ft lb/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Nanowatts_to_FtLbPerMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nW"; + string targetUnitName = "ft lb/min"; + Measurement expected = new Measurement (Convert.ToDouble(4.4253729E-08), "ft lb/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Milliwatts" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Milliwatts_to_Watts_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mW"; + string targetUnitName = "W"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "W"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Milliwatts_to_Watts_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mW"; + string targetUnitName = "W"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "W"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Milliwatts_to_Horsepower_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mW"; + string targetUnitName = "hp"; + Measurement expected = new Measurement (Convert.ToDouble(0.00013410220896), "hp"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Milliwatts_to_Horsepower_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mW"; + string targetUnitName = "hp"; + Measurement expected = new Measurement (Convert.ToDouble(1.341022088E-06), "hp"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Milliwatts_to_Megawatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mW"; + string targetUnitName = "MW"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "MW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Milliwatts_to_Megawatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mW"; + string targetUnitName = "MW"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "MW"); + //should be 0.000000000999999999, can only round to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Milliwatts_to_Kilowatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mW"; + string targetUnitName = "kW"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "kW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Milliwatts_to_Kilowatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mW"; + string targetUnitName = "kW"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "kW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Milliwatts_to_Microwatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mW"; + string targetUnitName = "µW"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "µW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Milliwatts_to_Microwatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mW"; + string targetUnitName = "µW"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "µW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Milliwatts_to_Nanowatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mW"; + string targetUnitName = "nW"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "nW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Milliwatts_to_Nanowatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mW"; + string targetUnitName = "nW"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "nW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Milliwatts_to_BTUperMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mW"; + string targetUnitName = "BTU/min"; + Measurement expected = new Measurement (Convert.ToDouble(0.005686901927481), "BTU/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Milliwatts_to_BTUperMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mW"; + string targetUnitName = "BTU/min"; + Measurement expected = new Measurement (Convert.ToDouble(5.6869019218E-05), "BTU/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Milliwatts_to_FtLbPerMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mW"; + string targetUnitName = "ft lb/min"; + Measurement expected = new Measurement (Convert.ToDouble(4.42537289566359), "ft lb/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Milliwatts_to_FtLbPerMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mW"; + string targetUnitName = "ft lb/min"; + Measurement expected = new Measurement (Convert.ToDouble(0.044253728912382), "ft lb/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as BTU/min" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_BTUperMin_to_Watts_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "BTU/min"; + string targetUnitName = "W"; + Measurement expected = new Measurement (Convert.ToDouble(1758.42666666667), "W"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_BTUperMin_to_Watts_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "BTU/min"; + string targetUnitName = "W"; + Measurement expected = new Measurement (Convert.ToDouble(17.5842666490824), "W"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_BTUperMin_to_Horsepower_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "BTU/min"; + string targetUnitName = "hp"; + Measurement expected = new Measurement (Convert.ToDouble(2.35808900293295), "hp"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_BTUperMin_to_Horsepower_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "BTU/min"; + string targetUnitName = "hp"; + Measurement expected = new Measurement (Convert.ToDouble(0.023580890005749), "hp"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_BTUperMin_to_Megawatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "BTU/min"; + string targetUnitName = "MW"; + Measurement expected = new Measurement (Convert.ToDouble(0.001758426666667), "MW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_BTUperMin_to_Megawatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "BTU/min"; + string targetUnitName = "MW"; + Measurement expected = new Measurement (Convert.ToDouble(1.7584266649E-05), "MW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_BTUperMin_to_Kilowatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "BTU/min"; + string targetUnitName = "kW"; + Measurement expected = new Measurement (Convert.ToDouble(1.75842666666667), "kW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_BTUperMin_to_Kilowatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "BTU/min"; + string targetUnitName = "kW"; + Measurement expected = new Measurement (Convert.ToDouble(0.017584266649082), "kW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_BTUperMin_to_Microwatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "BTU/min"; + string targetUnitName = "µW"; + Measurement expected = new Measurement (Convert.ToDouble(1758426666.66667), "µW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_BTUperMin_to_Microwatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "BTU/min"; + string targetUnitName = "µW"; + Measurement expected = new Measurement (Convert.ToDouble(17584266.6490824), "µW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_BTUperMin_to_Nanowatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "BTU/min"; + string targetUnitName = "nW"; + Measurement expected = new Measurement (Convert.ToDouble(1758426666666.67), "nW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_BTUperMin_to_Nanowatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "BTU/min"; + string targetUnitName = "nW"; + Measurement expected = new Measurement (Convert.ToDouble(17584266649.0824), "nW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_BTUperMin_to_Milliwatts_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "BTU/min"; + string targetUnitName = "mW"; + Measurement expected = new Measurement (Convert.ToDouble(1758426.66666667), "mW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_BTUperMin_to_Milliwatts_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "BTU/min"; + string targetUnitName = "mW"; + Measurement expected = new Measurement (Convert.ToDouble(17584.2666490824), "mW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_BTUperMin_to_FtLbPerMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "BTU/min"; + string targetUnitName = "ft lb/min"; + Measurement expected = new Measurement (Convert.ToDouble(77816.9370967875), "ft lb/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_BTUperMin_to_FtLbPerMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "BTU/min"; + string targetUnitName = "ft lb/min"; + Measurement expected = new Measurement (Convert.ToDouble(778.169370189705), "ft lb/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as ft lb/min" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtLbPerMin_to_Watts_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft lb/min"; + string targetUnitName = "W"; + Measurement expected = new Measurement (Convert.ToDouble(2.25969658055233), "W"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtLbPerMin_to_Watts_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft lb/min"; + string targetUnitName = "W"; + Measurement expected = new Measurement (Convert.ToDouble(0.022596965782926), "W"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtLbPerMin_to_Horsepower_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft lb/min"; + string targetUnitName = "hp"; + Measurement expected = new Measurement (Convert.ToDouble(0.003030303030303), "hp"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtLbPerMin_to_Horsepower_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft lb/min"; + string targetUnitName = "hp"; + Measurement expected = new Measurement (Convert.ToDouble(3.0303030273E-05), "hp"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtLbPerMin_to_Megawatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft lb/min"; + string targetUnitName = "MW"; + Measurement expected = new Measurement (Convert.ToDouble(2.259696581E-06), "MW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtLbPerMin_to_Megawatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft lb/min"; + string targetUnitName = "MW"; + Measurement expected = new Measurement (Convert.ToDouble(2.2596966E-08), "MW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtLbPerMin_to_Kilowatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft lb/min"; + string targetUnitName = "kW"; + Measurement expected = new Measurement (Convert.ToDouble(0.002259696580552), "kW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtLbPerMin_to_Kilowatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft lb/min"; + string targetUnitName = "kW"; + Measurement expected = new Measurement (Convert.ToDouble(2.2596965783E-05), "kW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtLbPerMin_to_Microwatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft lb/min"; + string targetUnitName = "µW"; + Measurement expected = new Measurement (Convert.ToDouble(2259696.58055233), "µW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtLbPerMin_to_Microwatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft lb/min"; + string targetUnitName = "µW"; + Measurement expected = new Measurement (Convert.ToDouble(22596.9657829264), "µW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtLbPerMin_to_Nanowatt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft lb/min"; + string targetUnitName = "nW"; + Measurement expected = new Measurement (Convert.ToDouble(2259696580.55233), "nW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtLbPerMin_to_Nanowatt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft lb/min"; + string targetUnitName = "nW"; + Measurement expected = new Measurement (Convert.ToDouble(22596965.7829264), "nW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtLbPerMin_to_Milliwatts_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft lb/min"; + string targetUnitName = "mW"; + Measurement expected = new Measurement (Convert.ToDouble(2259.69658055233), "mW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtLbPerMin_to_Milliwatts_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft lb/min"; + string targetUnitName = "mW"; + Measurement expected = new Measurement (Convert.ToDouble(22.5969657829264), "mW"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtLbPerMin_to_BTUperMin_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft lb/min"; + string targetUnitName = "BTU/min"; + Measurement expected = new Measurement (Convert.ToDouble(0.128506728394644), "BTU/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_FtLbPerMin_to_BTUperMin_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft lb/min"; + string targetUnitName = "BTU/min"; + Measurement expected = new Measurement (Convert.ToDouble(0.001285067282661), "BTU/min"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + #endregion + + #region "Energy Tests" + #region "Source as Joule" + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_J_to_erg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "J"; + string targetUnitName = "erg"; + Measurement expected = new Measurement (Convert.ToDouble(1000000000), "erg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_J_to_erg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "J"; + string targetUnitName = "erg"; + Measurement expected = new Measurement (Convert.ToDouble(9999999.99), "erg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_J_to_cal_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "J"; + string targetUnitName = "cal"; + Measurement expected = new Measurement (Convert.ToDouble(23.8845896627496), "cal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_J_to_cal_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "J"; + string targetUnitName = "cal"; + Measurement expected = new Measurement (Convert.ToDouble(0.23884589638865), "cal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_J_to_Btu_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "J"; + string targetUnitName = "Btu"; + Measurement expected = new Measurement (Convert.ToDouble(0.094781712031332), "Btu"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_J_to_Btu_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "J"; + string targetUnitName = "Btu"; + Measurement expected = new Measurement (Convert.ToDouble(0.000947817119366), "Btu"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_J_to_therm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "J"; + string targetUnitName = "therm"; + Measurement expected = new Measurement (Convert.ToDouble(9.47816988E-07), "therm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_J_to_therm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "J"; + string targetUnitName = "therm"; + Measurement expected = new Measurement (Convert.ToDouble(9.47817E-09), "therm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_J_to_mJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "J"; + string targetUnitName = "mJ"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "mJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_J_to_mJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "J"; + string targetUnitName = "mJ"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "mJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_J_to_Megajoule_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "J"; + string targetUnitName = "Megajoule"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "Megajoule"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_J_to_Megajoule_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "J"; + string targetUnitName = "Megajoule"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "Megajoule"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_J_to_kJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "J"; + string targetUnitName = "kJ"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "kJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_J_to_kJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "J"; + string targetUnitName = "kJ"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "kJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_J_to_GJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "J"; + string targetUnitName = "GJ"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "GJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_J_to_GJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "J"; + string targetUnitName = "GJ"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "GJ"); + //should be 0.000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_J_to_µJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "J"; + string targetUnitName = "µJ"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "µJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_J_to_µJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "J"; + string targetUnitName = "µJ"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "µJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_J_to_nJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "J"; + string targetUnitName = "nJ"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000.0), "nJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_J_to_nJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "J"; + string targetUnitName = "nJ"; + Measurement expected = new Measurement (Convert.ToDouble(999999999), "nJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Energy (erg)" + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_erg_to_J_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "erg"; + string targetUnitName = "J"; + Measurement expected = new Measurement (Convert.ToDouble(1E-05), "J"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_erg_to_J_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "erg"; + string targetUnitName = "J"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "J"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_erg_to_cal_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "erg"; + string targetUnitName = "cal"; + Measurement expected = new Measurement (Convert.ToDouble(2.388458966E-06), "cal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_erg_to_cal_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "erg"; + string targetUnitName = "cal"; + Measurement expected = new Measurement (Convert.ToDouble(2.388459E-08), "cal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_erg_to_Btu_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "erg"; + string targetUnitName = "Btu"; + Measurement expected = new Measurement (Convert.ToDouble(9.478171E-09), "Btu"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_erg_to_Btu_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "erg"; + string targetUnitName = "Btu"; + Measurement expected = new Measurement (Convert.ToDouble(9.4782E-11), "Btu"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_erg_to_therm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "erg"; + string targetUnitName = "therm"; + Measurement expected = new Measurement (Convert.ToDouble(9.5E-14), "therm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_erg_to_therm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "erg"; + string targetUnitName = "therm"; + Measurement expected = new Measurement (Convert.ToDouble(1E-15), "therm"); + //should be 0.000000000000000947816987, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_erg_to_mJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "erg"; + string targetUnitName = "mJ"; + Measurement expected = new Measurement (Convert.ToDouble(0.01), "mJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_erg_to_mJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "erg"; + string targetUnitName = "mJ"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-05), "mJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_erg_to_Megajoule_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "erg"; + string targetUnitName = "Megajoule"; + Measurement expected = new Measurement (Convert.ToDouble(1E-11), "Megajoule"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_erg_to_Megajoule_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "erg"; + string targetUnitName = "Megajoule"; + Measurement expected = new Measurement (Convert.ToDouble(1E-13), "Megajoule"); + //should be 0.0000000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_erg_to_kJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "erg"; + string targetUnitName = "kJ"; + Measurement expected = new Measurement (Convert.ToDouble(1E-08), "kJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_erg_to_kJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "erg"; + string targetUnitName = "kJ"; + Measurement expected = new Measurement (Convert.ToDouble(1E-10), "kJ"); + //should be 0.000000000099999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_erg_to_GJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "erg"; + string targetUnitName = "GJ"; + Measurement expected = new Measurement (Convert.ToDouble(1E-14), "GJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_erg_to_GJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "erg"; + string targetUnitName = "GJ"; + Measurement expected = new Measurement (Convert.ToDouble(0), "GJ"); + //should be 9.99999999E-17, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_erg_to_µJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "erg"; + string targetUnitName = "µJ"; + Measurement expected = new Measurement (Convert.ToDouble(10), "µJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_erg_to_µJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "erg"; + string targetUnitName = "µJ"; + Measurement expected = new Measurement (Convert.ToDouble(0.0999999999), "µJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_erg_to_nJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "erg"; + string targetUnitName = "nJ"; + Measurement expected = new Measurement (Convert.ToDouble(10000), "nJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_erg_to_nJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "erg"; + string targetUnitName = "nJ"; + Measurement expected = new Measurement (Convert.ToDouble(99.9999999), "nJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Calorie (cal)" + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cal_to_J_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cal"; + string targetUnitName = "J"; + Measurement expected = new Measurement (Convert.ToDouble(418.68), "J"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cal_to_J_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cal"; + string targetUnitName = "J"; + Measurement expected = new Measurement (Convert.ToDouble(4.1867999958132), "J"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cal_to_erg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cal"; + string targetUnitName = "erg"; + Measurement expected = new Measurement (Convert.ToDouble(4186800000L), "erg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cal_to_erg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cal"; + string targetUnitName = "erg"; + Measurement expected = new Measurement (Convert.ToDouble(41867999.958132), "erg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cal_to_Btu_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cal"; + string targetUnitName = "Btu"; + Measurement expected = new Measurement (Convert.ToDouble(0.396832071932955), "Btu"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cal_to_Btu_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cal"; + string targetUnitName = "Btu"; + Measurement expected = new Measurement (Convert.ToDouble(0.003968320715361), "Btu"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cal_to_therm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cal"; + string targetUnitName = "therm"; + Measurement expected = new Measurement (Convert.ToDouble(3.968320165E-06), "therm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cal_to_therm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cal"; + string targetUnitName = "therm"; + Measurement expected = new Measurement (Convert.ToDouble(3.9683202E-08), "therm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cal_to_mJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cal"; + string targetUnitName = "mJ"; + Measurement expected = new Measurement (Convert.ToDouble(418680), "mJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cal_to_mJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cal"; + string targetUnitName = "mJ"; + Measurement expected = new Measurement (Convert.ToDouble(4186.7999958132), "mJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cal_to_Megajoule_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cal"; + string targetUnitName = "Megajoule"; + Measurement expected = new Measurement (Convert.ToDouble(0.00041868), "Megajoule"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cal_to_Megajoule_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cal"; + string targetUnitName = "Megajoule"; + Measurement expected = new Measurement (Convert.ToDouble(4.186799996E-06), "Megajoule"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cal_to_kJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cal"; + string targetUnitName = "kJ"; + Measurement expected = new Measurement (Convert.ToDouble(0.41868), "kJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cal_to_kJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cal"; + string targetUnitName = "kJ"; + Measurement expected = new Measurement (Convert.ToDouble(0.004186799995813), "kJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cal_to_GJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cal"; + string targetUnitName = "GJ"; + Measurement expected = new Measurement (Convert.ToDouble(4.1868E-07), "GJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cal_to_GJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cal"; + string targetUnitName = "GJ"; + Measurement expected = new Measurement (Convert.ToDouble(4.1868E-09), "GJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cal_to_µJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cal"; + string targetUnitName = "µJ"; + Measurement expected = new Measurement (Convert.ToDouble(418680000), "µJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cal_to_µJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cal"; + string targetUnitName = "µJ"; + Measurement expected = new Measurement (Convert.ToDouble(4186799.9958132), "µJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cal_to_nJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cal"; + string targetUnitName = "nJ"; + Measurement expected = new Measurement (Convert.ToDouble(418680000000.0), "nJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cal_to_nJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cal"; + string targetUnitName = "nJ"; + Measurement expected = new Measurement (Convert.ToDouble(4186799995.8132), "nJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as British thermal unit (Btu)" + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Btu_to_J_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Btu"; + string targetUnitName = "J"; + Measurement expected = new Measurement (Convert.ToDouble(105505.585262), "J"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Btu_to_J_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Btu"; + string targetUnitName = "J"; + Measurement expected = new Measurement (Convert.ToDouble(1055.05585156494), "J"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Btu_to_erg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Btu"; + string targetUnitName = "erg"; + Measurement expected = new Measurement (Convert.ToDouble(1055055852620.0), "erg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Btu_to_erg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Btu"; + string targetUnitName = "erg"; + Measurement expected = new Measurement (Convert.ToDouble(10550558515.6494), "erg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Btu_to_cal_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Btu"; + string targetUnitName = "cal"; + Measurement expected = new Measurement (Convert.ToDouble(25199.5761111), "cal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Btu_to_cal_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Btu"; + string targetUnitName = "cal"; + Measurement expected = new Measurement (Convert.ToDouble(251.995760859004), "cal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Btu_to_therm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Btu"; + string targetUnitName = "therm"; + Measurement expected = new Measurement (Convert.ToDouble(0.001), "therm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Btu_to_therm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Btu"; + string targetUnitName = "therm"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-06), "therm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Btu_to_mJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Btu"; + string targetUnitName = "mJ"; + Measurement expected = new Measurement (Convert.ToDouble(105505585.262), "mJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Btu_to_mJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Btu"; + string targetUnitName = "mJ"; + Measurement expected = new Measurement (Convert.ToDouble(1055055.85156494), "mJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Btu_to_Megajoule_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Btu"; + string targetUnitName = "Megajoule"; + Measurement expected = new Measurement (Convert.ToDouble(0.105505585262), "Megajoule"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Btu_to_Megajoule_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Btu"; + string targetUnitName = "Megajoule"; + Measurement expected = new Measurement (Convert.ToDouble(0.001055055851565), "Megajoule"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Btu_to_kJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Btu"; + string targetUnitName = "kJ"; + Measurement expected = new Measurement (Convert.ToDouble(105.505585262), "kJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Btu_to_kJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Btu"; + string targetUnitName = "kJ"; + Measurement expected = new Measurement (Convert.ToDouble(1.05505585156494), "kJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Btu_to_GJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Btu"; + string targetUnitName = "GJ"; + Measurement expected = new Measurement (Convert.ToDouble(0.000105505585262), "GJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Btu_to_GJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Btu"; + string targetUnitName = "GJ"; + Measurement expected = new Measurement (Convert.ToDouble(1.055055852E-06), "GJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Btu_to_µJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Btu"; + string targetUnitName = "µJ"; + Measurement expected = new Measurement (Convert.ToDouble(105505585262.0), "µJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Btu_to_µJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Btu"; + string targetUnitName = "µJ"; + Measurement expected = new Measurement (Convert.ToDouble(1055055851.56494), "µJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Btu_to_nJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Btu"; + string targetUnitName = "nJ"; + Measurement expected = new Measurement (Convert.ToDouble(105505585262000.0), "nJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Btu_to_nJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Btu"; + string targetUnitName = "nJ"; + Measurement expected = new Measurement (Convert.ToDouble(1055055851564.94), "nJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Therm (therm)" + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_therm_to_J_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "therm"; + string targetUnitName = "J"; + Measurement expected = new Measurement (Convert.ToDouble(10550560000.0), "J"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_therm_to_J_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "therm"; + string targetUnitName = "J"; + Measurement expected = new Measurement (Convert.ToDouble(105505599.894494), "J"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_therm_to_erg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "therm"; + string targetUnitName = "erg"; + Measurement expected = new Measurement (Convert.ToDouble(1.055056E+17), "erg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_therm_to_erg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "therm"; + string targetUnitName = "erg"; + Measurement expected = new Measurement (Convert.ToDouble(1055055998944944L), "erg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_therm_to_cal_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "therm"; + string targetUnitName = "cal"; + Measurement expected = new Measurement (Convert.ToDouble(2519957963.1222), "cal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_therm_to_cal_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "therm"; + string targetUnitName = "cal"; + Measurement expected = new Measurement (Convert.ToDouble(25199579.6060224), "cal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_therm_to_Btu_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "therm"; + string targetUnitName = "Btu"; + Measurement expected = new Measurement (Convert.ToDouble(10000000), "Btu"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_therm_to_Btu_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "therm"; + string targetUnitName = "Btu"; + Measurement expected = new Measurement (Convert.ToDouble(99999.9999), "Btu"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_therm_to_mJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "therm"; + string targetUnitName = "mJ"; + Measurement expected = new Measurement (Convert.ToDouble(10550560000000.0), "mJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_therm_to_mJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "therm"; + string targetUnitName = "mJ"; + Measurement expected = new Measurement (Convert.ToDouble(105505599894.494), "mJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_therm_to_Megajoule_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "therm"; + string targetUnitName = "Megajoule"; + Measurement expected = new Measurement (Convert.ToDouble(10550.56), "Megajoule"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_therm_to_Megajoule_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "therm"; + string targetUnitName = "Megajoule"; + Measurement expected = new Measurement (Convert.ToDouble(105.505599894494), "Megajoule"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_therm_to_kJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "therm"; + string targetUnitName = "kJ"; + Measurement expected = new Measurement (Convert.ToDouble(10550560), "kJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_therm_to_kJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "therm"; + string targetUnitName = "kJ"; + Measurement expected = new Measurement (Convert.ToDouble(105505.599894494), "kJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_therm_to_GJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "therm"; + string targetUnitName = "GJ"; + Measurement expected = new Measurement (Convert.ToDouble(10.55056), "GJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_therm_to_GJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "therm"; + string targetUnitName = "GJ"; + Measurement expected = new Measurement (Convert.ToDouble(0.105505599894494), "GJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_therm_to_µJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "therm"; + string targetUnitName = "µJ"; + Measurement expected = new Measurement (Convert.ToDouble(1.055056E+16), "µJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_therm_to_µJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "therm"; + string targetUnitName = "µJ"; + Measurement expected = new Measurement (Convert.ToDouble(105505599894494.0), "µJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_therm_to_nJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "therm"; + string targetUnitName = "nJ"; + Measurement expected = new Measurement (Convert.ToDouble(1.055056E+19), "nJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_therm_to_nJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "therm"; + string targetUnitName = "nJ"; + Measurement expected = new Measurement (Convert.ToDouble(1.05505599894494E+17), "nJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Millijoules (mJ)" + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mJ_to_J_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mJ"; + string targetUnitName = "J"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "J"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mJ_to_J_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mJ"; + string targetUnitName = "J"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "J"); + //actual value 0.001, .net bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mJ_to_erg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mJ"; + string targetUnitName = "erg"; + Measurement expected = new Measurement (Convert.ToDouble(1000000), "erg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mJ_to_erg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mJ"; + string targetUnitName = "erg"; + Measurement expected = new Measurement (Convert.ToDouble(9999.99999), "erg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mJ_to_cal_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mJ"; + string targetUnitName = "cal"; + Measurement expected = new Measurement (Convert.ToDouble(0.02388458966275), "cal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mJ_to_cal_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mJ"; + string targetUnitName = "cal"; + Measurement expected = new Measurement (Convert.ToDouble(0.000238845896389), "cal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mJ_to_Btu_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mJ"; + string targetUnitName = "Btu"; + Measurement expected = new Measurement (Convert.ToDouble(9.4781712031E-05), "Btu"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mJ_to_Btu_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mJ"; + string targetUnitName = "Btu"; + Measurement expected = new Measurement (Convert.ToDouble(9.47817119E-07), "Btu"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mJ_to_therm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mJ"; + string targetUnitName = "therm"; + Measurement expected = new Measurement (Convert.ToDouble(9.47817E-10), "therm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mJ_to_therm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mJ"; + string targetUnitName = "therm"; + Measurement expected = new Measurement (Convert.ToDouble(9.478E-12), "therm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mJ_to_Megajoule_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mJ"; + string targetUnitName = "Megajoule"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "Megajoule"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mJ_to_Megajoule_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mJ"; + string targetUnitName = "Megajoule"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "Megajoule"); + //should be 0.000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mJ_to_kJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mJ"; + string targetUnitName = "kJ"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "kJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mJ_to_kJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mJ"; + string targetUnitName = "kJ"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "kJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mJ_to_GJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mJ"; + string targetUnitName = "GJ"; + Measurement expected = new Measurement (Convert.ToDouble(1E-10), "GJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mJ_to_GJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mJ"; + string targetUnitName = "GJ"; + Measurement expected = new Measurement (Convert.ToDouble(1E-12), "GJ"); + //should be 0.000000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mJ_to_µJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mJ"; + string targetUnitName = "µJ"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "µJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mJ_to_µJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mJ"; + string targetUnitName = "µJ"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "µJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mJ_to_nJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mJ"; + string targetUnitName = "nJ"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "nJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mJ_to_nJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mJ"; + string targetUnitName = "nJ"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "nJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Megajoules (MJ)" + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megajoule_to_J_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Megajoule"; + string targetUnitName = "J"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "J"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megajoule_to_J_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Megajoule"; + string targetUnitName = "J"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "J"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megajoule_to_erg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Megajoule"; + string targetUnitName = "erg"; + Measurement expected = new Measurement (Convert.ToDouble(1E+15), "erg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megajoule_to_erg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Megajoule"; + string targetUnitName = "erg"; + Measurement expected = new Measurement (Convert.ToDouble(9999999990000.0), "erg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megajoule_to_cal_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Megajoule"; + string targetUnitName = "cal"; + Measurement expected = new Measurement (Convert.ToDouble(23884589.6627496), "cal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megajoule_to_cal_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Megajoule"; + string targetUnitName = "cal"; + Measurement expected = new Measurement (Convert.ToDouble(238845.89638865), "cal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megajoule_to_Btu_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Megajoule"; + string targetUnitName = "Btu"; + Measurement expected = new Measurement (Convert.ToDouble(94781.7120313317), "Btu"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megajoule_to_Btu_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Megajoule"; + string targetUnitName = "Btu"; + Measurement expected = new Measurement (Convert.ToDouble(947.8171193655), "Btu"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megajoule_to_therm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Megajoule"; + string targetUnitName = "therm"; + Measurement expected = new Measurement (Convert.ToDouble(0.947816987913438), "therm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megajoule_to_therm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Megajoule"; + string targetUnitName = "therm"; + Measurement expected = new Measurement (Convert.ToDouble(0.009478169869656), "therm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megajoule_to_mJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Megajoule"; + string targetUnitName = "mJ"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000.0), "mJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megajoule_to_mJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Megajoule"; + string targetUnitName = "mJ"; + Measurement expected = new Measurement (Convert.ToDouble(999999999), "mJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megajoule_to_kJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Megajoule"; + string targetUnitName = "kJ"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "kJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megajoule_to_kJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Megajoule"; + string targetUnitName = "kJ"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "kJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megajoule_to_GJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Megajoule"; + string targetUnitName = "GJ"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "GJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megajoule_to_GJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Megajoule"; + string targetUnitName = "GJ"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "GJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megajoule_to_µJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Megajoule"; + string targetUnitName = "µJ"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000.0), "µJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megajoule_to_µJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Megajoule"; + string targetUnitName = "µJ"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000.0), "µJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megajoule_to_nJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Megajoule"; + string targetUnitName = "nJ"; + Measurement expected = new Measurement (Convert.ToDouble(1E+17), "nJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Megajoule_to_nJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Megajoule"; + string targetUnitName = "nJ"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000000.0), "nJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Kilojoules (kJ)" + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kJ_to_J_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kJ"; + string targetUnitName = "J"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "J"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kJ_to_J_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kJ"; + string targetUnitName = "J"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "J"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kJ_to_erg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kJ"; + string targetUnitName = "erg"; + Measurement expected = new Measurement (Convert.ToDouble(1000000000000.0), "erg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kJ_to_erg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kJ"; + string targetUnitName = "erg"; + Measurement expected = new Measurement (Convert.ToDouble(9999999990L), "erg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kJ_to_cal_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kJ"; + string targetUnitName = "cal"; + Measurement expected = new Measurement (Convert.ToDouble(23884.5896627496), "cal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kJ_to_cal_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kJ"; + string targetUnitName = "cal"; + Measurement expected = new Measurement (Convert.ToDouble(238.84589638865), "cal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kJ_to_Btu_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kJ"; + string targetUnitName = "Btu"; + Measurement expected = new Measurement (Convert.ToDouble(94.7817120313317), "Btu"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kJ_to_Btu_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kJ"; + string targetUnitName = "Btu"; + Measurement expected = new Measurement (Convert.ToDouble(0.9478171193655), "Btu"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kJ_to_therm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kJ"; + string targetUnitName = "therm"; + Measurement expected = new Measurement (Convert.ToDouble(0.000947816987913), "therm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kJ_to_therm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kJ"; + string targetUnitName = "therm"; + Measurement expected = new Measurement (Convert.ToDouble(9.47816987E-06), "therm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kJ_to_mJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kJ"; + string targetUnitName = "mJ"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "mJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kJ_to_mJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kJ"; + string targetUnitName = "mJ"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "mJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kJ_to_Megajoule_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kJ"; + string targetUnitName = "Megajoule"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "Megajoule"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kJ_to_Megajoule_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kJ"; + string targetUnitName = "Megajoule"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "Megajoule"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kJ_to_GJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kJ"; + string targetUnitName = "GJ"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "GJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kJ_to_GJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kJ"; + string targetUnitName = "GJ"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "GJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kJ_to_µJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kJ"; + string targetUnitName = "µJ"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000.0), "µJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kJ_to_µJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kJ"; + string targetUnitName = "µJ"; + Measurement expected = new Measurement (Convert.ToDouble(999999999), "µJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kJ_to_nJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kJ"; + string targetUnitName = "nJ"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000.0), "nJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kJ_to_nJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kJ"; + string targetUnitName = "nJ"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000.0), "nJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Gigajoules (GJ)" + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GJ_to_J_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "GJ"; + string targetUnitName = "J"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000.0), "J"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GJ_to_J_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "GJ"; + string targetUnitName = "J"; + Measurement expected = new Measurement (Convert.ToDouble(999999999), "J"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GJ_to_erg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "GJ"; + string targetUnitName = "erg"; + Measurement expected = new Measurement (Convert.ToDouble(1E+18), "erg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GJ_to_erg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "GJ"; + string targetUnitName = "erg"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E+15), "erg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GJ_to_cal_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "GJ"; + string targetUnitName = "cal"; + Measurement expected = new Measurement (Convert.ToDouble(23884589662.75), "cal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GJ_to_cal_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "GJ"; + string targetUnitName = "cal"; + Measurement expected = new Measurement (Convert.ToDouble(238845896.388654), "cal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GJ_to_Btu_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "GJ"; + string targetUnitName = "Btu"; + Measurement expected = new Measurement (Convert.ToDouble(94781712.031332), "Btu"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GJ_to_Btu_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "GJ"; + string targetUnitName = "Btu"; + Measurement expected = new Measurement (Convert.ToDouble(947817.119365503), "Btu"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GJ_to_therm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "GJ"; + string targetUnitName = "therm"; + Measurement expected = new Measurement (Convert.ToDouble(947.816987913438), "therm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GJ_to_therm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "GJ"; + string targetUnitName = "therm"; + Measurement expected = new Measurement (Convert.ToDouble(9.47816986965621), "therm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GJ_to_mJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "GJ"; + string targetUnitName = "mJ"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000000.0), "mJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GJ_to_mJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "GJ"; + string targetUnitName = "mJ"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000.0), "mJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GJ_to_Megajoule_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "GJ"; + string targetUnitName = "Megajoule"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "Megajoule"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GJ_to_Megajoule_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "GJ"; + string targetUnitName = "Megajoule"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "Megajoule"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GJ_to_kJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "GJ"; + string targetUnitName = "kJ"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "kJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GJ_to_kJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "GJ"; + string targetUnitName = "kJ"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "kJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GJ_to_µJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "GJ"; + string targetUnitName = "µJ"; + Measurement expected = new Measurement (Convert.ToDouble(1E+17), "µJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GJ_to_µJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "GJ"; + string targetUnitName = "µJ"; + Measurement expected = new Measurement (Convert.ToDouble(999999999000000.0), "µJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GJ_to_nJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "GJ"; + string targetUnitName = "nJ"; + Measurement expected = new Measurement (Convert.ToDouble(1E+20), "nJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_GJ_to_nJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "GJ"; + string targetUnitName = "nJ"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E+17), "nJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Microjoules (µJ)" + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µJ_to_J_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µJ"; + string targetUnitName = "J"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "J"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µJ_to_J_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µJ"; + string targetUnitName = "J"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "J"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µJ_to_erg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µJ"; + string targetUnitName = "erg"; + Measurement expected = new Measurement (Convert.ToDouble(1000), "erg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µJ_to_erg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µJ"; + string targetUnitName = "erg"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999), "erg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µJ_to_cal_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µJ"; + string targetUnitName = "cal"; + Measurement expected = new Measurement (Convert.ToDouble(2.3884589663E-05), "cal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µJ_to_cal_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µJ"; + string targetUnitName = "cal"; + Measurement expected = new Measurement (Convert.ToDouble(2.38845896E-07), "cal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µJ_to_Btu_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µJ"; + string targetUnitName = "Btu"; + Measurement expected = new Measurement (Convert.ToDouble(9.4781712E-08), "Btu"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µJ_to_Btu_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µJ"; + string targetUnitName = "Btu"; + Measurement expected = new Measurement (Convert.ToDouble(9.47817E-10), "Btu"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µJ_to_therm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µJ"; + string targetUnitName = "therm"; + Measurement expected = new Measurement (Convert.ToDouble(9.48E-13), "therm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µJ_to_therm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µJ"; + string targetUnitName = "therm"; + Measurement expected = new Measurement (Convert.ToDouble(9E-15), "therm"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µJ_to_mJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µJ"; + string targetUnitName = "mJ"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "mJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µJ_to_mJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µJ"; + string targetUnitName = "mJ"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "mJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µJ_to_Megajoule_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µJ"; + string targetUnitName = "Megajoule"; + Measurement expected = new Measurement (Convert.ToDouble(1E-10), "Megajoule"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µJ_to_Megajoule_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µJ"; + string targetUnitName = "Megajoule"; + Measurement expected = new Measurement (Convert.ToDouble(1E-12), "Megajoule"); + //should be 0.000000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µJ_to_kJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µJ"; + string targetUnitName = "kJ"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "kJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µJ_to_kJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µJ"; + string targetUnitName = "kJ"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "kJ"); + //should be 0.000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µJ_to_GJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µJ"; + string targetUnitName = "GJ"; + Measurement expected = new Measurement (Convert.ToDouble(1E-13), "GJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µJ_to_GJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µJ"; + string targetUnitName = "GJ"; + Measurement expected = new Measurement (Convert.ToDouble(1E-15), "GJ"); + //should be 0.000000000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µJ_to_nJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µJ"; + string targetUnitName = "nJ"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "nJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µJ_to_nJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µJ"; + string targetUnitName = "nJ"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "nJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Nanojoules (nJ)" + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nJ_to_J_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nJ"; + string targetUnitName = "J"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "J"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nJ_to_J_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nJ"; + string targetUnitName = "J"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "J"); + //should be 0.000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nJ_to_erg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nJ"; + string targetUnitName = "erg"; + Measurement expected = new Measurement (Convert.ToDouble(1), "erg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nJ_to_erg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nJ"; + string targetUnitName = "erg"; + Measurement expected = new Measurement (Convert.ToDouble(0.00999999999), "erg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nJ_to_cal_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nJ"; + string targetUnitName = "cal"; + Measurement expected = new Measurement (Convert.ToDouble(2.388459E-08), "cal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nJ_to_cal_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nJ"; + string targetUnitName = "cal"; + Measurement expected = new Measurement (Convert.ToDouble(2.38846E-10), "cal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nJ_to_Btu_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nJ"; + string targetUnitName = "Btu"; + Measurement expected = new Measurement (Convert.ToDouble(9.4782E-11), "Btu"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nJ_to_Btu_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nJ"; + string targetUnitName = "Btu"; + Measurement expected = new Measurement (Convert.ToDouble(9.48E-13), "Btu"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nJ_to_therm_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nJ"; + string targetUnitName = "therm"; + Measurement expected = new Measurement (Convert.ToDouble(1E-15), "therm"); + //should be 0.0000000000000009478169879, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nJ_to_therm_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nJ"; + string targetUnitName = "therm"; + Measurement expected = new Measurement (Convert.ToDouble(0), "therm"); + //should be 9.47816987E-18, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nJ_to_mJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nJ"; + string targetUnitName = "mJ"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "mJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nJ_to_mJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nJ"; + string targetUnitName = "mJ"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "mJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nJ_to_Megajoule_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nJ"; + string targetUnitName = "Megajoule"; + Measurement expected = new Measurement (Convert.ToDouble(1E-13), "Megajoule"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nJ_to_Megajoule_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nJ"; + string targetUnitName = "Megajoule"; + Measurement expected = new Measurement (Convert.ToDouble(1E-15), "Megajoule"); + //should be 0.000000000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nJ_to_kJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nJ"; + string targetUnitName = "kJ"; + Measurement expected = new Measurement (Convert.ToDouble(1E-10), "kJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nJ_to_kJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nJ"; + string targetUnitName = "kJ"; + Measurement expected = new Measurement (Convert.ToDouble(1E-12), "kJ"); + //should be 0.000000000000999999999, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nJ_to_GJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nJ"; + string targetUnitName = "GJ"; + Measurement expected = new Measurement (Convert.ToDouble(0), "GJ"); + //should be 0.0000000000000001, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nJ_to_GJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nJ"; + string targetUnitName = "GJ"; + Measurement expected = new Measurement (Convert.ToDouble(0), "GJ"); + //should be 9.99999999E-19, .net rounds to 15 places + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nJ_to_µJ_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "nJ"; + string targetUnitName = "µJ"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "µJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nJ_to_µJ_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "nJ"; + string targetUnitName = "µJ"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "µJ"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + #endregion + + #region "Plane Angle Tests" + + #region "Source as Radians" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_rad_to_deg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "rad"; + string targetUnitName = "deg"; + Measurement expected = new Measurement (Convert.ToDouble(5729.57795130823), "deg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_rad_to_deg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "rad"; + string targetUnitName = "deg"; + Measurement expected = new Measurement (Convert.ToDouble(57.2957794557866), "deg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_rad_to_grad_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "rad"; + string targetUnitName = "grad"; + Measurement expected = new Measurement (Convert.ToDouble(6366.19772367581), "grad"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_rad_to_grad_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "rad"; + string targetUnitName = "grad"; + Measurement expected = new Measurement (Convert.ToDouble(63.6619771730962), "grad"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_rad_to_rev_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "rad"; + string targetUnitName = "rev"; + Measurement expected = new Measurement (Convert.ToDouble(15.915494309), "rev"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_rad_to_rev_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "rad"; + string targetUnitName = "rev"; + Measurement expected = new Measurement (Convert.ToDouble(0.159154942930845), "rev"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Degrees" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_deg_to_rad_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "deg"; + string targetUnitName = "rad"; + Measurement expected = new Measurement (Convert.ToDouble(1.74532925199433), "rad"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_deg_to_rad_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "deg"; + string targetUnitName = "rad"; + Measurement expected = new Measurement (Convert.ToDouble(0.01745329250249), "rad"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_deg_to_grad_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "deg"; + string targetUnitName = "grad"; + Measurement expected = new Measurement (Convert.ToDouble(111.111111111111), "grad"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_deg_to_grad_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "deg"; + string targetUnitName = "grad"; + Measurement expected = new Measurement (Convert.ToDouble(1.11111111), "grad"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_deg_to_rev_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "deg"; + string targetUnitName = "rev"; + Measurement expected = new Measurement (Convert.ToDouble(0.277777777777778), "rev"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_deg_to_rev_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "deg"; + string targetUnitName = "rev"; + Measurement expected = new Measurement (Convert.ToDouble(0.002777777775), "rev"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Gradians" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_grad_to_rad_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "grad"; + string targetUnitName = "rad"; + Measurement expected = new Measurement (Convert.ToDouble(1.5707963267949), "rad"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_grad_to_rad_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "grad"; + string targetUnitName = "rad"; + Measurement expected = new Measurement (Convert.ToDouble(0.015707963252241), "rad"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_grad_to_deg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "grad"; + string targetUnitName = "deg"; + Measurement expected = new Measurement (Convert.ToDouble(90), "deg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_grad_to_deg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "grad"; + string targetUnitName = "deg"; + Measurement expected = new Measurement (Convert.ToDouble(0.8999999991), "deg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_grad_to_rev_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "grad"; + string targetUnitName = "rev"; + Measurement expected = new Measurement (Convert.ToDouble(0.25), "rev"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_grad_to_rev_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "grad"; + string targetUnitName = "rev"; + Measurement expected = new Measurement (Convert.ToDouble(0.0024999999975), "rev"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Revolutions" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_rev_to_rad_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "rev"; + string targetUnitName = "rad"; + Measurement expected = new Measurement (Convert.ToDouble(628.318530725441), "rad"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_rev_to_rad_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "rev"; + string targetUnitName = "rad"; + Measurement expected = new Measurement (Convert.ToDouble(6.28318530097123), "rad"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_rev_to_deg_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "rev"; + string targetUnitName = "deg"; + Measurement expected = new Measurement (Convert.ToDouble(36000), "deg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_rev_to_deg_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "rev"; + string targetUnitName = "deg"; + Measurement expected = new Measurement (Convert.ToDouble(359.99999964), "deg"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_rev_to_grad_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "rev"; + string targetUnitName = "grad"; + Measurement expected = new Measurement (Convert.ToDouble(40000), "grad"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_rev_to_grad_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "rev"; + string targetUnitName = "grad"; + Measurement expected = new Measurement (Convert.ToDouble(399.9999996), "grad"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #endregion + + #region "Volume Tests" + #region "Source as Cubic Inches" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in3_to_ft3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in3"; + string targetUnitName = "ft3"; + Measurement expected = new Measurement (Convert.ToDouble(0.05787037037037), "ft3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in3_to_ft3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in3"; + string targetUnitName = "ft3"; + Measurement expected = new Measurement (Convert.ToDouble(0.000578703703125), "ft3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in3_to_yd3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in3"; + string targetUnitName = "yd3"; + Measurement expected = new Measurement (Convert.ToDouble(0.002143347050754), "yd3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in3_to_yd3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in3"; + string targetUnitName = "yd3"; + Measurement expected = new Measurement (Convert.ToDouble(2.1433470486E-05), "yd3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in3_to_m3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in3"; + string targetUnitName = "m3"; + Measurement expected = new Measurement (Convert.ToDouble(0.0016387064), "m3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in3_to_m3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in3"; + string targetUnitName = "m3"; + Measurement expected = new Measurement (Convert.ToDouble(1.6387063984E-05), "m3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in3_to_cc_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in3"; + string targetUnitName = "cc"; + Measurement expected = new Measurement (Convert.ToDouble(1638.7064), "cc"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in3_to_cc_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in3"; + string targetUnitName = "cc"; + Measurement expected = new Measurement (Convert.ToDouble(16.387063983613), "cc"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in3_to_L_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in3"; + string targetUnitName = "L"; + Measurement expected = new Measurement (Convert.ToDouble(1.6387064), "L"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in3_to_L_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in3"; + string targetUnitName = "L"; + Measurement expected = new Measurement (Convert.ToDouble(0.016387063983613), "L"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in3_to_floz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in3"; + string targetUnitName = "fl oz"; + Measurement expected = new Measurement (Convert.ToDouble(55.4112554112554), "fl oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in3_to_floz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in3"; + string targetUnitName = "fl oz"; + Measurement expected = new Measurement (Convert.ToDouble(0.554112553558442), "fl oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in3_to_gal_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in3"; + string targetUnitName = "gal"; + Measurement expected = new Measurement (Convert.ToDouble(0.432900432900433), "gal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in3_to_gal_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in3"; + string targetUnitName = "gal"; + Measurement expected = new Measurement (Convert.ToDouble(0.004329004324675), "gal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in3_to_pt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in3"; + string targetUnitName = "pt"; + Measurement expected = new Measurement (Convert.ToDouble(3.46320346320346), "pt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in3_to_pt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in3"; + string targetUnitName = "pt"; + Measurement expected = new Measurement (Convert.ToDouble(0.034632034597403), "pt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in3_to_qt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in3"; + string targetUnitName = "qt"; + Measurement expected = new Measurement (Convert.ToDouble(1.73160173160173), "qt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in3_to_qt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in3"; + string targetUnitName = "qt"; + Measurement expected = new Measurement (Convert.ToDouble(0.017316017298701), "qt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Cubic Feet" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft3_to_in3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft3"; + string targetUnitName = "in3"; + Measurement expected = new Measurement (Convert.ToDouble(172800), "in3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft3_to_in3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft3"; + string targetUnitName = "in3"; + Measurement expected = new Measurement (Convert.ToDouble(1727.999998272), "in3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft3_to_yd3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft3"; + string targetUnitName = "yd3"; + Measurement expected = new Measurement (Convert.ToDouble(3.7037037037037), "yd3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft3_to_yd3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft3"; + string targetUnitName = "yd3"; + Measurement expected = new Measurement (Convert.ToDouble(0.037037037), "yd3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft3_to_m3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft3"; + string targetUnitName = "m3"; + Measurement expected = new Measurement (Convert.ToDouble(2.8316846592), "m3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft3_to_m3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft3"; + string targetUnitName = "m3"; + Measurement expected = new Measurement (Convert.ToDouble(0.028316846563683), "m3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft3_to_cc_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft3"; + string targetUnitName = "cc"; + Measurement expected = new Measurement (Convert.ToDouble(2831684.6592), "cc"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft3_to_cc_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft3"; + string targetUnitName = "cc"; + Measurement expected = new Measurement (Convert.ToDouble(28316.8465636832), "cc"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft3_to_L_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft3"; + string targetUnitName = "L"; + Measurement expected = new Measurement (Convert.ToDouble(2831.6846592), "L"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft3_to_L_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft3"; + string targetUnitName = "L"; + Measurement expected = new Measurement (Convert.ToDouble(28.3168465636832), "L"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft3_to_floz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft3"; + string targetUnitName = "fl oz"; + Measurement expected = new Measurement (Convert.ToDouble(95750.6493506493), "fl oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft3_to_floz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft3"; + string targetUnitName = "fl oz"; + Measurement expected = new Measurement (Convert.ToDouble(957.506492548987), "fl oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft3_to_gal_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft3"; + string targetUnitName = "gal"; + Measurement expected = new Measurement (Convert.ToDouble(748.051948051948), "gal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft3_to_gal_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft3"; + string targetUnitName = "gal"; + Measurement expected = new Measurement (Convert.ToDouble(7.48051947303896), "gal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft3_to_pt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft3"; + string targetUnitName = "pt"; + Measurement expected = new Measurement (Convert.ToDouble(5984.41558441558), "pt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft3_to_pt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft3"; + string targetUnitName = "pt"; + Measurement expected = new Measurement (Convert.ToDouble(59.8441557843117), "pt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft3_to_qt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft3"; + string targetUnitName = "qt"; + Measurement expected = new Measurement (Convert.ToDouble(2992.20779220779), "qt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft3_to_qt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft3"; + string targetUnitName = "qt"; + Measurement expected = new Measurement (Convert.ToDouble(29.9220778921558), "qt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Cubic Yards" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd3_to_in3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd3"; + string targetUnitName = "in3"; + Measurement expected = new Measurement (Convert.ToDouble(4665600), "in3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd3_to_in3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd3"; + string targetUnitName = "in3"; + Measurement expected = new Measurement (Convert.ToDouble(46655.999953344), "in3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd3_to_ft3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd3"; + string targetUnitName = "ft3"; + Measurement expected = new Measurement (Convert.ToDouble(2700), "ft3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd3_to_ft3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd3"; + string targetUnitName = "ft3"; + Measurement expected = new Measurement (Convert.ToDouble(26.999999973), "ft3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd3_to_m3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd3"; + string targetUnitName = "m3"; + Measurement expected = new Measurement (Convert.ToDouble(76.4554857984), "m3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd3_to_m3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd3"; + string targetUnitName = "m3"; + Measurement expected = new Measurement (Convert.ToDouble(0.764554857219445), "m3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd3_to_cc_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd3"; + string targetUnitName = "cc"; + Measurement expected = new Measurement (Convert.ToDouble(76455485.7984), "cc"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd3_to_cc_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd3"; + string targetUnitName = "cc"; + Measurement expected = new Measurement (Convert.ToDouble(764554.857219445), "cc"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd3_to_L_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd3"; + string targetUnitName = "L"; + Measurement expected = new Measurement (Convert.ToDouble(76455.4857984), "L"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd3_to_L_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd3"; + string targetUnitName = "L"; + Measurement expected = new Measurement (Convert.ToDouble(764.554857219445), "L"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd3_to_floz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd3"; + string targetUnitName = "fl oz"; + Measurement expected = new Measurement (Convert.ToDouble(2585267.53246753), "fl oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd3_to_floz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd3"; + string targetUnitName = "fl oz"; + Measurement expected = new Measurement (Convert.ToDouble(25852.6752988226), "fl oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd3_to_gal_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd3"; + string targetUnitName = "gal"; + Measurement expected = new Measurement (Convert.ToDouble(20197.4025974026), "gal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd3_to_gal_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd3"; + string targetUnitName = "gal"; + Measurement expected = new Measurement (Convert.ToDouble(201.974025772052), "gal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd3_to_pt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd3"; + string targetUnitName = "pt"; + Measurement expected = new Measurement (Convert.ToDouble(161579.220779221), "pt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd3_to_pt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd3"; + string targetUnitName = "pt"; + Measurement expected = new Measurement (Convert.ToDouble(1615.79220617642), "pt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd3_to_qt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd3"; + string targetUnitName = "qt"; + Measurement expected = new Measurement (Convert.ToDouble(80789.6103896104), "qt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd3_to_qt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd3"; + string targetUnitName = "qt"; + Measurement expected = new Measurement (Convert.ToDouble(807.896103088208), "qt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Cubic Meters" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m3_to_in3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m3"; + string targetUnitName = "in3"; + Measurement expected = new Measurement (Convert.ToDouble(6102374.40947323), "in3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m3_to_in3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m3"; + string targetUnitName = "in3"; + Measurement expected = new Measurement (Convert.ToDouble(61023.7440337085), "in3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m3_to_ft3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m3"; + string targetUnitName = "ft3"; + Measurement expected = new Measurement (Convert.ToDouble(3531.46667214886), "ft3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m3_to_ft3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m3"; + string targetUnitName = "ft3"; + Measurement expected = new Measurement (Convert.ToDouble(35.3146666861739), "ft3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m3_to_yd3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m3"; + string targetUnitName = "yd3"; + Measurement expected = new Measurement (Convert.ToDouble(130.795061931439), "yd3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m3_to_yd3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m3"; + string targetUnitName = "yd3"; + Measurement expected = new Measurement (Convert.ToDouble(1.30795061800644), "yd3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m3_to_cc_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m3"; + string targetUnitName = "cc"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "cc"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m3_to_cc_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m3"; + string targetUnitName = "cc"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "cc"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m3_to_L_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m3"; + string targetUnitName = "L"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "L"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m3_to_L_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m3"; + string targetUnitName = "L"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "L"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m3_to_floz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m3"; + string targetUnitName = "fl oz"; + Measurement expected = new Measurement (Convert.ToDouble(3381402.2701843), "fl oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m3_to_floz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m3"; + string targetUnitName = "fl oz"; + Measurement expected = new Measurement (Convert.ToDouble(33814.022668029), "fl oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m3_to_gal_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m3"; + string targetUnitName = "gal"; + Measurement expected = new Measurement (Convert.ToDouble(26417.2052358148), "gal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m3_to_gal_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m3"; + string targetUnitName = "gal"; + Measurement expected = new Measurement (Convert.ToDouble(264.172052093976), "gal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m3_to_pt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m3"; + string targetUnitName = "pt"; + Measurement expected = new Measurement (Convert.ToDouble(211337.641886519), "pt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m3_to_pt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m3"; + string targetUnitName = "pt"; + Measurement expected = new Measurement (Convert.ToDouble(2113.37641675181), "pt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m3_to_qt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m3"; + string targetUnitName = "qt"; + Measurement expected = new Measurement (Convert.ToDouble(105668.820943259), "qt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m3_to_qt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m3"; + string targetUnitName = "qt"; + Measurement expected = new Measurement (Convert.ToDouble(1056.68820837591), "qt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Cubic Centimeters" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cc_to_in3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cc"; + string targetUnitName = "in3"; + Measurement expected = new Measurement (Convert.ToDouble(6.10237440947323), "in3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cc_to_in3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cc"; + string targetUnitName = "in3"; + Measurement expected = new Measurement (Convert.ToDouble(0.061023744033709), "in3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cc_to_ft3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cc"; + string targetUnitName = "ft3"; + Measurement expected = new Measurement (Convert.ToDouble(0.003531466672149), "ft3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cc_to_ft3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cc"; + string targetUnitName = "ft3"; + Measurement expected = new Measurement (Convert.ToDouble(3.5314666686E-05), "ft3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cc_to_yd3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cc"; + string targetUnitName = "yd3"; + Measurement expected = new Measurement (Convert.ToDouble(0.000130795061931), "yd3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cc_to_yd3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cc"; + string targetUnitName = "yd3"; + Measurement expected = new Measurement (Convert.ToDouble(1.307950618E-06), "yd3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cc_to_m3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cc"; + string targetUnitName = "m3"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "m3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cc_to_m3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cc"; + string targetUnitName = "m3"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "m3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cc_to_L_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cc"; + string targetUnitName = "L"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "L"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cc_to_L_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cc"; + string targetUnitName = "L"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "L"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cc_to_floz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cc"; + string targetUnitName = "fl oz"; + Measurement expected = new Measurement (Convert.ToDouble(3.3814022701843), "fl oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cc_to_floz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cc"; + string targetUnitName = "fl oz"; + Measurement expected = new Measurement (Convert.ToDouble(0.033814022668029), "fl oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cc_to_gal_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cc"; + string targetUnitName = "gal"; + Measurement expected = new Measurement (Convert.ToDouble(0.026417205235815), "gal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cc_to_gal_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cc"; + string targetUnitName = "gal"; + Measurement expected = new Measurement (Convert.ToDouble(0.000264172052094), "gal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cc_to_pt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cc"; + string targetUnitName = "pt"; + Measurement expected = new Measurement (Convert.ToDouble(0.211337641886519), "pt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cc_to_pt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cc"; + string targetUnitName = "pt"; + Measurement expected = new Measurement (Convert.ToDouble(0.002113376416752), "pt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cc_to_qt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cc"; + string targetUnitName = "qt"; + Measurement expected = new Measurement (Convert.ToDouble(0.105668820943259), "qt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cc_to_qt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cc"; + string targetUnitName = "qt"; + Measurement expected = new Measurement (Convert.ToDouble(0.001056688208376), "qt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Liters" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_L_to_in3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "L"; + string targetUnitName = "in3"; + Measurement expected = new Measurement (Convert.ToDouble(6102.37440947323), "in3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_L_to_in3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "L"; + string targetUnitName = "in3"; + Measurement expected = new Measurement (Convert.ToDouble(61.0237440337085), "in3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_L_to_ft3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "L"; + string targetUnitName = "ft3"; + Measurement expected = new Measurement (Convert.ToDouble(3.53146667214886), "ft3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_L_to_ft3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "L"; + string targetUnitName = "ft3"; + Measurement expected = new Measurement (Convert.ToDouble(0.035314666686174), "ft3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_L_to_yd3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "L"; + string targetUnitName = "yd3"; + Measurement expected = new Measurement (Convert.ToDouble(0.130795061931439), "yd3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_L_to_yd3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "L"; + string targetUnitName = "yd3"; + Measurement expected = new Measurement (Convert.ToDouble(0.001307950618006), "yd3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_L_to_m3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "L"; + string targetUnitName = "m3"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "m3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_L_to_m3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "L"; + string targetUnitName = "m3"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "m3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_L_to_cc_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "L"; + string targetUnitName = "cc"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "cc"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_L_to_cc_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "L"; + string targetUnitName = "cc"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "cc"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_L_to_floz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "L"; + string targetUnitName = "fl oz"; + Measurement expected = new Measurement (Convert.ToDouble(3381.4022701843), "fl oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_L_to_floz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "L"; + string targetUnitName = "fl oz"; + Measurement expected = new Measurement (Convert.ToDouble(33.814022668029), "fl oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_L_to_gal_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "L"; + string targetUnitName = "gal"; + Measurement expected = new Measurement (Convert.ToDouble(26.4172052358148), "gal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_L_to_gal_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "L"; + string targetUnitName = "gal"; + Measurement expected = new Measurement (Convert.ToDouble(0.264172052093976), "gal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_L_to_pt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "L"; + string targetUnitName = "pt"; + Measurement expected = new Measurement (Convert.ToDouble(211.337641886519), "pt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_L_to_pt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "L"; + string targetUnitName = "pt"; + Measurement expected = new Measurement (Convert.ToDouble(2.11337641675181), "pt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_L_to_qt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "L"; + string targetUnitName = "qt"; + Measurement expected = new Measurement (Convert.ToDouble(105.668820943259), "qt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_L_to_qt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "L"; + string targetUnitName = "qt"; + Measurement expected = new Measurement (Convert.ToDouble(1.05668820837591), "qt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Fluid Ounces" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_floz_to_in3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "fl oz"; + string targetUnitName = "in3"; + Measurement expected = new Measurement (Convert.ToDouble(180.46875), "in3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_floz_to_in3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "fl oz"; + string targetUnitName = "in3"; + Measurement expected = new Measurement (Convert.ToDouble(1.80468749819531), "in3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_floz_to_ft3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "fl oz"; + string targetUnitName = "ft3"; + Measurement expected = new Measurement (Convert.ToDouble(0.104437934027778), "ft3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_floz_to_ft3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "fl oz"; + string targetUnitName = "ft3"; + Measurement expected = new Measurement (Convert.ToDouble(0.001044379339233), "ft3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_floz_to_yd3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "fl oz"; + string targetUnitName = "yd3"; + Measurement expected = new Measurement (Convert.ToDouble(0.003868071630658), "yd3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_floz_to_yd3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "fl oz"; + string targetUnitName = "yd3"; + Measurement expected = new Measurement (Convert.ToDouble(3.8680716268E-05), "yd3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_floz_to_m3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "fl oz"; + string targetUnitName = "m3"; + Measurement expected = new Measurement (Convert.ToDouble(0.00295735295625), "m3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_floz_to_m3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "fl oz"; + string targetUnitName = "m3"; + Measurement expected = new Measurement (Convert.ToDouble(2.9573529533E-05), "m3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_floz_to_cc_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "fl oz"; + string targetUnitName = "cc"; + Measurement expected = new Measurement (Convert.ToDouble(2957.35295625), "cc"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_floz_to_cc_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "fl oz"; + string targetUnitName = "cc"; + Measurement expected = new Measurement (Convert.ToDouble(29.5735295329265), "cc"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_floz_to_L_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "fl oz"; + string targetUnitName = "L"; + Measurement expected = new Measurement (Convert.ToDouble(2.95735295625), "L"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_floz_to_L_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "fl oz"; + string targetUnitName = "L"; + Measurement expected = new Measurement (Convert.ToDouble(0.029573529532926), "L"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_floz_to_gal_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "fl oz"; + string targetUnitName = "gal"; + Measurement expected = new Measurement (Convert.ToDouble(0.78125), "gal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_floz_to_gal_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "fl oz"; + string targetUnitName = "gal"; + Measurement expected = new Measurement (Convert.ToDouble(0.007812499992188), "gal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_floz_to_pt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "fl oz"; + string targetUnitName = "pt"; + Measurement expected = new Measurement (Convert.ToDouble(6.25), "pt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_floz_to_pt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "fl oz"; + string targetUnitName = "pt"; + Measurement expected = new Measurement (Convert.ToDouble(0.0624999999375), "pt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_floz_to_qt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "fl oz"; + string targetUnitName = "qt"; + Measurement expected = new Measurement (Convert.ToDouble(3.125), "qt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_floz_to_qt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "fl oz"; + string targetUnitName = "qt"; + Measurement expected = new Measurement (Convert.ToDouble(0.03124999996875), "qt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Gallons" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_gal_to_in3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "gal"; + string targetUnitName = "in3"; + Measurement expected = new Measurement (Convert.ToDouble(23100), "in3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_gal_to_in3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "gal"; + string targetUnitName = "in3"; + Measurement expected = new Measurement (Convert.ToDouble(230.999999769), "in3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_gal_to_ft3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "gal"; + string targetUnitName = "ft3"; + Measurement expected = new Measurement (Convert.ToDouble(13.3680555555556), "ft3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_gal_to_ft3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "gal"; + string targetUnitName = "ft3"; + Measurement expected = new Measurement (Convert.ToDouble(0.133680555421875), "ft3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_gal_to_yd3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "gal"; + string targetUnitName = "yd3"; + Measurement expected = new Measurement (Convert.ToDouble(0.49511316872428), "yd3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_gal_to_yd3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "gal"; + string targetUnitName = "yd3"; + Measurement expected = new Measurement (Convert.ToDouble(0.004951131682292), "yd3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_gal_to_m3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "gal"; + string targetUnitName = "m3"; + Measurement expected = new Measurement (Convert.ToDouble(0.3785411784), "m3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_gal_to_m3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "gal"; + string targetUnitName = "m3"; + Measurement expected = new Measurement (Convert.ToDouble(0.003785411780215), "m3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_gal_to_cc_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "gal"; + string targetUnitName = "cc"; + Measurement expected = new Measurement (Convert.ToDouble(378541.1784), "cc"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_gal_to_cc_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "gal"; + string targetUnitName = "cc"; + Measurement expected = new Measurement (Convert.ToDouble(3785.41178021459), "cc"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_gal_to_L_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "gal"; + string targetUnitName = "L"; + Measurement expected = new Measurement (Convert.ToDouble(378.5411784), "L"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_gal_to_L_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "gal"; + string targetUnitName = "L"; + Measurement expected = new Measurement (Convert.ToDouble(3.78541178021459), "L"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_gal_to_floz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "gal"; + string targetUnitName = "fl oz"; + Measurement expected = new Measurement (Convert.ToDouble(12800), "fl oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_gal_to_floz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "gal"; + string targetUnitName = "fl oz"; + Measurement expected = new Measurement (Convert.ToDouble(127.999999872), "fl oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_gal_to_pt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "gal"; + string targetUnitName = "pt"; + Measurement expected = new Measurement (Convert.ToDouble(800), "pt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_gal_to_pt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "gal"; + string targetUnitName = "pt"; + Measurement expected = new Measurement (Convert.ToDouble(7.999999992), "pt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_gal_to_qt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "gal"; + string targetUnitName = "qt"; + Measurement expected = new Measurement (Convert.ToDouble(400), "qt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_gal_to_qt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "gal"; + string targetUnitName = "qt"; + Measurement expected = new Measurement (Convert.ToDouble(3.999999996), "qt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Pints" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_pt_to_in3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "pt"; + string targetUnitName = "in3"; + Measurement expected = new Measurement (Convert.ToDouble(2887.5), "in3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_pt_to_in3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "pt"; + string targetUnitName = "in3"; + Measurement expected = new Measurement (Convert.ToDouble(28.874999971125), "in3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_pt_to_ft3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "pt"; + string targetUnitName = "ft3"; + Measurement expected = new Measurement (Convert.ToDouble(1.67100694444444), "ft3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_pt_to_ft3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "pt"; + string targetUnitName = "ft3"; + Measurement expected = new Measurement (Convert.ToDouble(0.016710069427734), "ft3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_pt_to_yd3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "pt"; + string targetUnitName = "yd3"; + Measurement expected = new Measurement (Convert.ToDouble(0.061889146090535), "yd3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_pt_to_yd3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "pt"; + string targetUnitName = "yd3"; + Measurement expected = new Measurement (Convert.ToDouble(0.000618891460286), "yd3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_pt_to_m3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "pt"; + string targetUnitName = "m3"; + Measurement expected = new Measurement (Convert.ToDouble(0.0473176473), "m3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_pt_to_m3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "pt"; + string targetUnitName = "m3"; + Measurement expected = new Measurement (Convert.ToDouble(0.000473176472527), "m3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_pt_to_cc_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "pt"; + string targetUnitName = "cc"; + Measurement expected = new Measurement (Convert.ToDouble(47317.6473), "cc"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_pt_to_cc_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "pt"; + string targetUnitName = "cc"; + Measurement expected = new Measurement (Convert.ToDouble(473.176472526824), "cc"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_pt_to_L_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "pt"; + string targetUnitName = "L"; + Measurement expected = new Measurement (Convert.ToDouble(47.3176473), "L"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_pt_to_L_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "pt"; + string targetUnitName = "L"; + Measurement expected = new Measurement (Convert.ToDouble(0.473176472526824), "L"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_pt_to_floz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "pt"; + string targetUnitName = "fl oz"; + Measurement expected = new Measurement (Convert.ToDouble(1600), "fl oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_pt_to_floz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "pt"; + string targetUnitName = "fl oz"; + Measurement expected = new Measurement (Convert.ToDouble(15.999999984), "fl oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_pt_to_gal_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "pt"; + string targetUnitName = "gal"; + Measurement expected = new Measurement (Convert.ToDouble(12.5), "gal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_pt_to_gal_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "pt"; + string targetUnitName = "gal"; + Measurement expected = new Measurement (Convert.ToDouble(0.124999999875), "gal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_pt_to_qt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "pt"; + string targetUnitName = "qt"; + Measurement expected = new Measurement (Convert.ToDouble(50), "qt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_pt_to_qt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "pt"; + string targetUnitName = "qt"; + Measurement expected = new Measurement (Convert.ToDouble(0.4999999995), "qt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Quarts" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_qt_to_in3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "qt"; + string targetUnitName = "in3"; + Measurement expected = new Measurement (Convert.ToDouble(5775), "in3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_qt_to_in3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "qt"; + string targetUnitName = "in3"; + Measurement expected = new Measurement (Convert.ToDouble(57.74999994225), "in3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_qt_to_ft3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "qt"; + string targetUnitName = "ft3"; + Measurement expected = new Measurement (Convert.ToDouble(3.34201388888889), "ft3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_qt_to_ft3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "qt"; + string targetUnitName = "ft3"; + Measurement expected = new Measurement (Convert.ToDouble(0.033420138855469), "ft3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_qt_to_yd3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "qt"; + string targetUnitName = "yd3"; + Measurement expected = new Measurement (Convert.ToDouble(0.12377829218107), "yd3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_qt_to_yd3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "qt"; + string targetUnitName = "yd3"; + Measurement expected = new Measurement (Convert.ToDouble(0.001237782920573), "yd3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_qt_to_m3_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "qt"; + string targetUnitName = "m3"; + Measurement expected = new Measurement (Convert.ToDouble(0.0946352946), "m3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_qt_to_m3_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "qt"; + string targetUnitName = "m3"; + Measurement expected = new Measurement (Convert.ToDouble(0.000946352945054), "m3"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_qt_to_cc_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "qt"; + string targetUnitName = "cc"; + Measurement expected = new Measurement (Convert.ToDouble(94635.2946), "cc"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_qt_to_cc_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "qt"; + string targetUnitName = "cc"; + Measurement expected = new Measurement (Convert.ToDouble(946.352945053647), "cc"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_qt_to_L_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "qt"; + string targetUnitName = "L"; + Measurement expected = new Measurement (Convert.ToDouble(94.6352946), "L"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_qt_to_L_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "qt"; + string targetUnitName = "L"; + Measurement expected = new Measurement (Convert.ToDouble(0.946352945053647), "L"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_qt_to_floz_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "qt"; + string targetUnitName = "fl oz"; + Measurement expected = new Measurement (Convert.ToDouble(3200), "fl oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_qt_to_floz_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "qt"; + string targetUnitName = "fl oz"; + Measurement expected = new Measurement (Convert.ToDouble(31.999999968), "fl oz"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_qt_to_gal_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "qt"; + string targetUnitName = "gal"; + Measurement expected = new Measurement (Convert.ToDouble(25), "gal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_qt_to_gal_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "qt"; + string targetUnitName = "gal"; + Measurement expected = new Measurement (Convert.ToDouble(0.24999999975), "gal"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_qt_to_pt_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "qt"; + string targetUnitName = "pt"; + Measurement expected = new Measurement (Convert.ToDouble(200), "pt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_qt_to_pt_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "qt"; + string targetUnitName = "pt"; + Measurement expected = new Measurement (Convert.ToDouble(1.999999998), "pt"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + #endregion + #endregion + } +} diff --git a/Cubico.Tests/UnitConverterTest4.cs b/Cubico.Tests/UnitConverterTest4.cs new file mode 100644 index 0000000..bd6336f --- /dev/null +++ b/Cubico.Tests/UnitConverterTest4.cs @@ -0,0 +1,2949 @@ +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Cubico; + +namespace Cubico.Tests +{ + [TestClass()] + public class UnitConverterTest4 + { + private TestContext testContextInstance; + private UnitProvider unitPro = new UnitProvider (); + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext { + get { return testContextInstance; } + set { testContextInstance = value; } + } + #region "Additional test attributes" + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + // _ _ + //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) + //End Sub + // + //Use ClassCleanup to run code after all tests in a class have run + // _ _ + //Public Shared Sub MyClassCleanup() + //End Sub + // + //Use TestInitialize to run code before running each test + // _ _ + //Public Sub MyTestInitialize() + //End Sub + // + //Use TestCleanup to run code after each test has run + // _ _ + //Public Sub MyTestCleanup() + //End Sub + // + + #endregion + + #region "UnitConverter.ConvertUnits" + + #region "Area Tests" + #region "Source as Square Meters" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m2_to_ft2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m2"; + string targetUnitName = "ft2"; + Measurement expected = new Measurement (Convert.ToDouble(1076.39104167097), "ft2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m2_to_ft2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m2"; + string targetUnitName = "ft2"; + Measurement expected = new Measurement (Convert.ToDouble(10.7639104059458), "ft2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m2_to_mi2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m2"; + string targetUnitName = "mi2"; + Measurement expected = new Measurement (Convert.ToDouble(3.8610215854E-05), "mi2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m2_to_mi2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m2"; + string targetUnitName = "mi2"; + Measurement expected = new Measurement (Convert.ToDouble(3.86102158E-07), "mi2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m2_to_acre_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m2"; + string targetUnitName = "acre"; + Measurement expected = new Measurement (Convert.ToDouble(0.024710538146717), "acre"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m2_to_acre_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m2"; + string targetUnitName = "acre"; + Measurement expected = new Measurement (Convert.ToDouble(0.00024710538122), "acre"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m2_to_in2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m2"; + string targetUnitName = "in2"; + Measurement expected = new Measurement (Convert.ToDouble(155000.31000062), "in2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m2_to_in2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m2"; + string targetUnitName = "in2"; + Measurement expected = new Measurement (Convert.ToDouble(1550.0030984562), "in2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m2_to_cm2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m2"; + string targetUnitName = "cm2"; + Measurement expected = new Measurement (Convert.ToDouble(1000000), "cm2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m2_to_cm2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m2"; + string targetUnitName = "cm2"; + Measurement expected = new Measurement (Convert.ToDouble(9999.99999), "cm2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m2_to_yd2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m2"; + string targetUnitName = "yd2"; + Measurement expected = new Measurement (Convert.ToDouble(119.599004630108), "yd2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m2_to_yd2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m2"; + string targetUnitName = "yd2"; + Measurement expected = new Measurement (Convert.ToDouble(1.19599004510509), "yd2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m2_to_km2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m2"; + string targetUnitName = "km2"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "km2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m2_to_km2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m2"; + string targetUnitName = "km2"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "km2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m2_to_ha_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "m2"; + string targetUnitName = "ha"; + Measurement expected = new Measurement (Convert.ToDouble(0.01), "ha"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_m2_to_ha_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "m2"; + string targetUnitName = "ha"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-05), "ha"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Square Feet" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft2_to_m2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft2"; + string targetUnitName = "m2"; + Measurement expected = new Measurement (Convert.ToDouble(9.290304), "m2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft2_to_m2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft2"; + string targetUnitName = "m2"; + Measurement expected = new Measurement (Convert.ToDouble(0.092903039907097), "m2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft2_to_mi2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft2"; + string targetUnitName = "mi2"; + Measurement expected = new Measurement (Convert.ToDouble(3.587006428E-06), "mi2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft2_to_mi2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft2"; + string targetUnitName = "mi2"; + Measurement expected = new Measurement (Convert.ToDouble(3.5870064E-08), "mi2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft2_to_acre_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft2"; + string targetUnitName = "acre"; + Measurement expected = new Measurement (Convert.ToDouble(0.002295684113866), "acre"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft2_to_acre_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft2"; + string targetUnitName = "acre"; + Measurement expected = new Measurement (Convert.ToDouble(2.2956841116E-05), "acre"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft2_to_in2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft2"; + string targetUnitName = "in2"; + Measurement expected = new Measurement (Convert.ToDouble(14400), "in2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft2_to_in2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft2"; + string targetUnitName = "in2"; + Measurement expected = new Measurement (Convert.ToDouble(143.999999856), "in2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft2_to_cm2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft2"; + string targetUnitName = "cm2"; + Measurement expected = new Measurement (Convert.ToDouble(92903.04), "cm2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft2_to_cm2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft2"; + string targetUnitName = "cm2"; + Measurement expected = new Measurement (Convert.ToDouble(929.03039907097), "cm2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft2_to_yd2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft2"; + string targetUnitName = "yd2"; + Measurement expected = new Measurement (Convert.ToDouble(11.1111111111111), "yd2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft2_to_yd2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft2"; + string targetUnitName = "yd2"; + Measurement expected = new Measurement (Convert.ToDouble(0.111111111), "yd2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft2_to_km2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft2"; + string targetUnitName = "km2"; + Measurement expected = new Measurement (Convert.ToDouble(9.290304E-06), "km2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft2_to_km2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft2"; + string targetUnitName = "km2"; + Measurement expected = new Measurement (Convert.ToDouble(9.290304E-08), "km2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft2_to_ha_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ft2"; + string targetUnitName = "ha"; + Measurement expected = new Measurement (Convert.ToDouble(0.0009290304), "ha"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ft2_to_ha_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ft2"; + string targetUnitName = "ha"; + Measurement expected = new Measurement (Convert.ToDouble(9.290303991E-06), "ha"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Square Miles" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mi2_to_m2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi2"; + string targetUnitName = "m2"; + Measurement expected = new Measurement (Convert.ToDouble(258998811.0336), "m2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mi2_to_m2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi2"; + string targetUnitName = "m2"; + Measurement expected = new Measurement (Convert.ToDouble(2589988.10774601), "m2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mi2_to_ft2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi2"; + string targetUnitName = "ft2"; + Measurement expected = new Measurement (Convert.ToDouble(2787840000L), "ft2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mi2_to_ft2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi2"; + string targetUnitName = "ft2"; + Measurement expected = new Measurement (Convert.ToDouble(27878399.9721216), "ft2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mi2_to_acre_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi2"; + string targetUnitName = "acre"; + Measurement expected = new Measurement (Convert.ToDouble(64000), "acre"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mi2_to_acre_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi2"; + string targetUnitName = "acre"; + Measurement expected = new Measurement (Convert.ToDouble(639.99999936), "acre"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mi2_to_in2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi2"; + string targetUnitName = "in2"; + Measurement expected = new Measurement (Convert.ToDouble(401448960000L), "in2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mi2_to_in2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi2"; + string targetUnitName = "in2"; + Measurement expected = new Measurement (Convert.ToDouble(4014489595.98551), "in2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mi2_to_cm2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi2"; + string targetUnitName = "cm2"; + Measurement expected = new Measurement (Convert.ToDouble(2589988110336L), "cm2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mi2_to_cm2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi2"; + string targetUnitName = "cm2"; + Measurement expected = new Measurement (Convert.ToDouble(25899881077.46), "cm2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mi2_to_yd2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi2"; + string targetUnitName = "yd2"; + Measurement expected = new Measurement (Convert.ToDouble(309760000), "yd2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mi2_to_yd2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi2"; + string targetUnitName = "yd2"; + Measurement expected = new Measurement (Convert.ToDouble(3097599.9969024), "yd2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mi2_to_km2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi2"; + string targetUnitName = "km2"; + Measurement expected = new Measurement (Convert.ToDouble(258.9988110336), "km2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mi2_to_km2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi2"; + string targetUnitName = "km2"; + Measurement expected = new Measurement (Convert.ToDouble(2.589988107746), "km2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mi2_to_ha_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mi2"; + string targetUnitName = "ha"; + Measurement expected = new Measurement (Convert.ToDouble(25899.88110336), "ha"); + //should be 25899.88110336, .net conversion bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mi2_to_ha_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mi2"; + string targetUnitName = "ha"; + Measurement expected = new Measurement (Convert.ToDouble(258.998810774601), "ha"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Acres" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_acre_to_m2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "acre"; + string targetUnitName = "m2"; + Measurement expected = new Measurement (Convert.ToDouble(404685.64224), "m2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_acre_to_m2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "acre"; + string targetUnitName = "m2"; + Measurement expected = new Measurement (Convert.ToDouble(4046.85641835314), "m2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_acre_to_ft2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "acre"; + string targetUnitName = "ft2"; + Measurement expected = new Measurement (Convert.ToDouble(4356000), "ft2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_acre_to_ft2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "acre"; + string targetUnitName = "ft2"; + Measurement expected = new Measurement (Convert.ToDouble(43559.99995644), "ft2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_acre_to_mi2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "acre"; + string targetUnitName = "mi2"; + Measurement expected = new Measurement (Convert.ToDouble(0.15625), "mi2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_acre_to_mi2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "acre"; + string targetUnitName = "mi2"; + Measurement expected = new Measurement (Convert.ToDouble(0.001562499998438), "mi2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_acre_to_in2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "acre"; + string targetUnitName = "in2"; + Measurement expected = new Measurement (Convert.ToDouble(627264000), "in2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_acre_to_in2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "acre"; + string targetUnitName = "in2"; + Measurement expected = new Measurement (Convert.ToDouble(6272639.99372736), "in2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_acre_to_cm2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "acre"; + string targetUnitName = "cm2"; + Measurement expected = new Measurement (Convert.ToDouble(4046856422.4), "cm2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_acre_to_cm2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "acre"; + string targetUnitName = "cm2"; + Measurement expected = new Measurement (Convert.ToDouble(40468564.1835314), "cm2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_acre_to_yd2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "acre"; + string targetUnitName = "yd2"; + Measurement expected = new Measurement (Convert.ToDouble(484000), "yd2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_acre_to_yd2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "acre"; + string targetUnitName = "yd2"; + Measurement expected = new Measurement (Convert.ToDouble(4839.99999516), "yd2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_acre_to_km2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "acre"; + string targetUnitName = "km2"; + Measurement expected = new Measurement (Convert.ToDouble(0.40468564224), "km2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_acre_to_km2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "acre"; + string targetUnitName = "km2"; + Measurement expected = new Measurement (Convert.ToDouble(0.004046856418353), "km2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_acre_to_ha_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "acre"; + string targetUnitName = "ha"; + Measurement expected = new Measurement (Convert.ToDouble(40.468564224), "ha"); + //should be 40.468564224, .net conversion bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_acre_to_ha_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "acre"; + string targetUnitName = "ha"; + Measurement expected = new Measurement (Convert.ToDouble(0.404685641835314), "ha"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Square Inches" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in2_to_m2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in2"; + string targetUnitName = "m2"; + Measurement expected = new Measurement (Convert.ToDouble(0.064516), "m2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in2_to_m2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in2"; + string targetUnitName = "m2"; + Measurement expected = new Measurement (Convert.ToDouble(0.000645159999355), "m2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in2_to_ft2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in2"; + string targetUnitName = "ft2"; + Measurement expected = new Measurement (Convert.ToDouble(0.694444444444444), "ft2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in2_to_ft2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in2"; + string targetUnitName = "ft2"; + Measurement expected = new Measurement (Convert.ToDouble(0.0069444444375), "ft2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in2_to_mi2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in2"; + string targetUnitName = "mi2"; + Measurement expected = new Measurement (Convert.ToDouble(2.4909767E-08), "mi2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in2_to_mi2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in2"; + string targetUnitName = "mi2"; + Measurement expected = new Measurement (Convert.ToDouble(2.49098E-10), "mi2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in2_to_acre_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in2"; + string targetUnitName = "acre"; + Measurement expected = new Measurement (Convert.ToDouble(1.5942250791E-05), "acre"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in2_to_acre_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in2"; + string targetUnitName = "acre"; + Measurement expected = new Measurement (Convert.ToDouble(1.59422508E-07), "acre"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in2_to_cm2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in2"; + string targetUnitName = "cm2"; + Measurement expected = new Measurement (Convert.ToDouble(645.16), "cm2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in2_to_cm2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in2"; + string targetUnitName = "cm2"; + Measurement expected = new Measurement (Convert.ToDouble(6.4515999935484), "cm2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in2_to_yd2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in2"; + string targetUnitName = "yd2"; + Measurement expected = new Measurement (Convert.ToDouble(0.07716049382716), "yd2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in2_to_yd2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in2"; + string targetUnitName = "yd2"; + Measurement expected = new Measurement (Convert.ToDouble(0.0007716049375), "yd2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in2_to_km2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in2"; + string targetUnitName = "km2"; + Measurement expected = new Measurement (Convert.ToDouble(6.4516E-08), "km2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in2_to_km2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in2"; + string targetUnitName = "km2"; + Measurement expected = new Measurement (Convert.ToDouble(6.4516E-10), "km2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in2_to_ha_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "in2"; + string targetUnitName = "ha"; + Measurement expected = new Measurement (Convert.ToDouble(6.4516E-06), "ha"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_in2_to_ha_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "in2"; + string targetUnitName = "ha"; + Measurement expected = new Measurement (Convert.ToDouble(6.4516E-08), "ha"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Square Centimeters" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm2_to_ft2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm2"; + string targetUnitName = "ft2"; + Measurement expected = new Measurement (Convert.ToDouble(0.107639104167097), "ft2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm2_to_ft2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm2"; + string targetUnitName = "ft2"; + Measurement expected = new Measurement (Convert.ToDouble(0.001076391040595), "ft2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm2_to_mi2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm2"; + string targetUnitName = "mi2"; + Measurement expected = new Measurement (Convert.ToDouble(3.861022E-09), "mi2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm2_to_mi2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm2"; + string targetUnitName = "mi2"; + Measurement expected = new Measurement (Convert.ToDouble(3.861E-11), "mi2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm2_to_acre_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm2"; + string targetUnitName = "acre"; + Measurement expected = new Measurement (Convert.ToDouble(2.471053815E-06), "acre"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm2_to_acre_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm2"; + string targetUnitName = "acre"; + Measurement expected = new Measurement (Convert.ToDouble(2.4710538E-08), "acre"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm2_to_in2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm2"; + string targetUnitName = "in2"; + Measurement expected = new Measurement (Convert.ToDouble(15.500031000062), "in2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm2_to_in2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm2"; + string targetUnitName = "in2"; + Measurement expected = new Measurement (Convert.ToDouble(0.15500030984562), "in2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm2_to_m2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm2"; + string targetUnitName = "m2"; + Measurement expected = new Measurement (Convert.ToDouble(0.01), "m2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm2_to_m2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm2"; + string targetUnitName = "m2"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-05), "m2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm2_to_yd2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm2"; + string targetUnitName = "yd2"; + Measurement expected = new Measurement (Convert.ToDouble(0.011959900463011), "yd2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm2_to_yd2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm2"; + string targetUnitName = "yd2"; + Measurement expected = new Measurement (Convert.ToDouble(0.000119599004511), "yd2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm2_to_km2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm2"; + string targetUnitName = "km2"; + Measurement expected = new Measurement (Convert.ToDouble(1E-08), "km2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm2_to_km2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm2"; + string targetUnitName = "km2"; + Measurement expected = new Measurement (Convert.ToDouble(1E-10), "km2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm2_to_ha_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cm2"; + string targetUnitName = "ha"; + Measurement expected = new Measurement (Convert.ToDouble(1E-06), "ha"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cm2_to_ha_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cm2"; + string targetUnitName = "ha"; + Measurement expected = new Measurement (Convert.ToDouble(1E-08), "ha"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Square Yards" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd2_to_m2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd2"; + string targetUnitName = "m2"; + Measurement expected = new Measurement (Convert.ToDouble(83.612736), "m2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd2_to_m2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd2"; + string targetUnitName = "m2"; + Measurement expected = new Measurement (Convert.ToDouble(0.836127359163873), "m2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd2_to_ft2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd2"; + string targetUnitName = "ft2"; + Measurement expected = new Measurement (Convert.ToDouble(900), "ft2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd2_to_ft2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd2"; + string targetUnitName = "ft2"; + Measurement expected = new Measurement (Convert.ToDouble(8.999999991), "ft2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd2_to_mi2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd2"; + string targetUnitName = "mi2"; + Measurement expected = new Measurement (Convert.ToDouble(3.2283057851E-05), "mi2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd2_to_mi2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd2"; + string targetUnitName = "mi2"; + Measurement expected = new Measurement (Convert.ToDouble(3.22830578E-07), "mi2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd2_to_acre_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd2"; + string targetUnitName = "acre"; + Measurement expected = new Measurement (Convert.ToDouble(0.020661157024793), "acre"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd2_to_acre_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd2"; + string targetUnitName = "acre"; + Measurement expected = new Measurement (Convert.ToDouble(0.000206611570041), "acre"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd2_to_in2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd2"; + string targetUnitName = "in2"; + Measurement expected = new Measurement (Convert.ToDouble(129600), "in2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd2_to_in2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd2"; + string targetUnitName = "in2"; + Measurement expected = new Measurement (Convert.ToDouble(1295.999998704), "in2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd2_to_cm2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd2"; + string targetUnitName = "cm2"; + Measurement expected = new Measurement (Convert.ToDouble(836127.36), "cm2"); + //should be 836127.36, .net conversion bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd2_to_cm2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd2"; + string targetUnitName = "cm2"; + Measurement expected = new Measurement (Convert.ToDouble(8361.27359163873), "cm2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd2_to_km2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd2"; + string targetUnitName = "km2"; + Measurement expected = new Measurement (Convert.ToDouble(8.3612736E-05), "km2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd2_to_km2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd2"; + string targetUnitName = "km2"; + Measurement expected = new Measurement (Convert.ToDouble(8.36127359E-07), "km2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd2_to_ha_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "yd2"; + string targetUnitName = "ha"; + Measurement expected = new Measurement (Convert.ToDouble(0.0083612736), "ha"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_yd2_to_ha_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "yd2"; + string targetUnitName = "ha"; + Measurement expected = new Measurement (Convert.ToDouble(8.3612735916E-05), "ha"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Square Kilometers" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km2_to_m2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km2"; + string targetUnitName = "m2"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "m2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km2_to_m2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km2"; + string targetUnitName = "m2"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "m2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km2_to_ft2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km2"; + string targetUnitName = "ft2"; + Measurement expected = new Measurement (Convert.ToDouble(1076391041.67097), "ft2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km2_to_ft2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km2"; + string targetUnitName = "ft2"; + Measurement expected = new Measurement (Convert.ToDouble(10763910.4059458), "ft2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km2_to_mi2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km2"; + string targetUnitName = "mi2"; + Measurement expected = new Measurement (Convert.ToDouble(38.6102158542446), "mi2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km2_to_mi2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km2"; + string targetUnitName = "mi2"; + Measurement expected = new Measurement (Convert.ToDouble(0.386102158156344), "mi2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km2_to_acre_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km2"; + string targetUnitName = "acre"; + Measurement expected = new Measurement (Convert.ToDouble(24710.5381467165), "acre"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km2_to_acre_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km2"; + string targetUnitName = "acre"; + Measurement expected = new Measurement (Convert.ToDouble(247.10538122006), "acre"); + //should be 247.10538122006, .net conversion bug + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km2_to_in2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km2"; + string targetUnitName = "in2"; + Measurement expected = new Measurement (Convert.ToDouble(155000310000.62), "in2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km2_to_in2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km2"; + string targetUnitName = "in2"; + Measurement expected = new Measurement (Convert.ToDouble(1550003098.4562), "in2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km2_to_cm2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km2"; + string targetUnitName = "cm2"; + Measurement expected = new Measurement (Convert.ToDouble(1000000000000L), "cm2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km2_to_cm2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km2"; + string targetUnitName = "cm2"; + Measurement expected = new Measurement (Convert.ToDouble(9999999990L), "cm2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km2_to_yd2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km2"; + string targetUnitName = "yd2"; + Measurement expected = new Measurement (Convert.ToDouble(119599004.630108), "yd2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km2_to_yd2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km2"; + string targetUnitName = "yd2"; + Measurement expected = new Measurement (Convert.ToDouble(1195990.04510509), "yd2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km2_to_ha_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "km2"; + string targetUnitName = "ha"; + Measurement expected = new Measurement (Convert.ToDouble(10000), "ha"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_km2_to_ha_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "km2"; + string targetUnitName = "ha"; + Measurement expected = new Measurement (Convert.ToDouble(99.9999999), "ha"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Hectares" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ha_to_m2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ha"; + string targetUnitName = "m2"; + Measurement expected = new Measurement (Convert.ToDouble(1000000.0), "m2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ha_to_m2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ha"; + string targetUnitName = "m2"; + Measurement expected = new Measurement (Convert.ToDouble(9999.99999), "m2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ha_to_ft2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ha"; + string targetUnitName = "ft2"; + Measurement expected = new Measurement (Convert.ToDouble(10763910.4167097), "ft2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ha_to_ft2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ha"; + string targetUnitName = "ft2"; + Measurement expected = new Measurement (Convert.ToDouble(107639.104059458), "ft2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ha_to_mi2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ha"; + string targetUnitName = "mi2"; + Measurement expected = new Measurement (Convert.ToDouble(0.386102158542446), "mi2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ha_to_mi2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ha"; + string targetUnitName = "mi2"; + Measurement expected = new Measurement (Convert.ToDouble(0.003861021581563), "mi2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ha_to_acre_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ha"; + string targetUnitName = "acre"; + Measurement expected = new Measurement (Convert.ToDouble(247.105381467165), "acre"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ha_to_acre_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ha"; + string targetUnitName = "acre"; + Measurement expected = new Measurement (Convert.ToDouble(2.4710538122006), "acre"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ha_to_in2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ha"; + string targetUnitName = "in2"; + Measurement expected = new Measurement (Convert.ToDouble(1550003100.0062), "in2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ha_to_in2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ha"; + string targetUnitName = "in2"; + Measurement expected = new Measurement (Convert.ToDouble(15500030.984562), "in2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ha_to_cm2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ha"; + string targetUnitName = "cm2"; + Measurement expected = new Measurement (Convert.ToDouble(10000000000L), "cm2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ha_to_cm2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ha"; + string targetUnitName = "cm2"; + Measurement expected = new Measurement (Convert.ToDouble(99999999.9), "cm2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ha_to_yd2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ha"; + string targetUnitName = "yd2"; + Measurement expected = new Measurement (Convert.ToDouble(1195990.04630108), "yd2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ha_to_yd2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ha"; + string targetUnitName = "yd2"; + Measurement expected = new Measurement (Convert.ToDouble(11959.9004510509), "yd2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ha_to_km2_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "ha"; + string targetUnitName = "km2"; + Measurement expected = new Measurement (Convert.ToDouble(1), "km2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_ha_to_km2_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "ha"; + string targetUnitName = "km2"; + Measurement expected = new Measurement (Convert.ToDouble(0.00999999999), "km2"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + #endregion + + #region "Absorbed Radiation Dose Tests" + #region "Source as Gray" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gy_to_cGy_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gy"; + string targetUnitName = "cGy"; + Measurement expected = new Measurement (Convert.ToDouble(10000), "cGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gy_to_cGy_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gy"; + string targetUnitName = "cGy"; + Measurement expected = new Measurement (Convert.ToDouble(99.9999999), "cGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gy_to_mGy_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gy"; + string targetUnitName = "mGy"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "mGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gy_to_mGy_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gy"; + string targetUnitName = "mGy"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "mGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gy_to_µGy_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gy"; + string targetUnitName = "µGy"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "µGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gy_to_µGy_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gy"; + string targetUnitName = "µGy"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "µGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gy_to_kGy_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "Gy"; + string targetUnitName = "kGy"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "kGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_Gy_to_kGy_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "Gy"; + string targetUnitName = "kGy"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "kGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Centigray" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cGy_to_Gy_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cGy"; + string targetUnitName = "Gy"; + Measurement expected = new Measurement (Convert.ToDouble(1), "Gy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cGy_to_Gy_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cGy"; + string targetUnitName = "Gy"; + Measurement expected = new Measurement (Convert.ToDouble(0.00999999999), "Gy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cGy_to_mGy_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cGy"; + string targetUnitName = "mGy"; + Measurement expected = new Measurement (Convert.ToDouble(1000), "mGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cGy_to_mGy_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cGy"; + string targetUnitName = "mGy"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999), "mGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cGy_to_µGy_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cGy"; + string targetUnitName = "µGy"; + Measurement expected = new Measurement (Convert.ToDouble(1000000), "µGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cGy_to_µGy_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cGy"; + string targetUnitName = "µGy"; + Measurement expected = new Measurement (Convert.ToDouble(9999.99999), "µGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cGy_to_kGy_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "cGy"; + string targetUnitName = "kGy"; + Measurement expected = new Measurement (Convert.ToDouble(0.001), "kGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_cGy_to_kGy_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "cGy"; + string targetUnitName = "kGy"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-06), "kGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Milligray" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mGy_to_Gy_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mGy"; + string targetUnitName = "Gy"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "Gy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mGy_to_Gy_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mGy"; + string targetUnitName = "Gy"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "Gy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mGy_to_cGy_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mGy"; + string targetUnitName = "cGy"; + Measurement expected = new Measurement (Convert.ToDouble(10), "cGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mGy_to_cGy_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mGy"; + string targetUnitName = "cGy"; + Measurement expected = new Measurement (Convert.ToDouble(0.0999999999), "cGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mGy_to_µGy_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mGy"; + string targetUnitName = "µGy"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "µGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mGy_to_µGy_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mGy"; + string targetUnitName = "µGy"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "µGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mGy_to_kGy_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "mGy"; + string targetUnitName = "kGy"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "kGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_mGy_to_kGy_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "mGy"; + string targetUnitName = "kGy"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "kGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Microgray" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µGy_to_Gy_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µGy"; + string targetUnitName = "Gy"; + Measurement expected = new Measurement (Convert.ToDouble(0.0001), "Gy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µGy_to_Gy_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µGy"; + string targetUnitName = "Gy"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "Gy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µGy_to_cGy_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µGy"; + string targetUnitName = "cGy"; + Measurement expected = new Measurement (Convert.ToDouble(0.01), "cGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µGy_to_cGy_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µGy"; + string targetUnitName = "cGy"; + Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-05), "cGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µGy_to_mGy_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µGy"; + string targetUnitName = "mGy"; + Measurement expected = new Measurement (Convert.ToDouble(0.1), "mGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µGy_to_mGy_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µGy"; + string targetUnitName = "mGy"; + Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "mGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µGy_to_kGy_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "µGy"; + string targetUnitName = "kGy"; + Measurement expected = new Measurement (Convert.ToDouble(1E-07), "kGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_µGy_to_kGy_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "µGy"; + string targetUnitName = "kGy"; + Measurement expected = new Measurement (Convert.ToDouble(1E-09), "kGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + + #region "Source as Kilogray" + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kGy_to_Gy_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kGy"; + string targetUnitName = "Gy"; + Measurement expected = new Measurement (Convert.ToDouble(100000), "Gy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kGy_to_Gy_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kGy"; + string targetUnitName = "Gy"; + Measurement expected = new Measurement (Convert.ToDouble(999.999999), "Gy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kGy_to_cGy_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kGy"; + string targetUnitName = "cGy"; + Measurement expected = new Measurement (Convert.ToDouble(10000000), "cGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kGy_to_cGy_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kGy"; + string targetUnitName = "cGy"; + Measurement expected = new Measurement (Convert.ToDouble(99999.9999), "cGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kGy_to_mGy_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kGy"; + string targetUnitName = "mGy"; + Measurement expected = new Measurement (Convert.ToDouble(100000000), "mGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kGy_to_mGy_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kGy"; + string targetUnitName = "mGy"; + Measurement expected = new Measurement (Convert.ToDouble(999999.999), "mGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kGy_to_µGy_Test () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (100); + string currentUnitName = "kGy"; + string targetUnitName = "µGy"; + Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "µGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Integration)] + [TestCategory(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_kGy_to_µGy_Test2 () + { + UnitConverter target = new UnitConverter (); + double value = Convert.ToDouble (0.999999999); + string currentUnitName = "kGy"; + string targetUnitName = "µGy"; + Measurement expected = new Measurement (Convert.ToDouble(999999999), "µGy"); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (value, currentUnitName, targetUnitName); + Assert.AreEqual (expected.Value, actual.Value); + } + #endregion + #endregion + + #endregion + + #region "UnitConverter.UnitConverter()" + /// + ///A test for UnitConverter Constructor + /// + [TestMethod()] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverterConstructorTest () + { + UnitConverter target = new UnitConverter (); + Assert.IsNotNull (target); + } + #endregion + + #region "Empty and Null Tests" + + [TestMethod()] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverter_ConvertUnitsNullTest () + { + UnitConverter target = new UnitConverter (); + Measurement expected = new Measurement (0, Result.BadUnit); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (0, null, null); + Assert.AreNotEqual (expected, actual); + Assert.AreEqual (expected.ConversionResult, actual.ConversionResult); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverter_ConvertUnitsNullTest2 () + { + UnitConverter target = new UnitConverter (); + Measurement expected = new Measurement (0, Result.BadUnit); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (0, "ft", null); + Assert.AreNotEqual (expected, actual); + Assert.AreEqual (expected.ConversionResult, actual.ConversionResult); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverter_ConvertUnitsNullTest3 () + { + UnitConverter target = new UnitConverter (); + Measurement expected = new Measurement (0, Result.BadUnit); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (0, null, "m"); + Assert.AreNotEqual (expected, actual); + Assert.AreEqual (expected.ConversionResult, actual.ConversionResult); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverter_ConvertUnitsEmptyTest () + { + UnitConverter target = new UnitConverter (); + Measurement expected = new Measurement (0, Result.BadUnit); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (0, string.Empty, string.Empty); + Assert.AreNotEqual (expected, actual); + Assert.AreEqual (expected.ConversionResult, actual.ConversionResult); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverter_ConvertUnitsEmptyTest2 () + { + UnitConverter target = new UnitConverter (); + Measurement expected = new Measurement (0, Result.BadUnit); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (0, "ft", string.Empty); + Assert.AreNotEqual (expected, actual); + Assert.AreEqual (expected.ConversionResult, actual.ConversionResult); + } + + [TestMethod()] + [TestCategory(UnitTestCategory.Unit)] + public void UnitConverter_ConvertUnitsEmptyTest3 () + { + UnitConverter target = new UnitConverter (); + Measurement expected = new Measurement (0, Result.BadUnit); + Measurement actual = default(Measurement); + actual = target.ConvertUnits (0, string.Empty, "m"); + Assert.AreNotEqual (expected, actual); + Assert.AreEqual (expected.ConversionResult, actual.ConversionResult); + } + #endregion + } +} diff --git a/Units.Test/UnitProviderTest.cs b/Cubico.Tests/UnitProviderTest.cs similarity index 56% rename from Units.Test/UnitProviderTest.cs rename to Cubico.Tests/UnitProviderTest.cs index f423086..5a2694d 100644 --- a/Units.Test/UnitProviderTest.cs +++ b/Cubico.Tests/UnitProviderTest.cs @@ -1,9 +1,7 @@ using System; using System.Collections.Generic; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Units; - - +using NUnit.Framework; +using Cubico; /// ///This is a test class for UnitProvider and is intended @@ -13,19 +11,16 @@ public class UnitProviderTest { - private TestContext testContextInstance; - - private UnitProvider unitPro = new UnitProvider(); + private TestContext testContextInstance; + private UnitProvider unitPro = new UnitProvider (); /// ///Gets or sets the test context which provides ///information about and functionality for the current test run. /// - public TestContext TestContext - { - get { return testContextInstance; } - set { testContextInstance = value; } - } - + public TestContext TestContext { + get { return testContextInstance; } + set { testContextInstance = value; } + } #region "Additional test attributes" // //You can use the following additional attributes as you write your tests: @@ -56,40 +51,38 @@ public TestContext TestContext /// ///A test for UnitTypes /// - [TestMethod()] - public void UnitTypesTest() - { - Dictionary actual = default(Dictionary); - actual = unitPro.UnitTypes; - - Assert.IsNotNull(actual); - Assert.IsTrue(actual.Count > 0); - } + [TestMethod()] + public void UnitTypesTest () + { + Dictionary actual = default(Dictionary); + actual = unitPro.UnitTypes; + Assert.IsNotNull (actual); + Assert.IsTrue (actual.Count > 0); + } /// ///A test for Units /// - [TestMethod()] - public void UnitsTest() - { - Dictionary actual = default(Dictionary); - actual = unitPro.Units; - - Assert.IsNotNull(actual); - Assert.IsTrue(actual.Count > 0); - } + [TestMethod()] + public void UnitsTest () + { + Dictionary actual = default(Dictionary); + actual = unitPro.Units; + Assert.IsNotNull (actual); + Assert.IsTrue (actual.Count > 0); + } /// ///A test for Symbols /// - [TestMethod()] - public void SymbolsTest() - { - Dictionary actual = default(Dictionary); - actual = unitPro.Symbols; + [TestMethod()] + public void SymbolsTest () + { + Dictionary actual = default(Dictionary); + actual = unitPro.Symbols; - Assert.IsNotNull(actual); - Assert.IsTrue(actual.Count > 0); - } + Assert.IsNotNull (actual); + Assert.IsTrue (actual.Count > 0); + } } diff --git a/Cubico.Tests/UnitTest.cs b/Cubico.Tests/UnitTest.cs new file mode 100644 index 0000000..b4ef8df --- /dev/null +++ b/Cubico.Tests/UnitTest.cs @@ -0,0 +1,420 @@ +using System; +using System.Diagnostics.Contracts; +using Cubico; +using NUnit.Framework; +using System.Collections.ObjectModel; + +/// +///This is a test class for UnitTest and is intended +///to contain all UnitTest Unit Tests +/// +[TestClass()] +public class UnitTest +{ + + private TestContext testContextInstance; + private UnitProvider unitPro = new UnitProvider (); + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext { + get { return testContextInstance; } + set { testContextInstance = value; } + } + #region "Additional test attributes" + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + // _ + //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) + //End Sub + // + //Use ClassCleanup to run code after all tests in a class have run + // _ + //Public Shared Sub MyClassCleanup() + //End Sub + // + //Use TestInitialize to run code before running each test + // _ + //Public Sub MyTestInitialize() + //End Sub + // + //Use TestCleanup to run code after each test has run + // _ + //Public Sub MyTestCleanup() + //End Sub + // + #endregion + + #region "Unit.Unit()" + [TestMethod()] + public void UnitNewTest () + { + Unit testObj = new Unit (); + + Assert.IsNotNull (testObj); + Assert.IsTrue (testObj.ID == 0); + Assert.IsTrue (string.IsNullOrEmpty(testObj.DefaultSymbol)); + Assert.IsNull (testObj.UnitType); + Assert.IsNotNull (testObj.Symbols); + Assert.IsTrue (testObj.Symbols.Count == 0); + Assert.IsNotNull (testObj.Modifiers); + Assert.IsTrue (testObj.Modifiers.Count == 0); + Assert.IsTrue (string.IsNullOrEmpty(testObj.Name)); + } + #endregion + + #region "Unit.Unit(UnitType)" + [TestMethod()] + [ExpectedException(typeof(ArgumentNullException))] + public void UnitNewEfUnitUnitTypeNullTest () + { + Unit testObj = new Unit (null); + + Assert.Fail ("Constructor should cause a ContractException. Nulls are not allowed"); + } + + [TestMethod()] + public void UnitNewEfUnitUnitTypeTest () + { + UnitType testunittype = new UnitType { + ID = 99, + Name = "Name" + }; + Unit testObj = new Unit (testunittype); + + Assert.IsNotNull (testObj); + Assert.IsNotNull (testObj.UnitType); + Assert.IsTrue (testObj.UnitTypeID == 99); + Assert.AreEqual (testunittype.Name, testObj.UnitType.Name); + + Assert.IsNotNull (testObj.Symbols); + Assert.IsTrue (testObj.Symbols.Count == 0); + + Assert.IsNotNull (testObj.Modifiers); + Assert.IsTrue (testObj.Modifiers.Count == 0); + // Assert.IsTrue(testUnit.UnitModifiers(0).Value = testObj.Modifiers(0).Value) + } + #endregion + + #region "Unit.ParentType" + [TestMethod()] + public void UnitParentTypeTest () + { + UnitType testUnitType = new UnitType { + ID = 99, + Name = "Name" + }; + + Unit testObj = new Unit (); + + testObj.UnitType = testUnitType; + + Assert.IsNotNull (testObj.UnitType); + Assert.AreEqual (testUnitType.ID, testObj.UnitType.ID); + Assert.AreEqual (testUnitType.Name, testObj.UnitType.Name); + } + + [TestMethod()] + public void UnitParentTypeNullTest () + { + Unit testObj = new Unit (); + + testObj.UnitType = null; + + Assert.IsNull (testObj.UnitType); + } + #endregion + + #region "Unit.ID" + [TestMethod()] + public void UnitIDTest () + { + Unit testObj = new Unit (); + + testObj.ID = 99; + + Assert.AreEqual (99, testObj.ID); + } + //[TestMethod()] + //public void UnitIDNullTest() + //{ + // Unit testObj = new Unit(); + + // testObj.ID = null; + + // Assert.AreEqual(null, testObj.ID); + //} + + //[TestMethod()] + //public void UnitIDNegativeTest() + //{ + // Unit testObj = new Unit(); + + // testObj.ID = -1; + + // Assert.IsTrue(testObj.ID == -1); + + // List data = Validation.DataAnnotationValidator.GetErrors(testObj).ToList; + + // Assert.IsNotNull(data); + // Assert.IsTrue(data.Count > 0); + // Assert.IsTrue(data(0).PropertyName == "ID"); + //} + #endregion + + #region "Unit.Name" + [TestMethod()] + public void UnitNameTest () + { + Unit testObj = new Unit (); + + testObj.Name = "Test Name"; + + Assert.AreEqual ("Test Name", testObj.Name); + } + //[TestMethod()] + //public void UnitNameNullTest() + //{ + // Unit testObj = new Unit(); + + // testObj.Name = null; + + // Assert.IsTrue(string.IsNullOrWhiteSpace(testObj.Name)); + + // List data = Validation.DataAnnotationValidator.GetErrors(testObj).ToList; + + // Assert.IsNotNull(data); + // Assert.IsTrue(data.Count > 0); + // Assert.IsTrue(data(0).PropertyName == "Name"); + //} + #endregion + + #region "IEquatable" + [TestMethod()] + public void Unit_EqualityTest () + { + Unit expected = unitPro.Units ["Feet"]; + Unit target = unitPro.Units ["Feet"]; + + Assert.IsTrue (expected == target); + } + + [TestMethod()] + public void Unit_EqualityTest2 () + { + Unit expected = unitPro.Units ["Feet"]; + Unit target = unitPro.Units ["Inch"]; + + Assert.IsFalse (expected == target); + } + + [TestMethod()] + public void Unit_EqualityTest3 () + { + Unit expected = null; + Unit target = unitPro.Units ["Inch"]; + + Assert.IsFalse (expected == target); + } + + [TestMethod()] + public void Unit_EqualityTest4 () + { + Unit expected = unitPro.Units ["Inch"]; + Unit target = null; + + Assert.IsFalse (expected == target); + } + + [TestMethod()] + public void Unit_EqualityTest5 () + { + Unit expected = null; + Unit target = null; + + Assert.IsTrue (expected == target); + } + + [TestMethod()] + public void Unit_EqualityTest6 () + { + Unit expected = unitPro.Units ["Feet"]; + Unit target = unitPro.Units ["Inch"]; + + Assert.IsTrue (expected != target); + } + + [TestMethod()] + public void Unit_EqualityTest7 () + { + Unit expected = unitPro.Units ["Feet"]; + Unit target = null; + + Assert.IsTrue (expected != target); + } + + [TestMethod()] + public void Unit_EqualityTest8 () + { + Unit expected = null; + Unit target = unitPro.Units ["Feet"]; + + Assert.IsTrue (expected != target); + } + + [TestMethod()] + public void Unit_EqualityTest8_1 () + { + Unit expected = null; + Unit target = null; + + Assert.IsFalse (expected != target); + } + + [TestMethod()] + public void Unit_EqualityTest9 () + { + Unit expected = unitPro.Units ["Inch"]; + Unit target = unitPro.Units ["Feet"]; + + Assert.IsFalse (expected.Equals(target)); + } + + [TestMethod()] + public void Unit_EqualityTest10 () + { + Unit expected = unitPro.Units ["Feet"]; + Unit target = unitPro.Units ["Feet"]; + + Assert.IsTrue (expected.Equals(target)); + } + + [TestMethod()] + public void Unit_EqualityTest11 () + { + Unit expected = unitPro.Units ["Feet"]; + Unit target = unitPro.Units ["Inch"]; + + Assert.IsFalse (expected.Equals(target)); + } + + [TestMethod()] + public void Unit_EqualityTest12 () + { + Unit expected = unitPro.Units ["Feet"]; + Unit target = null; + + Assert.IsFalse (expected.Equals(target)); + } + + [TestMethod()] + public void Unit_EqualityTest13 () + { + Unit expected = unitPro.Units ["Feet"]; + Unit target = unitPro.Units ["Feet"]; + + Assert.IsTrue (expected.Equals((object)target)); + } + + [TestMethod()] + public void Unit_EqualityTest14 () + { + Unit expected = unitPro.Units ["Feet"]; + Unit target = unitPro.Units ["Inch"]; + + Assert.IsFalse (expected.Equals((object)target)); + } + + [TestMethod()] + public void Unit_EqualityTest154 () + { + Unit expected = unitPro.Units ["Feet"]; + Unit target = null; + + Assert.IsFalse (expected.Equals((object)target)); + } + + [TestMethod()] + public void Unit_EqualityTest15 () + { + Unit expected = unitPro.Units ["Feet"]; + + Assert.IsTrue (expected.GetHashCode() == expected.Name.GetHashCode()); + } + #endregion + + //#region "Serialization" + //[TestMethod()] + //public void Unit_BinarySerializationTest() + //{ + // Unit expected = unitPro.Units["Feet"]; + // Unit actual = default(Unit); + + // byte[] data = Utility.BinarySerialize(expected); + // actual = (Unit)Utility.BinaryDeserialize(data); + + // Assert.IsNotNull(actual); + // Assert.AreEqual(expected.ID, actual.ID); + // Assert.AreEqual(expected.Name, actual.Name); + // Assert.AreEqual(expected.DefaultSymbol, actual.DefaultSymbol); + // Assert.AreEqual(expected.IsDefault, actual.IsDefault); + // Assert.AreEqual(expected.Modifiers.Count, actual.Modifiers.Count); + // Assert.AreEqual(expected.Symbols.Count, actual.Symbols.Count); + // Assert.AreEqual(expected.UnitTypeID, actual.UnitTypeID); + //} + + //[TestMethod()] + //public void Unit_DataContractSerializationTest() + //{ + // Unit expected = unitPro.Units["Feet"]; + // Unit actual = default(Unit); + + // string data = Utility.DataContractSerialize(expected); + // actual = (Unit)Utility.DataContractDeserialize(data, typeof(Unit)); + + // Assert.IsNotNull(actual); + // Assert.AreEqual(expected.ID, actual.ID); + // Assert.AreEqual(expected.Name, actual.Name); + // Assert.AreEqual(expected.DefaultSymbol, actual.DefaultSymbol); + // Assert.AreEqual(expected.IsDefault, actual.IsDefault); + // Assert.AreEqual(expected.Modifiers.Count, actual.Modifiers.Count); + // Assert.AreEqual(expected.Symbols.Count, actual.Symbols.Count); + // Assert.AreEqual(expected.UnitTypeID, actual.UnitTypeID); + //} + //#endregion + + //Private Function InitEfObjects() As EFUnitType + //Dim efUnitTypeObj As New EFUnitType + //efUnitTypeObj.ID = 10 + //efUnitTypeObj.Name = "Test Type" + //efUnitTypeObj.Description = "Test Desc" + + //Dim efUnitObj As New EFUnit + //efUnitObj.ID = 2 + //efUnitObj.Name = "Test Unit" + //efUnitObj.UnitType = efUnitTypeObj + + //Dim efUnitModifierObj As New EFUnitModifier + //efUnitModifierObj.ID = 2 + //efUnitModifierObj.ModifierID = 2 + //efUnitModifierObj.Order = 1 + //efUnitModifierObj.Value = 0.5 + + //Dim efUnitSymbolObj As New EFUnitSymbol + //efUnitSymbolObj.ID = 3 + //efUnitSymbolObj.IsDefault = True + //efUnitSymbolObj.Symbol = "Tst" + + //efUnitModifierObj.Unit = efUnitObj + //efUnitSymbolObj.Unit = efUnitObj + + //efUnitTypeObj.Unit.Add(efUnitObj) + //efUnitObj.UnitModifiers.Add(efUnitModifierObj) + //efUnitObj.UnitSymbol.Add(efUnitSymbolObj) + + //Return efUnitTypeObj + //End Function +} diff --git a/Units.Test/UnitTest1.cs b/Cubico.Tests/UnitTest1.cs similarity index 90% rename from Units.Test/UnitTest1.cs rename to Cubico.Tests/UnitTest1.cs index 2e8b274..c19dc0f 100644 --- a/Units.Test/UnitTest1.cs +++ b/Cubico.Tests/UnitTest1.cs @@ -1,12 +1,12 @@ using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Units; +using NUnit.Framework; +using Cubico; namespace Units.Test { - [TestClass] + [TestClass] public class UnitTest1 - { + { //[TestMethod] //public void TestMethod1() //{ @@ -20,9 +20,7 @@ public class UnitTest1 // var result = fiveft + twoinch; //} - } - - + } //public class Observer : IObserver //{ diff --git a/Units.Test/UnitTestCategory.cs b/Cubico.Tests/UnitTestCategory.cs similarity index 60% rename from Units.Test/UnitTestCategory.cs rename to Cubico.Tests/UnitTestCategory.cs index 12ceaac..0fec8c5 100644 --- a/Units.Test/UnitTestCategory.cs +++ b/Cubico.Tests/UnitTestCategory.cs @@ -2,24 +2,16 @@ public class UnitTestCategory { - //Integration Test: Relies on external dependencies in order to complete, such as a database, file system or network. - public const string Integration = "Integration"; - + public const string Integration = "Integration"; //Unit Test occurs within the code. - public const string Unit = "Unit"; - + public const string Unit = "Unit"; //CRUD Test: The test performs Create, Retrieve, Update, Delete calls on the database. - public const string CRUD = "CRUD"; - + public const string CRUD = "CRUD"; //Unit Test takes more than 3 seconds. - public const string SlowTest = "SlowTest"; - + public const string SlowTest = "SlowTest"; //Unit Test specifically for unit conversions drawing from the database. - public const string UnitConversion = "UnitConversion"; - + public const string UnitConversion = "UnitConversion"; //Unit Test for expected exceptions. - public const string ExceptionTest = "ExceptionTest"; - -} - + public const string ExceptionTest = "ExceptionTest"; +} \ No newline at end of file diff --git a/Cubico.Tests/UnitTypeTest.cs b/Cubico.Tests/UnitTypeTest.cs new file mode 100644 index 0000000..7cb7a4e --- /dev/null +++ b/Cubico.Tests/UnitTypeTest.cs @@ -0,0 +1,316 @@ +using System; +using System.Diagnostics.Contracts; +using Cubico; +using NUnit.Framework; + +/// +///This is a test class for UnitTest and is intended +///to contain all UnitTest Unit Tests +/// +[TestClass()] +public class UnitTypeTest +{ + + private TestContext testContextInstance; + private UnitProvider unitPro = new UnitProvider (); + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext { + get { return testContextInstance; } + set { testContextInstance = value; } + } + #region "Additional test attributes" + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + // _ + //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) + //End Sub + // + //Use ClassCleanup to run code after all tests in a class have run + // _ + //Public Shared Sub MyClassCleanup() + //End Sub + // + //Use TestInitialize to run code before running each test + // _ + //Public Sub MyTestInitialize() + //End Sub + // + //Use TestCleanup to run code after each test has run + // _ + //Public Sub MyTestCleanup() + //End Sub + // + #endregion + + #region "UnitType.UnitType()" + [TestMethod()] + public void UnitTypeNewTest () + { + UnitType testObj = new UnitType (); + + Assert.IsNotNull (testObj); + Assert.IsTrue (testObj.ID == 0); + Assert.IsNotNull (testObj.Units); + Assert.IsTrue (testObj.Units.Count == 0); + Assert.IsTrue (string.IsNullOrEmpty(testObj.Name)); + } + #endregion + + #region "UnitType.ID" + [TestMethod()] + public void UnitTypeIDTest () + { + UnitType testObj = new UnitType (); + + testObj.ID = 99; + + Assert.AreEqual (99, testObj.ID); + } + //[TestMethod()] + //public void UnitTypeIDNullTest() + //{ + // UnitType testObj = new UnitType(); + + // testObj.ID = null; + + // Assert.AreEqual(null, testObj.ID); + //} + + //[TestMethod()] + //public void UnitTypeIDNegativeTest() + //{ + // UnitType testObj = new UnitType(); + + // testObj.ID = -1; + + // Assert.IsTrue(testObj.ID == -1); + + // List data = Validation.DataAnnotationValidator.GetErrors(testObj).ToList; + + // Assert.IsNotNull(data); + // Assert.IsTrue(data.Count > 0); + // Assert.IsTrue(data(0).PropertyName == "ID"); + //} + #endregion + + #region "UnitType.Name" + [TestMethod()] + public void UnitTypeNameTest () + { + UnitType testObj = new UnitType (); + + testObj.Name = "Test Name"; + + Assert.AreEqual ("Test Name", testObj.Name); + } + //[TestMethod()] + //public void UnitTypeNameNullTest() + //{ + // UnitType testObj = new UnitType(); + + // testObj.Name = null; + + // Assert.IsTrue(string.IsNullOrWhiteSpace(testObj.Name)); + + // List data = Validation.DataAnnotationValidator.GetErrors(testObj).ToList; + + // Assert.IsNotNull(data); + // Assert.IsTrue(data.Count > 0); + // Assert.IsTrue(data(0).PropertyName == "Name"); + //} + #endregion + + #region "IEquatable" + [TestMethod()] + public void UnitType_EqualityTest () + { + UnitType expected = unitPro.UnitTypes ["Length"]; + UnitType target = unitPro.UnitTypes ["Length"]; + + Assert.IsTrue (expected == target); + } + + [TestMethod()] + public void UnitType_EqualityTest2 () + { + UnitType expected = unitPro.UnitTypes ["Length"]; + UnitType target = unitPro.UnitTypes ["Mass"]; + + Assert.IsFalse (expected == target); + } + + [TestMethod()] + public void UnitType_EqualityTest3 () + { + UnitType expected = null; + UnitType target = unitPro.UnitTypes ["Mass"]; + + Assert.IsFalse (expected == target); + } + + [TestMethod()] + public void UnitType_EqualityTest4 () + { + UnitType expected = unitPro.UnitTypes ["Mass"]; + UnitType target = null; + + Assert.IsFalse (expected == target); + } + + [TestMethod()] + public void UnitType_EqualityTest5 () + { + UnitType expected = null; + UnitType target = null; + + Assert.IsTrue (expected == target); + } + + [TestMethod()] + public void UnitType_EqualityTest6 () + { + UnitType expected = unitPro.UnitTypes ["Length"]; + UnitType target = unitPro.UnitTypes ["Mass"]; + + Assert.IsTrue (expected != target); + } + + [TestMethod()] + public void UnitType_EqualityTest7 () + { + UnitType expected = unitPro.UnitTypes ["Length"]; + UnitType target = null; + + Assert.IsTrue (expected != target); + } + + [TestMethod()] + public void UnitType_EqualityTest8 () + { + UnitType expected = null; + UnitType target = unitPro.UnitTypes ["Length"]; + + Assert.IsTrue (expected != target); + } + + [TestMethod()] + public void UnitType_EqualityTest8_1 () + { + UnitType expected = null; + UnitType target = null; + + Assert.IsFalse (expected != target); + } + + [TestMethod()] + public void UnitType_EqualityTest9 () + { + UnitType expected = unitPro.UnitTypes ["Mass"]; + UnitType target = unitPro.UnitTypes ["Length"]; + + Assert.IsFalse (expected.Equals(target)); + } + + [TestMethod()] + public void UnitType_EqualityTest10 () + { + UnitType expected = unitPro.UnitTypes ["Length"]; + UnitType target = unitPro.UnitTypes ["Length"]; + + Assert.IsTrue (expected.Equals(target)); + } + + [TestMethod()] + public void UnitType_EqualityTest11 () + { + UnitType expected = unitPro.UnitTypes ["Length"]; + UnitType target = unitPro.UnitTypes ["Mass"]; + + Assert.IsFalse (expected.Equals(target)); + } + + [TestMethod()] + public void UnitType_EqualityTest12 () + { + UnitType expected = unitPro.UnitTypes ["Length"]; + UnitType target = null; + + Assert.IsFalse (expected.Equals(target)); + } + + [TestMethod()] + public void UnitType_EqualityTest13 () + { + UnitType expected = unitPro.UnitTypes ["Length"]; + UnitType target = unitPro.UnitTypes ["Length"]; + + Assert.IsTrue (expected.Equals((object)target)); + } + + [TestMethod()] + public void UnitType_EqualityTest14 () + { + UnitType expected = unitPro.UnitTypes ["Length"]; + UnitType target = unitPro.UnitTypes ["Mass"]; + + Assert.IsFalse (expected.Equals((object)target)); + } + + [TestMethod()] + public void UnitType_EqualityTest154 () + { + UnitType expected = unitPro.UnitTypes ["Length"]; + UnitType target = null; + + Assert.IsFalse (expected.Equals((object)target)); + } + + [TestMethod()] + public void UnitType_EqualityTest15 () + { + UnitType expected = unitPro.UnitTypes ["Length"]; + + Assert.IsTrue (expected.GetHashCode() == expected.Name.GetHashCode()); + } + #endregion + + #region "Serialization" + //[TestMethod()] + //public void UnitType_BinarySerializationTest() + //{ + // UnitType expected = unitPro.UnitTypes["Length"]; + // UnitType actual = default(UnitType); + + // byte[] data = Utility.BinarySerialize(expected); + // actual = (UnitType)Utility.BinaryDeserialize(data); + + // Assert.IsNotNull(actual); + // Assert.AreEqual(expected.ID, actual.ID); + // Assert.AreEqual(expected.Name, actual.Name); + // Assert.AreEqual(expected.Description, actual.Description); + // Assert.AreEqual(expected.Units.Count, actual.Units.Count); + //} + + //[TestMethod()] + //public void UnitType_DataContractSerializationTest() + //{ + // UnitType expected = unitPro.UnitTypes["Length"]; + // UnitType actual = default(UnitType); + + // string data = Utility.DataContractSerialize(expected); + // actual = (UnitType)Utility.DataContractDeserialize(data, typeof(UnitType)); + + // Assert.IsNotNull(actual); + // Assert.AreEqual(expected.ID, actual.ID); + // Assert.AreEqual(expected.Name, actual.Name); + // Assert.AreEqual(expected.Description, actual.Description); + // Assert.AreEqual(expected.Units.Count, actual.Units.Count); + //} + #endregion +} + diff --git a/Cubico.sln b/Cubico.sln new file mode 100644 index 0000000..b8207a8 --- /dev/null +++ b/Cubico.sln @@ -0,0 +1,168 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cubico", "Cubico\Cubico.csproj", "{5C21F8E4-02C4-4614-97C7-1899F4E6E634}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cubico.Tests", "Cubico.Tests\Cubico.Tests.csproj", "{8D4882D3-8D97-4D82-BE0E-AAC8A1D8B487}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5C21F8E4-02C4-4614-97C7-1899F4E6E634}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5C21F8E4-02C4-4614-97C7-1899F4E6E634}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5C21F8E4-02C4-4614-97C7-1899F4E6E634}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5C21F8E4-02C4-4614-97C7-1899F4E6E634}.Release|Any CPU.Build.0 = Release|Any CPU + {8D4882D3-8D97-4D82-BE0E-AAC8A1D8B487}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8D4882D3-8D97-4D82-BE0E-AAC8A1D8B487}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8D4882D3-8D97-4D82-BE0E-AAC8A1D8B487}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8D4882D3-8D97-4D82-BE0E-AAC8A1D8B487}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(MonoDevelopProperties) = preSolution + StartupItem = Cubico\Cubico.csproj + Policies = $0 + $0.DotNetNamingPolicy = $1 + $1.DirectoryNamespaceAssociation = None + $1.ResourceNamePolicy = FileFormatDefault + $0.StandardHeader = $2 + $2.Text = + $2.IncludeInNewFiles = True + $0.NameConventionPolicy = $3 + $3.Rules = $4 + $4.NamingRule = $5 + $5.Name = Namespaces + $5.AffectedEntity = Namespace + $5.VisibilityMask = VisibilityMask + $5.NamingStyle = PascalCase + $5.IncludeInstanceMembers = True + $5.IncludeStaticEntities = True + $4.NamingRule = $6 + $6.Name = Types + $6.AffectedEntity = Class, Struct, Enum, Delegate + $6.VisibilityMask = Public + $6.NamingStyle = PascalCase + $6.IncludeInstanceMembers = True + $6.IncludeStaticEntities = True + $4.NamingRule = $7 + $7.Name = Interfaces + $7.RequiredPrefixes = $8 + $8.String = I + $7.AffectedEntity = Interface + $7.VisibilityMask = Public + $7.NamingStyle = PascalCase + $7.IncludeInstanceMembers = True + $7.IncludeStaticEntities = True + $4.NamingRule = $9 + $9.Name = Attributes + $9.RequiredSuffixes = $10 + $10.String = Attribute + $9.AffectedEntity = CustomAttributes + $9.VisibilityMask = Public + $9.NamingStyle = PascalCase + $9.IncludeInstanceMembers = True + $9.IncludeStaticEntities = True + $4.NamingRule = $11 + $11.Name = Event Arguments + $11.RequiredSuffixes = $12 + $12.String = EventArgs + $11.AffectedEntity = CustomEventArgs + $11.VisibilityMask = Public + $11.NamingStyle = PascalCase + $11.IncludeInstanceMembers = True + $11.IncludeStaticEntities = True + $4.NamingRule = $13 + $13.Name = Exceptions + $13.RequiredSuffixes = $14 + $14.String = Exception + $13.AffectedEntity = CustomExceptions + $13.VisibilityMask = VisibilityMask + $13.NamingStyle = PascalCase + $13.IncludeInstanceMembers = True + $13.IncludeStaticEntities = True + $4.NamingRule = $15 + $15.Name = Methods + $15.AffectedEntity = Methods + $15.VisibilityMask = Protected, Public + $15.NamingStyle = PascalCase + $15.IncludeInstanceMembers = True + $15.IncludeStaticEntities = True + $4.NamingRule = $16 + $16.Name = Static Readonly Fields + $16.AffectedEntity = ReadonlyField + $16.VisibilityMask = Protected, Public + $16.NamingStyle = PascalCase + $16.IncludeInstanceMembers = False + $16.IncludeStaticEntities = True + $4.NamingRule = $17 + $17.Name = Fields + $17.AffectedEntity = Field + $17.VisibilityMask = Protected, Public + $17.NamingStyle = PascalCase + $17.IncludeInstanceMembers = True + $17.IncludeStaticEntities = True + $4.NamingRule = $18 + $18.Name = ReadOnly Fields + $18.AffectedEntity = ReadonlyField + $18.VisibilityMask = Protected, Public + $18.NamingStyle = PascalCase + $18.IncludeInstanceMembers = True + $18.IncludeStaticEntities = False + $4.NamingRule = $19 + $19.Name = Constant Fields + $19.AffectedEntity = ConstantField + $19.VisibilityMask = Protected, Public + $19.NamingStyle = PascalCase + $19.IncludeInstanceMembers = True + $19.IncludeStaticEntities = True + $4.NamingRule = $20 + $20.Name = Properties + $20.AffectedEntity = Property + $20.VisibilityMask = Protected, Public + $20.NamingStyle = PascalCase + $20.IncludeInstanceMembers = True + $20.IncludeStaticEntities = True + $4.NamingRule = $21 + $21.Name = Events + $21.AffectedEntity = Event + $21.VisibilityMask = Protected, Public + $21.NamingStyle = PascalCase + $21.IncludeInstanceMembers = True + $21.IncludeStaticEntities = True + $4.NamingRule = $22 + $22.Name = Enum Members + $22.AffectedEntity = EnumMember + $22.VisibilityMask = VisibilityMask + $22.NamingStyle = PascalCase + $22.IncludeInstanceMembers = True + $22.IncludeStaticEntities = True + $4.NamingRule = $23 + $23.Name = Parameters + $23.AffectedEntity = Parameter + $23.VisibilityMask = VisibilityMask + $23.NamingStyle = CamelCase + $23.IncludeInstanceMembers = True + $23.IncludeStaticEntities = True + $4.NamingRule = $24 + $24.Name = Type Parameters + $24.RequiredPrefixes = $25 + $25.String = T + $24.AffectedEntity = TypeParameter + $24.VisibilityMask = VisibilityMask + $24.NamingStyle = PascalCase + $24.IncludeInstanceMembers = True + $24.IncludeStaticEntities = True + $0.VersionControlPolicy = $26 + $26.inheritsSet = Mono + $0.ChangeLogPolicy = $27 + $27.UpdateMode = None + $27.MessageStyle = $28 + $28.LineAlign = 0 + $27.inheritsSet = Mono + outputpath = Debug + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Cubico.userprefs b/Cubico.userprefs new file mode 100644 index 0000000..7a419c9 --- /dev/null +++ b/Cubico.userprefs @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Cubico/ConversionResult.cs b/Cubico/ConversionResult.cs new file mode 100644 index 0000000..777fe2e --- /dev/null +++ b/Cubico/ConversionResult.cs @@ -0,0 +1,119 @@ +using System; +using System.Runtime.Serialization; + +namespace Cubico +{ + [Serializable] + [DataContract] + public class ConversionResult : IEquatable + { + #region "Constructors" + + public ConversionResult () + { + _result = Cubico.Result.NoError; + _value = 0; + } + + public ConversionResult (double value) + { + _result = Cubico.Result.NoError; + _value = value; + } + + public ConversionResult (double value, string symbol) + { + _result = Cubico.Result.NoError; + _value = value; + _symbol = symbol; + } + + public ConversionResult (double value, Result result) + { + _result = result; + _value = value; + } + + public ConversionResult (Result result) + { + _result = result; + } + + #endregion + #region "Properties" + + Result _result; + + [DataMember] + public Result Result { + get { return _result; } + set { _result = value; } + } + + double _value; + + [DataMember] + public double Value { + get { return _value; } + set { _value = value; } + } + + string _symbol; + + [DataMember] + public string Symbol { + get { return _symbol; } + set { _symbol = value; } + } + + #endregion + #region "IEquatable" + + public override int GetHashCode () + { + return (this.Value.ToString () + this.Symbol.ToString () + this.Result.ToString ()).GetHashCode (); + } + + public override bool Equals (object obj) + { + if (obj == null) { + return false; + } else if (!object.ReferenceEquals (obj.GetType(), typeof(ConversionResult))) { + return false; + } + + ConversionResult CrObj = (ConversionResult)obj; + + return this.Equals (CrObj); + } + + public bool Equals (ConversionResult other) + { + if (other == null) { + return false; + } + + if (other.Value != this.Value) { + return false; + } else if (other.Symbol != this.Symbol) { + return false; + } else if (other.Result != this.Result) { + return false; + } else { + return true; + } + } + + public static bool operator != (ConversionResult left, ConversionResult right) + { + return !left.Equals (right); + } + + public static bool operator == (ConversionResult left, ConversionResult right) + { + return left.Equals (right); + } + + #endregion + } +} \ No newline at end of file diff --git a/Units/Cubico.csproj b/Cubico/Cubico.csproj similarity index 89% rename from Units/Cubico.csproj rename to Cubico/Cubico.csproj index a198773..eacd81c 100644 --- a/Units/Cubico.csproj +++ b/Cubico/Cubico.csproj @@ -9,8 +9,9 @@ Properties Cubico Cubico - v4.5 512 + 12.0.0 + 2.0 true @@ -34,19 +35,16 @@ - - - + - @@ -54,11 +52,6 @@ - - - Designer - - + + + \ No newline at end of file diff --git a/Cubico/Measurement.cs b/Cubico/Measurement.cs new file mode 100644 index 0000000..a12008f --- /dev/null +++ b/Cubico/Measurement.cs @@ -0,0 +1,602 @@ +using System; +using System.Diagnostics.Contracts; +using System.Linq; +using System.Runtime.Serialization; + +namespace Cubico +{ + // A structure that defines a measurement with a numeric value and a unit of measure. + [Serializable] + [DataContract] + [KnownType(typeof(Unit))] + [KnownType(typeof(UnitType))] + [KnownType(typeof(Symbol))] + [KnownType(typeof(Modifier))] + [KnownType(typeof(ConversionResult))] + public struct Measurement : IEquatable, IComparable + { + #region "Private Fields" + + MeasurementFlags _flags; + UnitConverter _uc; + double _maxbound; + double _minbound; + double _standardValue; + // Unit _standardUnit; + double _value; + Unit _unit; + string _symbol; + Result _conversionResult; + + public event EventHandler OnValueChanged; + public event EventHandler OnUnitChanged; + + #endregion + #region "Constructors" + + internal Measurement (string unitSymbol) + { + // Reference the unit converter that created us. + _uc = new UnitConverter (); + + _flags = MeasurementFlags.None; + _maxbound = 0; + _minbound = 0; + _standardValue = 0; + // _standardUnit = null; + _symbol = null; + OnValueChanged = null; + OnUnitChanged = null; + + if (string.IsNullOrWhiteSpace (unitSymbol)) { + // System.Diagnostics.Debug.Print("First IF Statement") + _unit = null; + _conversionResult = Result.BadUnit; + } else { + // System.Diagnostics.Debug.Print("First ELSE Statement") + _unit = _uc.GetUnitBySymbol (unitSymbol); + _conversionResult = Result.NoError; + + if (_unit.Symbols.Contains (new Symbol { Value = unitSymbol })) { + _symbol = unitSymbol; + } else { + _symbol = _unit.DefaultSymbol; + } + } + + _value = 0; + } + + public Measurement (double value, string unitSymbol) + : this(unitSymbol) + { + + if (!string.IsNullOrWhiteSpace (unitSymbol)) { + _unit = _uc.GetUnitBySymbol (unitSymbol); + } + + _value = value; + } + + internal Measurement (double value, string unitSymbol, Result conversionResult) + : this(unitSymbol) + { + + _value = value; + + _conversionResult = conversionResult; + } + + internal Measurement (double value, Result conversionResult) + : this(null) + { + + _value = value; + + _conversionResult = conversionResult; + } + + internal Measurement (double value, Unit unit, Result conversionResult = Result.NoError) + { + // Reference the unit converter that created us. + _uc = new UnitConverter (); + _flags = MeasurementFlags.None; + _unit = unit; + _conversionResult = Result.NoError; + _value = value; + _conversionResult = conversionResult; + + _maxbound = 0; + _minbound = 0; + _standardValue = 0; + // _standardUnit = null; + _symbol = null; + OnValueChanged = null; + OnUnitChanged = null; + } + + #endregion + #region "measurement flags and properties methods" + + // Gets a reference to the current unit of the measurement. + public Unit Unit { + get { return _unit; } + } + + // Gets or sets the flags on this measurement. + public MeasurementFlags Flags { + get { return _flags; } + set { _flags = value; } + } + + // Gets the unit converter associated with this measurement. + public UnitConverter Converter { + get { return _uc; } + } + + // Displays the result of a conversion. + // This property will default to NoError unless there were problems after a conversion. + public Result ConversionResult { + get { return _conversionResult; } + set { _conversionResult = value; } + } + + public double Value { + get { return _value; } + } + + public string Symbol { + get { + if (_unit == null) { + return null; + } else { + return _symbol; + } + } + } + + // Gets the current value of the measurement in string form. + public string FullValue { + get { + string str = _value.ToString (); + + if (_unit != null) { + if (!string.IsNullOrEmpty (_unit.DefaultSymbol)) { + str += _unit.DefaultSymbol; + } else { + str += _unit.Name; + } + } + + return str; + } + } + + public bool IsValid { + get { + if (_conversionResult != Result.NoError && _conversionResult != Result.UnitExists) { + return false; + } else if (_uc == null) { + return false; + } else if (_unit == null) { + return false; + } else { + return true; + } + } + } + + #endregion + #region "Value getting and setting methods" + + // Sets the unit of the measurement. + internal Result SetUnit (string unitSymbol) + { + Unit unit = _uc.GetUnitBySymbol (unitSymbol); + + if (unit == null) { + return Result.BadUnit; + } else { + // If its the same don't touch it. + if (unit.DefaultSymbol == _unit.DefaultSymbol) { + return Result.NoError; + } + + _unit = unit; + + if (OnUnitChanged != null) { + OnUnitChanged (this, EventArgs.Empty); + } + + return Result.NoError; + } + } + + // Given a string in the format "[value] [unit]" parses and applies the value and unit. + internal Result SetValue (string measurement) + { + if (string.IsNullOrEmpty (measurement)) { + throw new ArgumentNullException ("measurement"); + } + Contract.EndContractBlock (); + + double d = 0; + string symbol = null; + Result res = default(Result); + + res = ValidateEntry (measurement); + if (res != Result.NoError) { + return res; + } + + Measurement newRes = _uc.ParseUnitString (measurement); + + d = newRes.Value; + symbol = newRes.Symbol; + + // Can we change the unit? + if ((_flags & MeasurementFlags.ForceUnit) > 0) { + // Can't change the unit, so turn the given units into the unit we want. + Measurement convRes = _uc.ConvertUnits (d, symbol, _unit.Name); + d = convRes.Value; + } else { + // Change the measurement unit to the given unit. + SetUnit (symbol); + } + + SetValue (d); + return res; + } + + // Sets a value in the currently set unit format. + internal Result SetValue (double value) + { + Measurement res = default(Measurement); + Unit standardUnit = default(Unit); + UnitType tp = _unit.UnitType; + standardUnit = (from un in tp.Units where un.IsDefault == true select un).FirstOrDefault (); + res = _uc.ConvertUnits (value, _unit.Name, standardUnit.Name); + + _value = value; + _standardValue = res.Value; + + if (res.ConversionResult != Result.NoError) { + return res.ConversionResult; + } + + if (OnValueChanged != null) { + OnValueChanged (this, EventArgs.Empty); + } + + return res.ConversionResult; + } + + // Gets the value of the measurement in the specified units. + public Measurement GetValueAs (string unitSymbol) + { + return _uc.ConvertUnits (_value, _unit.Name, unitSymbol); + } + + public string GetStringValueAs (string unitSymbol) + { + Measurement res = default(Measurement); + res = _uc.ConvertUnits (_value, _unit.Name, unitSymbol); + + if (res.ConversionResult != Result.NoError) { + return "Conversion Error"; + } else { + return res.FullValue; + } + } + + #endregion + #region "Validation methods" + + // Validates input to the measurement. + public Result ValidateEntry (string entry) + { + string unit = null; + double d = 0; + Measurement res = default(Measurement); + + // Parse the entry. + res = _uc.ParseUnitString (entry); + if (res.ConversionResult != Result.NoError) { + return res.ConversionResult; + } + + unit = res.Symbol; + d = res.Value; + + return ValidateEntryUnitData (unit, d); + } + + public Result ValidateEntry (double value, string symbol) + { + return ValidateEntryUnitData (symbol, value); + } + + Result ValidateEntryUnitData (string unit, double x) + { + + // Make sure the units are compatible. + if (!_uc.IsCompatible (unit, this._unit.DefaultSymbol)) { + return Result.UnitMismatch; + } + + Measurement newRes = _uc.ConvertUnits (x, unit, this.Unit.Name); + x = newRes.Value; + + if ((this._flags & MeasurementFlags.UseMaxBound) > 0) { + if (x > this._maxbound) { + return Result.ValueTooHigh; + } + } + + if ((this._flags & MeasurementFlags.UseMinBound) > 0) { + if (x < this._minbound) { + return Result.ValueTooLow; + } + } + + return Result.NoError; + } + + #endregion + #region "Bounds setting methods" + + // Sets the maximum bound of the measurement. + public Result SetMaxBound (double maxbound, string unitSymbol) + { + if (string.IsNullOrEmpty (unitSymbol)) { + throw new ArgumentNullException ("unitSymbol"); + } + + if (!_uc.IsCompatible (unitSymbol, this._unit.DefaultSymbol)) { + return Result.UnitMismatch; + } + + Measurement res = _uc.ConvertUnits (maxbound, unitSymbol, _unit.Name); + + this._maxbound = res.Value; + + return Result.NoError; + } + + // Sets the minimum bound of the measurement. + public Result SetMinBound (double minbound, string unitSymbol) + { + if (string.IsNullOrEmpty (unitSymbol)) { + throw new ArgumentNullException ("unitSymbol"); + } + + if (!_uc.IsCompatible (unitSymbol, this._unit.DefaultSymbol)) { + return Result.UnitMismatch; + } + + Measurement res = _uc.ConvertUnits (minbound, unitSymbol, _unit.Name); + + this._minbound = res.Value; + + return Result.NoError; + } + + #endregion + #region "Operator overloads" + + // Gets a string representation of the measurement. + public override string ToString () + { + return this.FullValue; + } + + // Adds two measurements together. + public static Measurement operator + (Measurement d1, Measurement d2) + { + double x = 0; + double y = 0; + + x = d1.Value; + + if (d2.Unit.ID == d1.Unit.ID) { + y = d2.Value; + } else { + y = d2.Value; + Measurement res2 = d2.Converter.ConvertUnits (y, d2.Unit.DefaultSymbol, d1.Unit.DefaultSymbol); + y = res2.Value; + } + + var result = new Measurement (x + y, d1.Unit); + return result; + } + + // Subtracts two measurements. + public static Measurement operator - (Measurement d1, Measurement d2) + { + double x = 0; + double y = 0; + + x = d1.Value; + + if (d2.Unit.ID == d1.Unit.ID) { + y = d2.Value; + } else { + y = d2.Value; + Measurement res2 = d2.Converter.ConvertUnits (y, d2.Unit.DefaultSymbol, d1.Unit.DefaultSymbol); + y = res2.Value; + } + + var result = new Measurement (x - y, d1.Unit); + return result; + } + + // Multiplies two measurements. + public static Measurement operator * (Measurement d1, Measurement d2) + { + double x = 0; + double y = 0; + + x = d1.Value; + + if (d2.Unit.ID == d1.Unit.ID) { + y = d2.Value; + } else { + y = d2.Value; + Measurement res2 = d2.Converter.ConvertUnits (y, d2.Unit.DefaultSymbol, d1.Unit.DefaultSymbol); + y = res2.Value; + } + + var result = new Measurement (x * y, d1.Unit); + return result; + } + + // Divides two measurements. + public static Measurement operator / (Measurement d1, Measurement d2) + { + double x = 0; + double y = 0; + + x = d1.Value; + + if (d2.Unit.ID == d1.Unit.ID) { + y = d2.Value; + } else { + y = d2.Value; + Measurement res2 = d2.Converter.ConvertUnits (y, d2.Unit.DefaultSymbol, d1.Unit.DefaultSymbol); + y = res2.Value; + } + + Measurement result = new Measurement (x / y, d1.Unit); + return result; + } + + public static bool operator != (Measurement left, Measurement right) + { + return !left.Equals (right); + } + + public static bool operator == (Measurement left, Measurement right) + { + return left.Equals (right); + } + + public static bool operator < (Measurement left, Measurement right) + { + return (left.CompareTo (right) < 0); + } + + public static bool operator > (Measurement left, Measurement right) + { + return (left.CompareTo (right) > 0); + } + + public static bool operator <= (Measurement left, Measurement right) + { + return (left.CompareTo (right) <= 0); + } + + public static bool operator >= (Measurement left, Measurement right) + { + return (left.CompareTo (right) >= 0); + } + + #endregion + #region "IEquatable(Of Measurement)" + + public override int GetHashCode () + { + Measurement MeRes = default(Measurement); + string str = string.Empty; + if (this.ConversionResult != Result.NoError) { + str = this.Value.ToString () + "|" + this.ConversionResult.ToString (); + } else { + Unit standardUnit = default(Unit); + UnitType tp = this.Unit.UnitType; + standardUnit = (from un in tp.Units where un.IsDefault == true select un).FirstOrDefault (); + + MeRes = this.Converter.ConvertUnits (this._value, this.Unit.DefaultSymbol, standardUnit.DefaultSymbol); + str = MeRes.Value.ToString () + "|" + MeRes.Symbol; + } + + return str.GetHashCode (); + } + + public override bool Equals (object obj) + { + if (obj == null || !object.ReferenceEquals (obj.GetType(), typeof(Measurement))) { + return false; + } + + Measurement Mobj = (Measurement)obj; + return this.Equals (Mobj); + } + + public bool Equals (Measurement other) + { + if (other.ConversionResult != Result.NoError) { + return false; + } + + if (this.ConversionResult != Result.NoError) { + return false; + } + + if (object.ReferenceEquals (this.Unit, null) && object.ReferenceEquals (other.Unit, null)) { + return true; + } + + if (object.ReferenceEquals (this.Unit, null) ^ object.ReferenceEquals (other.Unit, null)) { + return false; + } + + if (this.Unit.Name == other.Unit.Name && this.Value == other.Value) { + return true; + } else { + Measurement OtherRes = other.Converter.ConvertUnits (other._value, other.Unit.Name, this.Unit.Name); + + if (OtherRes.ConversionResult != Result.NoError) { + return false; + } else if (this.Unit.Name != OtherRes.Unit.Name) { + return false; + } else if (this.Value != OtherRes.Value) { + return false; + } else { + return true; + } + } + } + + #endregion + #region "ICompareTo(Of Measurement)" + + public int CompareTo (Measurement other) + { + if (other.ConversionResult != Result.NoError) { + throw new ArgumentException ("other", "the 'other' parameter must have a valid value"); + } + + if (this.ConversionResult != Result.NoError) { + throw new ArgumentException ("this", "object must have a valid value"); + } + + Unit standardUnit = default(Unit); + UnitType tp = this.Unit.UnitType; + standardUnit = (from un in tp.Units where un.IsDefault == true select un).FirstOrDefault (); + + Unit otherStandardUnit = default(Unit); + tp = this.Unit.UnitType; + otherStandardUnit = (from un in tp.Units where un.IsDefault == true select un).FirstOrDefault (); + + Measurement meRes = this.Converter.ConvertUnits (this._value, this.Unit.DefaultSymbol, standardUnit.DefaultSymbol); + Measurement otherRes = other.Converter.ConvertUnits (other._value, other.Unit.DefaultSymbol, otherStandardUnit.DefaultSymbol); + + if (meRes.Symbol != otherRes.Symbol) { + throw new ArgumentException ("The parameter must be of the same unit type as this object. " + this.Unit.DefaultSymbol, "other"); + } + + return meRes.Value.CompareTo (otherRes.Value); + } + + #endregion + } +} \ No newline at end of file diff --git a/Cubico/MeasurementFlags.cs b/Cubico/MeasurementFlags.cs new file mode 100644 index 0000000..16c82f3 --- /dev/null +++ b/Cubico/MeasurementFlags.cs @@ -0,0 +1,19 @@ +using System; + +namespace Cubico +{ + [Flags] + public enum MeasurementFlags : int + { + None = 0, + + // Stops the data string unit being changed by reading user input. + ForceUnit = 1, + + // Enforces a maximum value on the data string. + UseMaxBound = 2, + + // Enforces a minimum value on the data string. + UseMinBound = 4 + } +} \ No newline at end of file diff --git a/Cubico/Modifier.cs b/Cubico/Modifier.cs new file mode 100644 index 0000000..8250212 --- /dev/null +++ b/Cubico/Modifier.cs @@ -0,0 +1,92 @@ +using System; +using System.Runtime.Serialization; + +namespace Cubico +{ + [DataContract(IsReference = true)] + [Serializable] + public partial class Modifier + { + #region "Contructors" + + public Modifier () : base() + { + } + + #endregion + #region "Primitive Properties" + + [DataMember] + public int ID { get; set; } + + [DataMember] + public decimal Value { get; set; } + + [DataMember] + public int Order { get; set; } + + [DataMember] + public int UnitSourceID { get; set; } + + [DataMember] + public int UnitTargetID { get; set; } + + [DataMember] + public Nullable Precision { get; set; } + + #endregion + #region "ChangeTracking" + + bool _isDeserializing; + + protected bool IsDeserializing { + get { return _isDeserializing; } + set { _isDeserializing = value; } + } + + [OnDeserializing] + public void OnDeserializingMethod (StreamingContext context) + { + IsDeserializing = true; + } + + [OnDeserialized] + public void OnDeserializedMethod (StreamingContext context) + { + IsDeserializing = false; + } + + bool _isSerializing = false; + + protected bool IsSerializing { + get { return _isSerializing; } + set { _isSerializing = value; } + } + + [OnSerializing] + public void OnSerializingMethod (StreamingContext context) + { + IsSerializing = true; + } + + [OnSerialized] + public void OnSerializedMethod (StreamingContext context) + { + IsSerializing = false; + } + + protected virtual void ClearNavigationProperties () + { + } + + #endregion + #region "Properties" + + [DataMember] + public Unit ParentUnit { get; set; } + + public ModifierType ModifierType { get; set; } + + #endregion + } +} \ No newline at end of file diff --git a/Cubico/ModifierType.cs b/Cubico/ModifierType.cs new file mode 100644 index 0000000..bfc071e --- /dev/null +++ b/Cubico/ModifierType.cs @@ -0,0 +1,12 @@ +namespace Cubico +{ + public enum ModifierType + { + None = 0, + PreAdd = 1, + Add = 2, + Multiply = 3, + Subtract = 4, + Divide = 5 + } +} \ No newline at end of file diff --git a/Units/Properties/AssemblyInfo.cs b/Cubico/Properties/AssemblyInfo.cs similarity index 91% rename from Units/Properties/AssemblyInfo.cs rename to Cubico/Properties/AssemblyInfo.cs index 354e45f..641f724 100644 --- a/Units/Properties/AssemblyInfo.cs +++ b/Cubico/Properties/AssemblyInfo.cs @@ -6,14 +6,14 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Cubico")] -[assembly: AssemblyDescription("Measurement & Unit Conversion library.")] +[assembly: AssemblyDescription("A measurement and unit conversion library.")] //[assembly: AssemblyConfiguration("")] //[assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Cubico")] //[assembly: AssemblyCopyright("")] //[assembly: AssemblyTrademark("")] //[assembly: AssemblyCulture("")] -[assembly: InternalsVisibleTo("Cubico.Test")] +[assembly: InternalsVisibleTo("Cubico.Tests")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from diff --git a/Cubico/Result.cs b/Cubico/Result.cs new file mode 100644 index 0000000..7073c38 --- /dev/null +++ b/Cubico/Result.cs @@ -0,0 +1,35 @@ +namespace Cubico +{ + public enum Result : int + { + // No error occured. + NoError = 0, + + // A general error occured. + GenericError, + + // Specified unit was not found. + UnitNotFound, + + // Specified unit group was not found. + GroupNotFound, + + // Unit exists. + UnitExists, + + // Specified unit was invalid. + BadUnit, + + // Specified value was invalid. + BadValue, + + // Two units were used that are not in the same group. + UnitMismatch, + + // An input value was too high. + ValueTooHigh, + + // An input value was too low. + ValueTooLow + } +} \ No newline at end of file diff --git a/Cubico/Symbol.cs b/Cubico/Symbol.cs new file mode 100644 index 0000000..45103fe --- /dev/null +++ b/Cubico/Symbol.cs @@ -0,0 +1,178 @@ +using System; +using System.Runtime.Serialization; + +namespace Cubico +{ + // Represents a unit of measure's symbol, or alternate methods to identify a unit of measure. + // Inch = ", inches, in, in. etc. + [DataContract(IsReference = true)] + [KnownType(typeof(Unit))] + [Serializable] + public partial class Symbol + { + #region "Constructors" + + public Symbol () + { + } + + public Symbol (Unit unit) + { + if (unit == null) { + throw new ArgumentNullException ("unit"); + } + + this.Unit = unit; + } + + #endregion + #region "Primitive Properties" + + [DataMember] + public int Id { get; set; } + + [DataMember] + public string Value { get; set; } + + [DataMember] + public bool IsDefault { get; set; } + + [DataMember] + public int UnitId { get; set; } + + #endregion + #region "Navigation Properties" + + [DataMember] + public Unit Unit { + get { return _unit; } + set { + if (!object.ReferenceEquals (_unit, value)) { + Unit previousValue = _unit; + _unit = value; + FixupUnit (previousValue); + } + } + } + + Unit _unit; + + #endregion + #region "ChangeTracking" + + bool _isDeserializing; + + protected bool IsDeserializing { + get { return _isDeserializing; } + set { _isDeserializing = value; } + } + + [OnDeserializing] + public void OnDeserializingMethod (StreamingContext context) + { + IsDeserializing = true; + } + + [OnDeserialized] + public void OnDeserializedMethod (StreamingContext context) + { + IsDeserializing = false; + } + + bool _isSerializing = false; + + protected bool IsSerializing { + get { return _isSerializing; } + set { _isSerializing = value; } + } + + [OnSerializing] + public void OnSerializingMethod (StreamingContext context) + { + IsSerializing = true; + } + + [OnSerialized] + public void OnSerializedMethod (StreamingContext context) + { + IsSerializing = false; + } + + #endregion + #region "Association Fixup" + + void FixupUnit (Unit previousValue) + { + if (IsDeserializing) { + return; + } + + if (previousValue != null && previousValue.Symbols.Contains (this)) { + previousValue.Symbols.Remove (this); + } + + if (Unit != null) { + if (!Unit.Symbols.Contains (this)) { + Unit.Symbols.Add (this); + } + + UnitId = Unit.ID; + } + } + + #endregion + #region "IEquatable" + + public override int GetHashCode () + { + return this.Value.GetHashCode (); + } + + public override bool Equals (object obj) + { + if ((object)obj == null) { + return false; + } else if (!object.ReferenceEquals (obj.GetType(), this.GetType ())) { + return false; + } else { + return this.Equals ((Symbol)obj); + } + } + + public bool Equals (Symbol other) + { + if ((object)other == null) { + return false; + } else { + if (this.Value != other.Value) { + return false; + } else { + return true; + } + } + } + + public static bool operator != (Symbol left, Symbol right) + { + return !(left == right); + } + + public static bool operator == (Symbol left, Symbol right) + { + if (object.ReferenceEquals (left, right)) { + return true; + } else if ((object)left == null || (object)right == null) { + return false; + } else { + return left.Equals (right); + } + } + + #endregion + + public override string ToString () + { + return this.Value; + } + } +} \ No newline at end of file diff --git a/Cubico/Unit.cs b/Cubico/Unit.cs new file mode 100644 index 0000000..e2e8f2c --- /dev/null +++ b/Cubico/Unit.cs @@ -0,0 +1,232 @@ +using System; +using System.Runtime.Serialization; +using System.Collections.Generic; +using System.Linq; + +namespace Cubico +{ + [DataContract(IsReference = true)] + [KnownType(typeof(UnitType))] + [KnownType(typeof(Symbol))] + [KnownType(typeof(Modifier))] + [Serializable] + public partial class Unit : IEquatable + { + #region "Constructors" + + public Unit () : base() + { + } + + internal Unit (UnitType unitType) + { + if (unitType == null) { + throw new ArgumentNullException ("unitType"); + } + + this.UnitType = unitType; + } + + public bool IsDefault { + get { + foreach (Modifier mod in this.Modifiers) { + if (mod.UnitSourceID == mod.UnitTargetID && mod.UnitSourceID == this.ID) { + return true; + } + } + + return false; + } + } + + #endregion + #region "Primitive Properties" + + [DataMember] + public int ID { get; set; } + + [DataMember] + public string Name { get; set; } + + [DataMember] + public int UnitTypeID { get; set; } + + #endregion + #region "Navigation Properties" + + [DataMember] + public UnitType UnitType { get; set; } + + private List _symbols; + + [DataMember] + public List Symbols { + get { + if (_symbols == null && IsSerializing == false) { + _symbols = new List (); + } + return _symbols; + } + set { + if (!object.ReferenceEquals (_symbols, value)) { + _symbols = value; + } + } + } + + private List _sources; + + [DataMember] + public List Sources { + get { + if (_sources == null && IsSerializing == false) { + _sources = new List (); + } + return _sources; + } + set { + if (!object.ReferenceEquals (_sources, value)) { + _sources = value; + } + } + } + + private List _modifiers; + + [DataMember] + public List Modifiers { + get { + if (_modifiers == null && IsSerializing == false) { + _modifiers = new List (); + } + return _modifiers; + } + set { + if (!object.ReferenceEquals (_modifiers, value)) { + _modifiers = value; + } + } + } + + #endregion + #region "ChangeTracking" + + private bool _isDeserializing; + + protected bool IsDeserializing { + get { return _isDeserializing; } + private set { _isDeserializing = value; } + } + + [OnDeserializing] + public void OnDeserializingMethod (StreamingContext context) + { + IsDeserializing = true; + } + + [OnDeserialized] + public void OnDeserializedMethod (StreamingContext context) + { + IsDeserializing = false; + } + + private bool _isSerializing = false; + + protected bool IsSerializing { + get { return _isSerializing; } + private set { _isSerializing = value; } + } + + [OnSerializing] + public void OnSerializingMethod (StreamingContext context) + { + IsSerializing = true; + } + + [OnSerialized] + public void OnSerializedMethod (StreamingContext context) + { + IsSerializing = false; + } + + protected virtual void ClearNavigationProperties () + { + UnitType = null; + Symbols.Clear (); + Sources.Clear (); + Modifiers.Clear (); + } + + #endregion + #region "Properties" + + public string DefaultSymbol { + get { + Symbol symbol = (from s in this.Symbols + where s.IsDefault = true + select s).FirstOrDefault (); + + if (symbol == null) { + return string.Empty; + } else { + return symbol.Value; + } + } + } + + #endregion + #region "IEquatable" + + public override int GetHashCode () + { + return this.Name.GetHashCode (); + } + + public override bool Equals (object obj) + { + if ((object)obj == null) { + return false; + } else if (!object.ReferenceEquals (obj.GetType(), this.GetType ())) { + return false; + } else { + return this.Equals ((Unit)obj); + } + } + + public bool Equals (Unit other) + { + if (object.ReferenceEquals (other, null)) { + return false; + } else { + if (this.Name != other.Name) { + return false; + } else { + return true; + } + } + } + + public static bool operator != (Unit left, Unit right) + { + return !(left == right); + } + + public static bool operator == (Unit left, Unit right) + { + if (object.ReferenceEquals (left, right)) { + return true; + } else if ((object)left == null || (object)right == null) { + return false; + } else { + return left.Equals (right); + } + } + + #endregion + + public override string ToString () + { + return this.Name; + } + } +} \ No newline at end of file diff --git a/Cubico/UnitConverter.cs b/Cubico/UnitConverter.cs new file mode 100644 index 0000000..730a1ec --- /dev/null +++ b/Cubico/UnitConverter.cs @@ -0,0 +1,342 @@ +using System; +using System.Diagnostics.Contracts; +using System.Collections.Generic; +using System.Linq; + +namespace Cubico +{ + public class UnitConverter + { + //TODO: Fix this; was Previously NaN + const double _failsafeValue = 0; + Dictionary _SymbolDictionary; + Dictionary _IndividualSymbolDictionary; + Dictionary _UnitDictionary; + Dictionary _UnitTypeDictionary; + + // Constructor, sets up the unit converter. + public UnitConverter () + { + //Set up the tables we need + var unitPro = new UnitProvider (); + _SymbolDictionary = unitPro.Symbols; + _IndividualSymbolDictionary = unitPro.IndividualSymbols; + _UnitDictionary = unitPro.Units; + _UnitTypeDictionary = unitPro.UnitTypes; + + } + + #region "Unit related methods" + + // Given the full name of the unit, returns the unit entry. + public Unit GetUnitByName (string unitName) + { + if (string.IsNullOrEmpty (unitName)) { + throw new ArgumentException ("unitName must have a value."); + } + + if (this._UnitDictionary.ContainsKey (unitName)) { + return this._UnitDictionary [unitName]; + } else { + throw new ArgumentException ("The unit '" + unitName + "' was not found in the UnitConverter. Add this unit to the database for compatability."); + } + } + + // Given a unit symbol, gets the unit entry. + public Unit GetUnitBySymbol (string unitSymbol) + { + if (string.IsNullOrWhiteSpace (unitSymbol)) { + throw new ArgumentNullException ("unitSymbol must have a value"); + } + + //First check to see if they used the actual name of a unit then look at the symbol table. + Unit unitFound = (from val in this._UnitDictionary.Values where val.Name.ToUpper () == unitSymbol.Trim ().ToUpper () select val).FirstOrDefault (); + + if (unitFound != null) { + return unitFound; + } + + Symbol symFound = (from val in this._IndividualSymbolDictionary.Values where val.Value == unitSymbol.Trim () select val).FirstOrDefault (); + + if (symFound != null) { + return symFound.Unit; + } + + throw new ArgumentException ("The unit/symbol '" + unitSymbol + "' was not found in the UnitConverter. Add this unit to the database for compatability."); + + } + + #endregion + #region "Group related methods" + + // Gets a value that determines whether the given units are compatible or not. + public bool IsCompatible (string leftSymbol, string rightSymbol) + { + if (string.IsNullOrEmpty (leftSymbol) || string.IsNullOrEmpty (rightSymbol)) { + throw new ArgumentException ("The left and right symbol values cannot be empty or null."); + } + Contract.EndContractBlock (); + + Unit leftUnit = this.GetUnitBySymbol (leftSymbol); + Unit rightUnit = this.GetUnitBySymbol (rightSymbol); + + if ((leftUnit == null) || (rightUnit == null)) { + return false; + } + + return (this.GetUnitType (leftUnit.Name) == this.GetUnitType (rightUnit.Name)); + } + + // Creates a new unit group and adds it to the group table. + Result CreateNewGroup (string groupName) + { + //Create the new group + var newType = new UnitType { Name = groupName }; + + //Add it to the group table + this._UnitTypeDictionary.Add (groupName, newType); + + return Result.NoError; + } + + // Adds the named unit to the specified group. + Result AddUnitToGroup (string unitName, string unitTypeName) + { + Unit unit = this._UnitDictionary [unitName]; + UnitType group = this._UnitTypeDictionary [unitTypeName]; + + //Make sure the unit exists. + if (unit == null) { + return Result.UnitNotFound; + } + + //Make sure the group exists. + if (group == null) { + return Result.GroupNotFound; + } + + //Add the unit. + group.Units.Add (unit); + + return Result.NoError; + } + + // Given the name of a unit, searches for the unit group it belongs to. + UnitType GetUnitType (string unitName) + { + if (string.IsNullOrEmpty (unitName)) { + throw new ArgumentException ("unitName must have a value"); + } + Contract.EndContractBlock (); + + //Does the unit even exist? + if (this._UnitDictionary.ContainsKey (unitName) == false) { + return null; + } else { + //Iterate through every group + var unitPro = new UnitProvider (); + foreach (var ut in unitPro.UnitTypes) { + if (ut.Value.Units.Contains (new Unit { Name = unitName })) { + return ut.Value; + } + } + return null; + } + } + + #endregion + #region "Conversion methods" + + // Performs a unit conversion between two units, given a value to convert. + public Measurement ConvertUnits (double value, string currentUnitName, string targetUnitName) + { + double x = value; + + //Default to the fail safe value. + double output = 0; + output = _failsafeValue; + + if (string.IsNullOrEmpty (currentUnitName) || string.IsNullOrEmpty (targetUnitName)) { + return new Measurement (0, Result.BadUnit); + } + + Unit currentUnit = GetUnitBySymbol (currentUnitName); + Unit targetUnit = GetUnitBySymbol (targetUnitName); + + //Make sure both units are real units. + if ((currentUnit == null) || (targetUnit == null)) { + return new Measurement (output, Result.BadUnit); + } + + //Make sure the units are of the same group + if (!this.IsCompatible (currentUnit.Name, targetUnit.Name)) { + return new Measurement (output, Result.UnitMismatch); + } + + return ConvertCurrentToTarget (x, currentUnit.Name, targetUnit.Name); + } + + // Performs a unit conversion from the standard value into the specified unit. + public Measurement ConvertCurrentToTarget (double value, string currentUnitName, string targetUnitName) + { + double x = value; + + //Default to the fail safe value. + double output = 0; + output = _failsafeValue; + + if (string.IsNullOrEmpty (targetUnitName)) { + return new Measurement (0, Result.BadUnit); + } + + Unit currentUnit = GetUnitBySymbol (currentUnitName); + Unit targetUnit = GetUnitBySymbol (targetUnitName); + + //Make sure both units are real units. + if (targetUnit == null) { + return new Measurement (output, Result.BadUnit); + } + + try { + var moders = from m in targetUnit.Modifiers + where m.UnitSourceID == currentUnit.ID && m.UnitTargetID == targetUnit.ID + orderby m.Order + select m; + + foreach (var moder in moders) { + int m_intPrecision = 15; + + if (moder.Precision != null) { + m_intPrecision = Convert.ToInt32 (moder.Precision); + } + + switch (moder.ModifierType) { + case ModifierType.PreAdd: + x = x - (double)moder.Value; + break; + case ModifierType.Multiply: + if (moder.Value > 0) { + x = System.Math.Round (x * (double)moder.Value, m_intPrecision); + } + break; + case ModifierType.Divide: + if (moder.Value > 0) { + x = System.Math.Round (x / (double)moder.Value, m_intPrecision); + } + break; + case ModifierType.Add: + x = System.Math.Round (x + (double)moder.Value, m_intPrecision); + break; + case ModifierType.Subtract: + x = System.Math.Round (x - (double)moder.Value, m_intPrecision); + break; + } + } + + output = x; + } catch { + //Probably overflowed or something. + return new Measurement (output, Result.BadValue); + } + + return new Measurement (output, targetUnit); + } + + #endregion + #region "Parsing routines" + + // Parses a number string with operators. + ConversionResult ParseNumberString(string input) + { + if (string.IsNullOrEmpty(input)) { + throw new ArgumentException("input must have a value"); + } + + //Default value + double value = 0; + value = 0; + + //Split the numbers on the ^ operator + string[] numbers = null; + numbers = input.Split(new char[] { '^' }); + + if (numbers.Length == 1) { + //Only one value, so there was no ^ operator present, so just return the one number. + try { + value = Convert.ToDouble(numbers[0]); + } catch { + return new ConversionResult(0, Result.BadValue); + } + } else { + //There is a ^ operator, so try to use it. + try { + value = Convert.ToDouble(numbers[0]); + value = Convert.ToDouble(System.Math.Pow(value, Convert.ToDouble(numbers[1]))); + } catch { + return new ConversionResult(0, Result.BadValue); + + } + } + + return new ConversionResult(value); + } + + // Given a string in the format "[value] [unit]", splits and returns the parts. + public Measurement ParseUnitString (string input) + { + //Defaults + double value = 0; + string symbol = null; + value = 0; + symbol = ""; + + if (string.IsNullOrEmpty (input)) { + return new Measurement (0, Result.BadValue); + } + + int i = 0; + + string s1 = ""; + string s2 = ""; + + //Look for the first letter or punctuation character. + i = 0; + while (i < input.Length) { + if (Char.IsLetter (input, i) || char.IsPunctuation (input, i) || char.IsSymbol (input, i)) { + if (input [i] != Convert.ToChar (".") && input [i] != Convert.ToChar ("-")) { + break; // TODO: might not be correct. Was : Exit While + } + } + System.Math.Max (System.Threading.Interlocked.Increment(ref i), i - 1); + } + + s1 = input.Substring (0, i); + s1 = s1.Trim (); + s2 = input.Substring (i); + s2 = s2.Trim (); + + //No value? default to 0 + if (string.IsNullOrEmpty (s1)) { + s1 = "0"; + } + + try { + value = Convert.ToDouble (s1); + } catch { + return new Measurement (0, Result.BadValue); + } + + try { + this.GetUnitBySymbol (s2); + } catch (Exception) { + return new Measurement (0, Result.BadUnit); + } + + symbol = s2; + + return new Measurement (value, symbol); + } + + #endregion + } +} \ No newline at end of file diff --git a/Units/UnitData.xml b/Cubico/UnitData.xml similarity index 100% rename from Units/UnitData.xml rename to Cubico/UnitData.xml diff --git a/Cubico/UnitProvider.cs b/Cubico/UnitProvider.cs new file mode 100644 index 0000000..9e8b097 --- /dev/null +++ b/Cubico/UnitProvider.cs @@ -0,0 +1,401 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Xml; + +namespace Cubico +{ + // Facilitates the loading and caching of the unit of measure data. + public class UnitProvider + { + #region "Constructors" + + public UnitProvider () + { + if (_dataFile == null) { + this.LoadDataFile (); + } + } + + #endregion + #region "Properties" + + static XmlDocument _dataFile; + + protected XmlDocument DataFile { + get{ return _dataFile;} + set{ _dataFile = value;} + } + + //Singleton + static Dictionary _unitTypes; + + public Dictionary UnitTypes { + get { + if (_unitTypes == null) { + GetAllUnitTypes (); + } + return _unitTypes; + } + } + + Dictionary _units; + + public Dictionary Units { + get { + if (_units == null) { + _units = GetAllUnits (); + } + return _units; + } + } + + static Dictionary> _individualModifiers; + static Dictionary _symbols; + static Dictionary _individualSymbols; + static Dictionary> _symbolLookUp; + + public Dictionary Symbols { + get { + if (_symbols == null) { + _symbols = GetAllSymbols (); + } + return _symbols; + } + } + + #endregion + #region "Methods" + #region "File Load Methods" + + void LoadDataFile () + { + const string fileName = "Cubico.UnitData.xml"; + var assembly = Assembly.GetExecutingAssembly (); + var stream = assembly.GetManifestResourceStream (fileName); + + if (stream == null) { + throw new FileNotFoundException ("Cannot find unit data file", fileName); + } + + _dataFile = new XmlDocument (); + _dataFile.Load (stream); + + this.ProcessUnitConverterData (); + } + + void ProcessUnitConverterData () + { + foreach (XmlNode node in this.DataFile.ChildNodes) { + if (node.Name == "UnitConverterData") { + ProcessDataTypes (node); + } + } + } + + void ProcessDataTypes (XmlNode parentNode) + { + foreach (XmlNode node in parentNode.ChildNodes) { + switch (node.Name) { + case "UnitTypes": + ProcessUnitTypes (node); + break; + case "Units": + ProcessUnits (node); + break; + case "Symbols": + ProcessUnitSymbols (node); + break; + case "UnitModifiers": + ProcessUnitModifiers (node); + break; + } + } + } + + void ProcessUnitModifiers (XmlNode parentNode) + { + _individualModifiers = new Dictionary> (); + + foreach (XmlNode node in parentNode.ChildNodes) { + if (node.Name == "UnitModifier") { + var mod = new Modifier (); + + foreach (XmlAttribute attrib in node.Attributes) { + switch (attrib.Name) { + case "ID": + mod.ID = Convert.ToInt32 (attrib.Value); + break; + case "Value": + mod.Value = Convert.ToDecimal (attrib.Value); + break; + case "Order": + mod.Order = Convert.ToInt32 (attrib.Value); + break; + case "ModifierID": + mod.ModifierType = (ModifierType)Convert.ToInt32 (attrib.Value); + break; + case "UnitSourceID": + mod.UnitSourceID = Convert.ToInt32 (attrib.Value); + break; + case "UnitTargetID": + mod.UnitTargetID = Convert.ToInt32 (attrib.Value); + break; + case "Precision": + mod.Precision = Convert.ToInt32 (attrib.Value); + break; + } + + } + + if (_individualModifiers.ContainsKey (mod.UnitTargetID)) { + var data = _individualModifiers [mod.UnitTargetID]; + data.Add (mod); + } else { + var data = new List { mod }; + _individualModifiers.Add (mod.UnitTargetID, data); + } + + } + } + } + + void ProcessUnitSymbols (XmlNode parentNode) + { + _symbolLookUp = new Dictionary> (); + foreach (XmlNode node in parentNode.ChildNodes) { + if (node.Name == "UnitSymbol") { + var sym = new Cubico.Symbol (); + + foreach (XmlAttribute attrib in node.Attributes) { + switch (attrib.Name) { + case "ID": + sym.Id = Convert.ToInt32 (attrib.Value); + break; + case "Symbol": + sym.Value = attrib.Value; + break; + case "UnitID": + sym.UnitId = Convert.ToInt32 (attrib.Value); + break; + case "IsDefault": + int value = Convert.ToInt32 (attrib.Value); + if (value == 1) + sym.IsDefault = true; + else + sym.IsDefault = false; + + break; + } + + } + + if (_symbolLookUp.ContainsKey (sym.UnitId)) { + var data = _symbolLookUp [sym.UnitId]; + data.Add (sym); + } else { + var data = new List { sym }; + _symbolLookUp.Add (sym.UnitId, data); + } + } + } + } + + void ProcessUnits (XmlNode parentNode) + { + _units = new Dictionary (); + foreach (XmlNode node in parentNode.ChildNodes) { + + if (node.Name == "Unit") { + var unit = new Unit (); + + foreach (XmlAttribute attrib in node.Attributes) { + switch (attrib.Name) { + case "ID": + unit.ID = Convert.ToInt32 (attrib.Value); + break; + case "Name": + unit.Name = attrib.Value; + break; + case "UnitTypeID": + unit.UnitTypeID = Convert.ToInt32 (attrib.Value); + break; + } + + } + + if (_symbolLookUp.ContainsKey (unit.ID)) { + unit.Symbols = _symbolLookUp [unit.ID]; + + foreach (Symbol sym in unit.Symbols) { + sym.Unit = unit; + } + } + if (_individualModifiers.ContainsKey (unit.ID)) { + unit.Modifiers = _individualModifiers [unit.ID]; + + foreach (Modifier mod in unit.Modifiers) { + mod.ParentUnit = unit; + } + } + _units.Add (unit.Name, unit); + + } + } + } + + void ProcessUnitTypes (XmlNode parentNode) + { + _unitTypes = new Dictionary (); + foreach (XmlNode node in parentNode.ChildNodes) { + if (node.Name == "UnitType") { + var ut = new UnitType (); + + foreach (XmlAttribute attrib in node.Attributes) { + switch (attrib.Name) { + case "ID": + ut.ID = Convert.ToInt32 (attrib.Value); + break; + case "Name": + ut.Name = attrib.Value; + break; + case "Description": + ut.Description = attrib.Value; + break; + } + + } + + // Make this a for loop for speed reasons or use a multikey dictionary. + var unitData = (from unit in _units.Values + where unit.UnitTypeID == ut.ID + select unit).ToList (); + ut.Units = unitData; + + foreach (Unit unitItem in ut.Units) { + unitItem.UnitType = ut; + } + + _unitTypes.Add (ut.Name, ut); + + } + } + } + + #endregion + #region "UnitTypes" + + //TODO: Change to ReadOnlyDictionary when .Net 4.0 is available + void GetAllUnitTypes () + { + } + + #endregion + #region "Units" + + //TODO: Change to ReadOnlyDictionary when .Net 4.0 is available + Dictionary GetAllUnits () + { + var unitDict = new Dictionary (); + var unitPro = new UnitProvider (); + var query = from s in unitPro.UnitTypes select s; + + + foreach (var itm in query) { + UnitType ut = itm.Value; + + foreach (var un in ut.Units) { + if (!unitDict.ContainsKey (un.Name)) { + unitDict.Add (un.Name, un); + } + } + //Units "Celsius" + } + //UnitTypes "Temperature" + + return unitDict; + } + + #endregion + #region "Symbols" + + + public Dictionary IndividualSymbols { + get { + if (_individualSymbols == null) { + _individualSymbols = GetAllIndividualSymbols (); + } + return _individualSymbols; + } + } + + //TODO: Change to ReadOnlyDictionary when .Net 4.0 is available + Dictionary GetAllSymbols () + { + var unitDict = new Dictionary (); + var query = from s in this.UnitTypes select s; + + foreach (var itm in query) { + UnitType ut = itm.Value; + + foreach (var un in ut.Units) { + Unit unit = un; + + if (unit.Symbols == null || unit.Symbols.Count == 0) { + //No symbols. Add name of unit as symbol. + if (!unitDict.ContainsKey (unit.Name)) { + unitDict.Add (unit.Name, unit); + } + } else { + foreach (var sy in unit.Symbols) { + if (!unitDict.ContainsKey (sy.Value)) { + unitDict.Add (sy.Value, unit); + } + } + //Symbols "C" + + if (!unitDict.ContainsKey (unit.Name)) { + unitDict.Add (unit.Name, unit); + //Add name as symbol just in case + } + } + } + //Units "Celsius" + } + //UnitTypes "Temperature" + + return unitDict; + } + + //TODO: Change to ReadOnlyDictionary when .Net 4.0 is available + Dictionary GetAllIndividualSymbols () + { + var unitDict = new Dictionary (); + var unitPro = new UnitProvider (); + var query = from s in unitPro.UnitTypes select s; + + + foreach (var itm in query) { + UnitType ut = itm.Value; + + + foreach (var un in ut.Units) { + Unit unit = un; + + foreach (var us in unit.Symbols) { + if (!unitDict.ContainsKey (us.Value)) { + unitDict.Add (us.Value, us); + } + } + } + } + + return unitDict; + } + + #endregion + #endregion + } +} \ No newline at end of file diff --git a/Units/UnitType.cs b/Cubico/UnitType.cs similarity index 55% rename from Units/UnitType.cs rename to Cubico/UnitType.cs index db9c284..ccfb07c 100644 --- a/Units/UnitType.cs +++ b/Cubico/UnitType.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Specialized; -using System.ComponentModel; using System.Runtime.Serialization; using System.Collections.Generic; -namespace Units +namespace Cubico { [DataContract(IsReference = true)] [KnownType(typeof(Unit))] @@ -12,134 +10,136 @@ namespace Units public partial class UnitType : IEquatable { #region "Constructors" - public UnitType() : base() - { + public UnitType () : base() + { } - #endregion + #endregion #region "Primitive Properties" - private int _iD; + int _iD; + [DataMember()] public int ID { get { return _iD; } set { - if (!Equals(_iD, value)) { + if (!Equals (_iD, value)) { _iD = value; } } } - private string _name; + string _name; + [DataMember()] public string Name { get { return _name; } set { - if (!Equals(_name, value)) { + if (!Equals (_name, value)) { _name = value; } } } - private string _description; + string _description; + [DataMember()] public string Description { get { return _description; } set { - if (!Equals(_description, value)) { + if (!Equals (_description, value)) { _description = value; } } } - #endregion - #region "Navigation Properties" [DataMember()] public List Units { get { if (_units == null && IsSerializing == false) { - _units = new List(); - } + _units = new List (); + } return _units; } set { - if (!object.ReferenceEquals(_units, value)) { + if (!object.ReferenceEquals (_units, value)) { _units = value; } } } + List _units; - private List _units; #endregion - #region "ChangeTracking" - - private bool _isDeserializing; + + bool _isDeserializing; + protected bool IsDeserializing { get { return _isDeserializing; } - private set { _isDeserializing = value; } + set { _isDeserializing = value; } } [OnDeserializing()] - public void OnDeserializingMethod(StreamingContext context) + public void OnDeserializingMethod (StreamingContext context) { IsDeserializing = true; } [OnDeserialized()] - public void OnDeserializedMethod(StreamingContext context) + public void OnDeserializedMethod (StreamingContext context) { IsDeserializing = false; } - private bool _isSerializing = false; + bool _isSerializing = false; + protected bool IsSerializing { get { return _isSerializing; } - private set { _isSerializing = value; } + set { _isSerializing = value; } } [OnSerializing()] - public void OnSerializingMethod(StreamingContext context) + public void OnSerializingMethod (StreamingContext context) { IsSerializing = true; } [OnSerialized()] - public void OnSerializedMethod(StreamingContext context) + public void OnSerializedMethod (StreamingContext context) { IsSerializing = false; } - protected virtual void ClearNavigationProperties() + protected virtual void ClearNavigationProperties () { - Units.Clear(); + Units.Clear (); } #endregion - #region "IEquatable(Of UnitType)" - public override int GetHashCode() + + public override int GetHashCode () { - return (this.Name).GetHashCode(); + return (this.Name).GetHashCode (); } - public override bool Equals(object obj) + public override bool Equals (object obj) { - if (obj == null || !object.ReferenceEquals(obj.GetType(), typeof(UnitType))) { + if (obj == null || !object.ReferenceEquals (obj.GetType(), typeof(UnitType))) { return false; } UnitType unitTypeObj = (UnitType)obj; - return this.Equals(unitTypeObj); + return this.Equals (unitTypeObj); } - public bool Equals(UnitType other) + public bool Equals (UnitType other) { if ((object)other == null) { return false; @@ -152,22 +152,22 @@ public bool Equals(UnitType other) } } - public static bool operator !=(UnitType left, UnitType right) + public static bool operator != (UnitType left, UnitType right) { - return !(left == right); + return !(left == right); } - public static bool operator ==(UnitType left, UnitType right) + public static bool operator == (UnitType left, UnitType right) { - if (object.ReferenceEquals(left, right)) { + if (object.ReferenceEquals (left, right)) { return true; } else if ((object)left == null || (object)right == null) { return false; } else { - return left.Equals(right); + return left.Equals (right); } } + #endregion } - } \ No newline at end of file diff --git a/Units.Test/ConversionResultTest.cs b/Units.Test/ConversionResultTest.cs deleted file mode 100644 index 361850e..0000000 --- a/Units.Test/ConversionResultTest.cs +++ /dev/null @@ -1,284 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Units; - -[TestClass()] -public class ConversionResultTest -{ - - - private TestContext testContextInstance; - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get { return testContextInstance; } - set { testContextInstance = value; } - } - - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ - //Public Sub MyTestCleanup() - //End Sub - // - #endregion - - #region "ConversionResult.ConversionResult()" - [TestMethod()] - public void ConversionResultConstructorTest() - { - ConversionResult res = new ConversionResult(); - - Assert.IsNotNull(res); - Assert.AreEqual(0, res.Value); - Assert.AreEqual(Result.NoError, res.Result); - Assert.AreEqual(null, res.Symbol); - } - #endregion - - #region "ConversionResult.ConversionResult(Double)" - [TestMethod()] - public void ConversionResultConstructorDoubleTest() - { - ConversionResult res = new ConversionResult(10.5); - - Assert.IsNotNull(res); - Assert.AreEqual(10.5, res.Value); - Assert.AreEqual(Result.NoError, res.Result); - Assert.AreEqual(null, res.Symbol); - } - - [TestMethod()] - public void ConversionResultConstructorDoubleZeroTest() - { - ConversionResult res = new ConversionResult((double)0); - - Assert.IsNotNull(res); - Assert.AreEqual(0, res.Value); - Assert.AreEqual(Result.NoError, res.Result); - Assert.AreEqual(null, res.Symbol); - } - #endregion - - #region "ConversionResult.ConversionResult(Double, String)" - [TestMethod()] - public void ConversionResultConstructorDoubleStringTest() - { - ConversionResult res = new ConversionResult(10.5, "lb"); - - Assert.IsNotNull(res); - Assert.AreEqual(10.5, res.Value); - Assert.AreEqual(Result.NoError, res.Result); - Assert.AreEqual("lb", res.Symbol); - } - - [TestMethod()] - public void ConversionResultConstructorDoubleStringNullTest() - { - ConversionResult res = new ConversionResult(0, Convert.ToString(null)); - - Assert.IsNotNull(res); - Assert.AreEqual(0, res.Value); - Assert.AreEqual(Result.NoError, res.Result); - Assert.AreEqual(null, res.Symbol); - } - - [TestMethod()] - public void ConversionResultConstructorDoubleStringNullTest2() - { - ConversionResult res = new ConversionResult(10.5, Convert.ToString(null)); - - Assert.IsNotNull(res); - Assert.AreEqual(10.5, res.Value); - Assert.AreEqual(Result.NoError, res.Result); - Assert.AreEqual(null, res.Symbol); - } - - [TestMethod()] - public void ConversionResultConstructorDoubleStringZeroTest3() - { - ConversionResult res = new ConversionResult(0, "lb"); - - Assert.IsNotNull(res); - Assert.AreEqual(0, res.Value); - Assert.AreEqual(Result.NoError, res.Result); - Assert.AreEqual("lb", res.Symbol); - } - #endregion - - #region "ConversionResult.ConversionResult(Double, Result)" - [TestMethod()] - public void ConversionResultConstructorDoubleResultTest() - { - ConversionResult res = new ConversionResult(10.5, Result.GenericError); - - Assert.IsNotNull(res); - Assert.AreEqual(10.5, res.Value); - Assert.AreEqual(Result.GenericError, res.Result); - Assert.AreEqual(null, res.Symbol); - } - - [TestMethod()] - public void ConversionResultConstructorDoubleResultNullTest() - { - ConversionResult res = new ConversionResult(0, (Result)0); - - Assert.IsNotNull(res); - Assert.AreEqual(0, res.Value); - Assert.AreEqual(Result.NoError, res.Result); - Assert.AreEqual(null, res.Symbol); - } - - [TestMethod()] - public void ConversionResultConstructorDoubleResultNullTest2() - { - ConversionResult res = new ConversionResult(10.5, (Result)0); - - Assert.IsNotNull(res); - Assert.AreEqual(10.5, res.Value); - Assert.AreEqual(Result.NoError, res.Result); - Assert.AreEqual(null, res.Symbol); - } - - [TestMethod()] - public void ConversionResultConstructorDoubleResultNullTest3() - { - ConversionResult res = new ConversionResult(0, Result.GenericError); - - Assert.IsNotNull(res); - Assert.AreEqual(0, res.Value); - Assert.AreEqual(Result.GenericError, res.Result); - Assert.AreEqual(null, res.Symbol); - } - #endregion - - #region "ConversionResult.ConversionResult(Result)" - [TestMethod()] - public void ConversionResultConstructorResultTest() - { - ConversionResult res = new ConversionResult(Result.GenericError); - - Assert.IsNotNull(res); - Assert.AreEqual(0, res.Value); - Assert.AreEqual(Result.GenericError, res.Result); - Assert.AreEqual(null, res.Symbol); - } - - [TestMethod()] - public void ConversionResultConstructorResultNullTest() - { - ConversionResult res = new ConversionResult(0.0); - - Assert.IsNotNull(res); - Assert.AreEqual(0, res.Value); - Assert.AreEqual(Result.NoError, res.Result); - Assert.AreEqual(null, res.Symbol); - } - #endregion - - #region "ConversionResult.Result" - [TestMethod()] - public void ConversionResultResultTest() - { - ConversionResult res = new ConversionResult(Result.GenericError); - - Assert.IsNotNull(res); - Assert.AreEqual(Result.GenericError, res.Result); - - res.Result = Result.UnitNotFound; - - Assert.AreEqual(Result.UnitNotFound, res.Result); - } - - [TestMethod()] - public void ConversionResultResultNullTest() - { - ConversionResult res = new ConversionResult(Result.GenericError); - - Assert.IsNotNull(res); - Assert.AreEqual(Result.GenericError, res.Result); - - res.Result = Result.NoError; - - Assert.AreEqual(Result.NoError, res.Result); - } - #endregion - - #region "ConversionResult.Value" - [TestMethod()] - public void ConversionResultValueTest() - { - ConversionResult res = new ConversionResult(12.1); - - Assert.IsNotNull(res); - Assert.AreEqual(12.1, res.Value); - - res.Value = 0.33; - - Assert.AreEqual(0.33, res.Value); - } - - [TestMethod()] - public void ConversionResultValueNullTest() - { - ConversionResult res = new ConversionResult(12.1); - - Assert.IsNotNull(res); - Assert.AreEqual(12.1, res.Value); - - res.Value = 0.0; - - Assert.AreEqual(0, res.Value); - } - #endregion - - #region "ConversionResult.Symbol" - [TestMethod()] - public void ConversionResultSymbolTest() - { - ConversionResult res = new ConversionResult(12.1, "ft"); - - Assert.IsNotNull(res); - Assert.AreEqual("ft", res.Symbol); - - res.Symbol = "C"; - - Assert.AreEqual("C", res.Symbol); - } - - [TestMethod()] - public void ConversionResultSymbolNullTest() - { - ConversionResult res = new ConversionResult(12.1, "ft"); - - Assert.IsNotNull(res); - Assert.AreEqual("ft", res.Symbol); - - res.Symbol = null; - - Assert.AreEqual(null, res.Symbol); - } - #endregion -} - diff --git a/Units.Test/Cubico.Test.csproj b/Units.Test/Cubico.Test.csproj deleted file mode 100644 index 491fd69..0000000 --- a/Units.Test/Cubico.Test.csproj +++ /dev/null @@ -1,101 +0,0 @@ - - - - Debug - AnyCPU - {720BF499-D91E-4A86-82C0-D072C8EE00E1} - Library - Properties - Cubico.Test - Cubico.Test - v4.5 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {5c21f8e4-02c4-4614-97c7-1899f4e6e634} - Cubico - - - - - - - False - - - False - - - False - - - False - - - - - - - - \ No newline at end of file diff --git a/Units.Test/MeasurementTests.cs b/Units.Test/MeasurementTests.cs deleted file mode 100644 index b134eb1..0000000 --- a/Units.Test/MeasurementTests.cs +++ /dev/null @@ -1,1518 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Units; - -/// -///This is a test class for MeasurementTest and is intended -///to contain all MeasurementTest Unit Tests -/// -[TestClass()] -public class MeasurementTests -{ - - private TestContext testContextInstance; - - private UnitProvider unitPro = new UnitProvider(); - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get { return testContextInstance; } - set { testContextInstance = value; } - } - - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ - //Public Sub MyTestCleanup() - //End Sub - // - #endregion - - #region "Measurement.Value" - /// - ///A test for Value - /// - [TestMethod()] - public void MeasurementValueTest() - { - double expected = 10; - Measurement target = new Measurement(expected, "ft"); - double actual = 0; - actual = target.Value; - - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.Unit" - /// - ///A test for Unit - /// - [TestMethod()] - public void MeasurementUnitTest() - { - Unit expected = unitPro.Units["Feet"]; - Measurement target = new Measurement(10, "ft"); - Unit actual = default(Unit); - actual = target.Unit; - - Assert.AreEqual(expected.Name, actual.Name); - } - #endregion - - #region "Measurement.Symbol" - /// - ///A test for Symbol - /// - [TestMethod()] - public void MeasurementSymbolTest() - { - string expected = "ft"; - Measurement target = new Measurement(10, expected); - string actual = null; - actual = target.Symbol; - - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementSymbolNullTest() - { - string expected = null; - Measurement target = new Measurement(10, expected); - string actual = null; - actual = target.Symbol; - - } - #endregion - - #region "Measurement.IsValid" - /// - ///A test for IsValid - /// - [TestMethod()] - public void MeasurementIsValidTest() - { - bool expected = true; - Measurement target = new Measurement(10, "ft"); - bool actual = false; - actual = target.IsValid; - - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementIsValidNullTest() - { - bool expected = false; - Measurement target = new Measurement(null); - bool actual = false; - actual = target.IsValid; - - Assert.AreEqual(expected, actual); - } - - //[TestMethod()] - //public void MeasurementIsValidNullTest2() - //{ - // bool expected = false; - // Measurement target = null; - // bool actual = false; - // actual = target.IsValid; - - // Assert.AreEqual(expected, actual); - // Assert.IsTrue(target == null); - // Assert.IsFalse(target != null); - //} - - [TestMethod()] - public void MeasurementIsValidBadUnitTest() - { - bool expected = false; - Measurement target = new Measurement(10, "ft", Result.BadUnit); - bool actual = false; - actual = target.IsValid; - - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.FullValue" - /// - ///A test for FullValue - /// - [TestMethod()] - public void MeasurementFullValueTest() - { - string expected = "10ft"; - Measurement target = new Measurement(10, "ft"); - string actual = null; - actual = target.FullValue; - - Assert.AreEqual(expected, actual); - } - - // _ - //Public Sub MeasurementFullValueNullTest() - // Dim expected As String = "10" - // Dim target As Measurement = New Measurement(10, DirectCast(Nothing, String)) - // Dim actual As String - // actual = target.FullValue - - // Assert.AreEqual(Of String)(expected, actual) - //End Sub - #endregion - - #region "Measurement.Flags" - /// - ///A test for Flags - /// - [TestMethod()] - public void MeasurementFlagsTest() - { - Measurement target = new Measurement(10, "ft"); - MeasurementFlags expected = MeasurementFlags.UseMaxBound; - MeasurementFlags actual = default(MeasurementFlags); - target.Flags = expected; - actual = target.Flags; - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.Converter" - /// - ///A test for Converter - /// - [TestMethod()] - public void MeasurementConverterTest() - { - Measurement target = new Measurement(10, "ft"); - UnitConverter actual = default(UnitConverter); - actual = target.Converter; - - Assert.IsNotNull(actual); - } - #endregion - - #region "Measurement.ConversionResult" - /// - ///A test for ConversionResult - /// - [TestMethod()] - public void MeasurementConversionResultTest() - { - Measurement target = new Measurement(10, "ft"); - Result expected = Result.GroupNotFound; - Result actual = default(Result); - target.ConversionResult = expected; - actual = target.ConversionResult; - - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementConversionResultNullTest() - { - Measurement target = new Measurement(10, "ft"); - Result expected = Result.NoError; - Result actual = default(Result); - target.ConversionResult = Result.NoError; - actual = target.ConversionResult; - - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.ValidateEntry(Value,Symbol)" - /// - ///A test for ValidateEntry - /// - [TestMethod()] - public void MeasurementValidateEntryValueSymbolTest() - { - Measurement target = new Measurement(10, "ft"); - double value = 100; - string symbol = "in"; - Result expected = Result.NoError; - Result actual = default(Result); - actual = target.ValidateEntry(value, symbol); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementValidateEntryValueSymbolIncompatibleTest() - { - Measurement target = new Measurement(10, "ft"); - double value = 100; - string symbol = "hr"; - Result expected = Result.UnitMismatch; - Result actual = default(Result); - actual = target.ValidateEntry(value, symbol); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementValidateEntryValueSymbolMaxTest() - { - Measurement target = new Measurement(10, "ft"); - target.SetMaxBound(100, "ft"); - target.Flags = MeasurementFlags.UseMaxBound; - double value = 200; - string symbol = "ft"; - Result expected = Result.ValueTooHigh; - Result actual = default(Result); - actual = target.ValidateEntry(value, symbol); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementValidateEntryValueSymbolMinTest() - { - Measurement target = new Measurement(10, "ft"); - target.SetMinBound(5, "ft"); - target.Flags = MeasurementFlags.UseMinBound; - double value = 1; - string symbol = "ft"; - Result expected = Result.ValueTooLow; - Result actual = default(Result); - actual = target.ValidateEntry(value, symbol); - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.ValidateEntry(entry)" - /// - ///A test for ValidateEntry - /// - [TestMethod()] - public void MeasurementValidateEntrySymbolTest() - { - Measurement target = new Measurement(10, "ft"); - string entry = "100in"; - Result expected = Result.NoError; - Result actual = default(Result); - actual = target.ValidateEntry(entry); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementValidateEntrySymbolIncompatibleTest() - { - Measurement target = new Measurement(10, "ft"); - string entry = "100hr"; - Result expected = Result.UnitMismatch; - Result actual = default(Result); - actual = target.ValidateEntry(entry); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementValidateEntrySymbolMaxTest() - { - Measurement target = new Measurement(10, "ft"); - target.SetMaxBound(100, "ft"); - target.Flags = MeasurementFlags.UseMaxBound; - string entry = "200ft"; - Result expected = Result.ValueTooHigh; - Result actual = default(Result); - actual = target.ValidateEntry(entry); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementValidateEntrySymbolMinTest() - { - Measurement target = new Measurement(10, "ft"); - target.SetMinBound(5, "ft"); - target.Flags = MeasurementFlags.UseMinBound; - string entry = "1ft"; - Result expected = Result.ValueTooLow; - Result actual = default(Result); - actual = target.ValidateEntry(entry); - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.ToString" - /// - ///A test for ToString - /// - [TestMethod()] - public void MeasurementToStringTest() - { - Measurement target = new Measurement(10, "ft"); - string expected = "10ft"; - string actual = null; - actual = target.ToString(); - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.SetValue(measurementString)" - /// - ///A test for SetValue - /// - [TestMethod()] - public void MeasurementSetValueStringTest() - { - Measurement target = new Measurement("ft"); - string measurement = "10ft"; - Result expected = Result.NoError; - Result actual = default(Result); - actual = target.SetValue(measurement); - Assert.AreEqual(expected, actual); - Assert.AreEqual(10, target.Value); - } - - [TestMethod()] - public void MeasurementSetValueStringTest2() - { - Measurement target = new Measurement("ft"); - string measurement = "12in"; - Result expected = Result.NoError; - Result actual = default(Result); - actual = target.SetValue(measurement); - Assert.AreEqual(expected, actual); - Assert.AreEqual(12, target.Value); - } - - [TestMethod()] - public void MeasurementSetValueStringTest3() - { - Measurement target = new Measurement("ft"); - target.Flags = MeasurementFlags.ForceUnit; - string measurement = "12in"; - Result expected = Result.NoError; - Result actual = default(Result); - actual = target.SetValue(measurement); - Assert.AreEqual(expected, actual); - Assert.AreEqual(1, target.Value); - } - - [TestMethod()] - public void MeasurementSetValueStringInvalidTest() - { - Measurement target = new Measurement("ft"); - string measurement = "12hr"; - Result expected = Result.UnitMismatch; - Result actual = default(Result); - actual = target.SetValue(measurement); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - [ExpectedException(typeof(ArgumentNullException))] - public void MeasurementSetValueStringNullTest() - { - Measurement target = new Measurement("ft"); - Result actual = default(Result); - actual = target.SetValue((string)null); - Assert.Fail(); - } - - [TestMethod()] - [ExpectedException(typeof(ArgumentNullException))] - public void MeasurementSetValueStringEmptyTest() - { - Measurement target = new Measurement("ft"); - Result actual = default(Result); - actual = target.SetValue(string.Empty); - Assert.Fail(); - } - #endregion - - #region "Measurement.SetValue(value)" - /// - ///A test for SetValue - /// - [TestMethod()] - public void MeasurementSetValueTest() - { - Measurement target = new Measurement("ft"); - double value = 15; - Result expected = Result.NoError; - Result actual = default(Result); - actual = target.SetValue(value); - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.SetUnit(symbol)" - /// - ///A test for SetUnit - /// - [TestMethod()] - public void MeasurementSetUnitTest() - { - Measurement target = new Measurement("ft"); - string unitSymbol = "s"; - Result expected = Result.NoError; - Result actual = default(Result); - actual = target.SetUnit(unitSymbol); - Assert.AreEqual(expected, actual); - Assert.AreEqual("Second", target.Unit.Name); - } - - [TestMethod()] - public void MeasurementSetUnitTest2() - { - Measurement target = new Measurement("ft"); - string unitSymbol = "ft"; - Result expected = Result.NoError; - Result actual = default(Result); - actual = target.SetUnit(unitSymbol); - Assert.AreEqual(expected, actual); - Assert.AreEqual("Feet", target.Unit.Name); - } - - [TestMethod()] - [ExpectedException(typeof(ArgumentNullException))] - public void MeasurementSetUnitNullTest() - { - Measurement target = new Measurement("ft"); - Result expected = Result.BadUnit; - Result actual = default(Result); - actual = target.SetUnit(null); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - [ExpectedException(typeof(ArgumentNullException))] - public void MeasurementSetUnitEmptyTest() - { - Measurement target = new Measurement("ft"); - Result expected = Result.BadUnit; - Result actual = default(Result); - actual = target.SetUnit(string.Empty); - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.SetMinBound" - /// - ///A test for SetMinBound - /// - [TestMethod()] - public void MeasurementSetMinBoundTest() - { - Measurement target = new Measurement(10, "ft"); - double minbound = 0; - string unitSymbol = "ft"; - Result expected = Result.NoError; - Result actual = default(Result); - actual = target.SetMinBound(minbound, unitSymbol); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementSetMinBoundTest2() - { - Measurement target = new Measurement(10, "ft"); - double minbound = 12; - string unitSymbol = "in"; - Result expected = Result.NoError; - Result actual = default(Result); - actual = target.SetMinBound(minbound, unitSymbol); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - [ExpectedException(typeof(ArgumentNullException))] - public void MeasurementSetMinBoundNullTest() - { - Measurement target = new Measurement(10, "ft"); - Result actual; - actual = target.SetMinBound(0, null); - Assert.Fail(); - } - - [TestMethod()] - [ExpectedException(typeof(ArgumentNullException))] - public void MeasurementSetMinBoundEmptyTest() - { - Measurement target = new Measurement(10, "ft"); - Result actual = default(Result); - actual = target.SetMinBound(1, string.Empty); - Assert.Fail(); - } - #endregion - - #region "Measurement.SetMaxBound" - /// - ///A test for SetMinBound - /// - [TestMethod()] - public void MeasurementSetMaxBoundTest() - { - Measurement target = new Measurement(10, "ft"); - double maxbound = 100; - string unitSymbol = "ft"; - Result expected = Result.NoError; - Result actual = default(Result); - actual = target.SetMaxBound(maxbound, unitSymbol); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementSetMaxBoundTest2() - { - Measurement target = new Measurement(10, "ft"); - double maxbound = 8; - string unitSymbol = "in"; - Result expected = Result.NoError; - Result actual = default(Result); - actual = target.SetMaxBound(maxbound, unitSymbol); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - [ExpectedException(typeof(ArgumentNullException))] - public void MeasurementSetMaxBoundNullTest() - { - Measurement target = new Measurement(10, "ft"); - Result actual = default(Result); - actual = target.SetMinBound(0, null); - Assert.Fail(); - } - - [TestMethod()] - [ExpectedException(typeof(ArgumentNullException))] - public void MeasurementSetMaxBoundEmptyTest() - { - Measurement target = new Measurement(10, "ft"); - Result actual = default(Result); - actual = target.SetMinBound(1, string.Empty); - Assert.Fail(); - } - #endregion - - #region "Measurement.Operator -" - /// - ///A test for op_Subtraction - /// - [TestMethod()] - public void Measurementop_SubtractionTest() - { - Measurement d1 = new Measurement(5, "ft"); - Measurement d2 = new Measurement(5, "ft"); - Measurement expected = new Measurement(0, "ft"); - Measurement actual = default(Measurement); - actual = (d1 - d2); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_SubtractionDiffUnitTest() - { - Measurement d1 = new Measurement(5, "ft"); - Measurement d2 = new Measurement(60, "in"); - Measurement expected = new Measurement(0, "ft"); - Measurement actual = default(Measurement); - actual = (d1 - d2); - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.Operator *" - /// - ///A test for op_Multiply - /// - [TestMethod()] - public void Measurementop_MultiplyTest() - { - Measurement d1 = new Measurement(5, "ft"); - Measurement d2 = new Measurement(5, "ft"); - Measurement expected = new Measurement(25, "ft"); - Measurement actual = default(Measurement); - actual = (d1 * d2); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_MultiplyDiffUnitTest() - { - Measurement d1 = new Measurement(5, "ft"); - Measurement d2 = new Measurement(60, "in"); - Measurement expected = new Measurement(25, "ft"); - Measurement actual = default(Measurement); - actual = (d1 * d2); - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.Operator <=" - /// - ///A test for op_LessThanOrEqual - /// - [TestMethod()] - public void Measurementop_LessThanOrEqualTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(6, "ft"); - bool expected = true; - bool actual = false; - actual = (left <= right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_LessThanOrEqualTest2() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(5, "ft"); - bool expected = true; - bool actual = false; - actual = (left <= right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_LessThanOrEqualFalseTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(4, "ft"); - bool expected = false; - bool actual = false; - actual = (left <= right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_LessThanOrEqualDiffUnitTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(600, "in"); - bool expected = true; - bool actual = false; - actual = (left <= right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_LessThanOrEqualDiffUnitTest2() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(60, "in"); - bool expected = true; - bool actual = false; - actual = (left <= right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_LessThanOrEqualFalseDiffUnitTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(4, "in"); - bool expected = false; - bool actual = false; - actual = (left <= right); - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.Operator <" - /// - ///A test for op_LessThan - /// - [TestMethod()] - public void Measurementop_LessThanTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(6, "ft"); - bool expected = true; - bool actual = false; - actual = (left < right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_LessThanFalseTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(5, "ft"); - bool expected = false; - bool actual = false; - actual = (left < right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_LessThanDiffUnitTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(400, "in"); - bool expected = true; - bool actual = false; - actual = (left < right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_LessThanFalseDiffUnitTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(60, "in"); - bool expected = false; - bool actual = false; - actual = (left < right); - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.Operator <>" - /// - ///A test for op_Inequality - /// - [TestMethod()] - public void Measurementop_InequalityTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(4, "ft"); - bool expected = true; - bool actual = false; - actual = (left != right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_InequalityFalseTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(5, "ft"); - bool expected = false; - bool actual = false; - actual = (left != right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_InequalityDiffUnitTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(4, "in"); - bool expected = true; - bool actual = false; - actual = (left != right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_InequalityDiffUnitFalseTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(60, "in"); - bool expected = false; - bool actual = false; - actual = (left != right); - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.Operator >=" - /// - ///A test for op_GreaterThanOrEqual - /// - [TestMethod()] - public void Measurementop_GreaterThanOrEqualTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(4, "ft"); - bool expected = true; - bool actual = false; - actual = (left >= right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_GreaterThanOrEqualTest2() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(5, "ft"); - bool expected = true; - bool actual = false; - actual = (left >= right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_GreaterThanOrEqualFalseTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(6, "ft"); - bool expected = false; - bool actual = false; - actual = (left >= right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_GreaterThanOrEqualDiffUnitTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(4, "in"); - bool expected = true; - bool actual = false; - actual = (left >= right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_GreaterThanOrEqualDiffUnitTest2() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(60, "in"); - bool expected = true; - bool actual = false; - actual = (left >= right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_GreaterThanOrEqualDiffUnitFalseTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(600, "in"); - bool expected = false; - bool actual = false; - actual = (left >= right); - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.Operator >" - /// - ///A test for op_GreaterThan - /// - [TestMethod()] - public void Measurementop_GreaterThanTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(4, "ft"); - bool expected = true; - bool actual = false; - actual = (left > right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_GreaterThanFalseTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(5, "ft"); - bool expected = false; - bool actual = false; - actual = (left > right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_GreaterThanDiffUnitTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(4, "in"); - bool expected = true; - bool actual = false; - actual = (left > right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_GreaterThanDiffUnitFalseTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(60, "in"); - bool expected = false; - bool actual = false; - actual = (left > right); - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.Operator =" - /// - ///A test for op_Equality - /// - [TestMethod()] - public void Measurementop_EqualityTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(5, "ft"); - bool expected = true; - bool actual = false; - actual = (left == right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_EqualityDiffUnitTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(60, "in"); - bool expected = true; - bool actual = false; - actual = (left == right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_EqualityFalseTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(4, "ft"); - bool expected = false; - bool actual = false; - actual = (left == right); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_EqualityDiffUnitFalseTest() - { - Measurement left = new Measurement(5, "ft"); - Measurement right = new Measurement(61, "in"); - bool expected = false; - bool actual = false; - actual = (left == right); - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.Operator /" - /// - ///A test for op_Division - /// - [TestMethod()] - public void Measurementop_DivisionTest() - { - Measurement d1 = new Measurement(25, "ft"); - Measurement d2 = new Measurement(5, "ft"); - Measurement expected = new Measurement(5, "ft"); - Measurement actual = default(Measurement); - actual = (d1 / d2); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_DivisionDiffUnitTest() - { - Measurement d1 = new Measurement(25, "ft"); - Measurement d2 = new Measurement(60, "in"); - Measurement expected = new Measurement(5, "ft"); - Measurement actual = default(Measurement); - actual = (d1 / d2); - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.Operator +" - /// - ///A test for op_Addition - /// - [TestMethod()] - public void Measurementop_AdditionTest() - { - Measurement d1 = new Measurement(5, "ft"); - Measurement d2 = new Measurement(5, "ft"); - Measurement expected = new Measurement(10, "ft"); - Measurement actual = default(Measurement); - actual = (d1 + d2); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void Measurementop_AdditionDiffUnitTest() - { - Measurement d1 = new Measurement(5, "ft"); - Measurement d2 = new Measurement(60, "in"); - Measurement expected = new Measurement(10, "ft"); - Measurement actual = default(Measurement); - actual = (d1 + d2); - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.GetValueAs(unitSymbol)" - /// - ///A test for GetValueAs - /// - //[TestMethod()] - //public void MeasurementGetValueAsTest() - //{ - // Measurement target = new Measurement(5, "ft"); - // string unitSymbol = "in"; - // Measurement expected = new Measurement(Convert.ToDecimal("60.0000"), "in"); - // Measurement actual = default(Measurement); - // actual = target.GetValueAs(unitSymbol); - // Assert.AreEqual(expected.Value, actual.Value); - // Assert.AreEqual(expected.ToString, actual.ToString); - //} - - [TestMethod()] - public void MeasurementGetValueAsInvalidUnitSymbolTest() - { - Measurement target = new Measurement(5, "ft"); - string unitSymbol = "F"; - Measurement actual = default(Measurement); - actual = target.GetValueAs(unitSymbol); - - Assert.IsTrue(actual.ConversionResult == Result.UnitMismatch); - Assert.IsTrue(actual.Value == 0); - Assert.IsTrue(actual.Value == 0); - } - #endregion - - #region "Measurement.GetStringValueAs(unitSymbol)" - /// - ///A test for GetStringValueAs - /// - [TestMethod()] - public void MeasurementGetStringValueAsTest() - { - Measurement target = new Measurement(5, "ft"); - string unitSymbol = "in"; - string expected = "60in"; - string actual = null; - actual = target.GetStringValueAs(unitSymbol); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementGetStringValueAsInvalidUnitSymbolTest() - { - Measurement target = new Measurement(10, "ft"); - string unitSymbol = "F"; - string expected = "Conversion Error"; - string actual = null; - actual = target.GetStringValueAs(unitSymbol); - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.GetHashCode" - /// - ///A test for GetHashCode - /// - [TestMethod()] - public void MeasurementGetHashCodeTest() - { - Measurement target = new Measurement(10, "ft"); - - Measurement Mes = target.Converter.ConvertUnits(target.Value, target.Unit.DefaultSymbol, "m"); - - string expectedStr = null; - - if (Mes.ConversionResult != Result.NoError) - { - expectedStr = target.Value.ToString() + "|" + target.ConversionResult.ToString(); - } - else - { - expectedStr = Mes.Value.ToString() + "|" + Mes.Symbol; - } - - int expected = (expectedStr).GetHashCode(); - int actual = 0; - actual = target.GetHashCode(); - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.Equals(Of Measurement)" - /// - ///A test for Equals - /// - [TestMethod()] - public void MeasurementEqualsOfTest() - { - IEquatable target = new Measurement(5, "ft"); - Measurement other = new Measurement(60, "in"); - bool expected = true; - bool actual = false; - actual = target.Equals(other); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementEqualsOfTest2() - { - IEquatable target = new Measurement(5, "ft"); - Measurement other = new Measurement(5, "ft"); - bool expected = true; - bool actual = false; - actual = target.Equals(other); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementEqualsOfFalseTest() - { - IEquatable target = new Measurement(5, "ft"); - Measurement other = new Measurement(5, "in"); - bool expected = false; - bool actual = false; - actual = target.Equals(other); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementEqualsOfInvalidUnitTest() - { - IEquatable target = new Measurement(5, "ft"); - Measurement other = new Measurement(5, "F"); - bool expected = false; - bool actual = false; - actual = target.Equals(other); - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.Equals(obj)" - /// - ///A test for Equals - /// - [TestMethod()] - public void MeasurementEqualsTest() - { - Measurement target = new Measurement(5, "ft"); - object obj = new Measurement(5, "ft"); - bool expected = true; - bool actual = false; - actual = target.Equals(obj); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementEqualsTest2() - { - Measurement target = new Measurement(5, "ft"); - object obj = new Measurement(60, "in"); - bool expected = true; - bool actual = false; - actual = target.Equals(obj); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementEqualsFalseTest() - { - Measurement target = new Measurement(5, "ft"); - object obj = new Measurement(5, "in"); - bool expected = false; - bool actual = false; - actual = target.Equals(obj); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementEqualsInvalidTest() - { - Measurement target = new Measurement(5, "ft"); - object obj = new Measurement(5, "F"); - bool expected = false; - bool actual = false; - actual = target.Equals(obj); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementEqualsInvalidTypeTest() - { - Measurement target = new Measurement(5, "ft"); - object obj = 5; - bool expected = false; - bool actual = false; - actual = target.Equals(obj); - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.CompareTo" - /// - ///A test for CompareTo - /// - [TestMethod()] - public void MeasurementCompareToTest() - { - IComparable target = new Measurement(5, "ft"); - Measurement other = new Measurement(5, "ft"); - int expected = 0; - int actual = 0; - actual = target.CompareTo(other); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementCompareToGreaterTest() - { - IComparable target = new Measurement(5, "ft"); - Measurement other = new Measurement(4, "ft"); - int expected = 1; - int actual = 0; - actual = target.CompareTo(other); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementCompareToGreaterDifferentUnitTest() - { - IComparable target = new Measurement(5, "ft"); - Measurement other = new Measurement(41, "in"); - int expected = 1; - int actual; - actual = target.CompareTo(other); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementCompareToLessTest() - { - IComparable target = new Measurement(5, "ft"); - Measurement other = new Measurement(6, "ft"); - int expected = -1; - int actual = 0; - actual = target.CompareTo(other); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - public void MeasurementCompareToGreaterLessUnitTest() - { - IComparable target = new Measurement(5, "ft"); - Measurement other = new Measurement(61, "in"); - int expected = -1; - int actual = 0; - actual = target.CompareTo(other); - Assert.AreEqual(expected, actual); - } - #endregion - - #region "Measurement.Measurement(Value, UnitSymbol)" - /// - ///A test for Measurement Constructor - /// - [TestMethod()] - public void MeasurementConstructorValueUnitSymbolTest() - { - double value = 10; - string unitSymbol = "ft"; - Measurement target = new Measurement(value, unitSymbol); - - Assert.IsNotNull(target); - Assert.IsTrue(target.Flags == MeasurementFlags.None); - Assert.IsTrue(target.ConversionResult == Result.NoError); - Assert.AreEqual("Feet", target.Unit.Name); - Assert.AreEqual(10, target.Value); - } - - [TestMethod()] - public void MeasurementConstructorValueUnitSymbolNullNullTest() - { - Measurement target = new Measurement(0, (string)null); - - Assert.IsNotNull(target); - Assert.IsTrue(target.Flags == MeasurementFlags.None); - Assert.IsTrue(target.ConversionResult == Result.BadUnit); - Assert.AreEqual(null, target.Unit); - Assert.AreEqual(0, target.Value); - } - - [TestMethod()] - public void MeasurementConstructorValueUnitSymbolValueNullTest() - { - Measurement target = new Measurement(0, "ft"); - - Assert.IsNotNull(target); - Assert.IsTrue(target.Flags == MeasurementFlags.None); - Assert.IsTrue(target.ConversionResult == Result.NoError); - Assert.AreEqual("Feet", target.Unit.Name); - Assert.AreEqual(0, target.Value); - } - - [TestMethod()] - public void MeasurementConstructorValueUnitSymbolUnitSymbolNullTest() - { - Measurement target = new Measurement(10, (string)null); - - Assert.IsNotNull(target); - Assert.IsTrue(target.Flags == MeasurementFlags.None); - Assert.IsTrue(target.ConversionResult == Result.BadUnit); - Assert.AreEqual(null, target.Unit); - Assert.AreEqual(10, target.Value); - } - - [TestMethod()] - public void MeasurementConstructorValueUnitSymbolEmptyTest() - { - Measurement target = new Measurement(10, string.Empty); - - Assert.IsNotNull(target); - Assert.IsTrue(target.Flags == MeasurementFlags.None); - Assert.IsTrue(target.ConversionResult == Result.BadUnit); - Assert.AreEqual(null, target.Unit); - Assert.AreEqual(10, target.Value); - } - #endregion - - #region "Measurement.Measurement(unitSymbol)" - /// - ///A test for Measurement Constructor - /// - [TestMethod()] - public void MeasurementConstructorUnitSymbolTest() - { - string unitSymbol = "ft"; - Measurement target = new Measurement(unitSymbol); - - Assert.IsNotNull(target); - Assert.IsTrue(target.Flags == MeasurementFlags.None); - Assert.IsTrue(target.ConversionResult == Result.NoError); - Assert.AreEqual("Feet", target.Unit.Name); - Assert.AreEqual(0, target.Value); - } - - [TestMethod()] - public void MeasurementConstructorUnitSymbolNullTest() - { - Measurement target = new Measurement(null); - - Assert.IsNotNull(target); - Assert.IsTrue(target.Flags == MeasurementFlags.None); - Assert.IsTrue(target.ConversionResult == Result.BadUnit); - Assert.AreEqual(null, target.Unit); - Assert.AreEqual(0, target.Value); - } - - [TestMethod()] - public void MeasurementConstructorUnitSymbolEmptyTest() - { - Measurement target = new Measurement(null); - - Assert.IsNotNull(target); - Assert.IsTrue(target.Flags == MeasurementFlags.None); - Assert.IsTrue(target.ConversionResult == Result.BadUnit); - Assert.AreEqual(null, target.Unit); - Assert.AreEqual(0, target.Value); - } - #endregion - - #region "Measurement.Measurement(Value, UnitSymbol, ConversionResult)" - /// - ///A test for Measurement Constructor - /// - [TestMethod()] - public void MeasurementConstructorValueUnitSymbolResultTest() - { - double value = 10; - string unitSymbol = "ft"; - Result ConversionResult = Result.NoError; - Measurement target = new Measurement(value, unitSymbol, ConversionResult); - - Assert.IsNotNull(target); - Assert.IsTrue(target.Flags == MeasurementFlags.None); - Assert.IsTrue(target.ConversionResult == Result.NoError); - Assert.AreEqual("Feet", target.Unit.Name); - Assert.AreEqual(10, target.Value); - } - - [TestMethod()] - public void MeasurementConstructorValueUnitSymbolResultTest2() - { - double value = 10; - string unitSymbol = "ft"; - Result ConversionResult = Result.GenericError; - Measurement target = new Measurement(value, unitSymbol, ConversionResult); - - Assert.IsNotNull(target); - Assert.IsTrue(target.Flags == MeasurementFlags.None); - Assert.IsTrue(target.ConversionResult == Result.GenericError); - Assert.AreEqual("Feet", target.Unit.Name); - Assert.AreEqual(10, target.Value); - } - #endregion - - #region "Measurement.Measurement(Value,Unit,ConversionResult)" - /// - ///A test for Measurement Constructor - /// - [TestMethod()] - public void MeasurementConstructorValueUnitConversionResultTest() - { - double value = 10; - Unit unit = unitPro.Units["Feet"]; - Result ConversionResult = Result.NoError; - Measurement target = new Measurement(value, unit, ConversionResult); - - Assert.IsNotNull(target); - Assert.IsTrue(target.Flags == MeasurementFlags.None); - Assert.IsTrue(target.ConversionResult == Result.NoError); - Assert.AreEqual("Feet", target.Unit.Name); - Assert.AreEqual(10, target.Value); - } - - [TestMethod()] - public void MeasurementConstructorValueUnitConversionResultNullTest() - { - Measurement target = new Measurement(0, (Unit)null, Result.NoError); - - Assert.IsNotNull(target); - Assert.IsTrue(target.Flags == MeasurementFlags.None); - Assert.IsTrue(target.ConversionResult == Result.NoError); - Assert.IsNull(target.Unit); - Assert.AreEqual(0, target.Value); - } - #endregion - - #region "Measurement.Measurement(Value,Result)" - /// - ///A test for Measurement Constructor - /// - [TestMethod()] - public void MeasurementConstructorValueResultTest() - { - double value = 10; - Result ConversionResult = Result.NoError; - Measurement target = new Measurement(value, ConversionResult); - - Assert.IsNotNull(target); - Assert.IsTrue(target.Flags == MeasurementFlags.None); - Assert.IsTrue(target.ConversionResult == Result.NoError); - Assert.IsNull(target.Unit); - Assert.AreEqual(10, target.Value); - } - - [TestMethod()] - public void MeasurementConstructorValueResultNullTest() - { - Measurement target = new Measurement(0, Result.NoError); - - Assert.IsNotNull(target); - Assert.IsTrue(target.Flags == MeasurementFlags.None); - Assert.IsTrue(target.ConversionResult == Result.NoError); - Assert.IsNull(target.Unit); - Assert.AreEqual(0, target.Value); - } - #endregion -} - diff --git a/Units.Test/ModifierTest.cs b/Units.Test/ModifierTest.cs deleted file mode 100644 index eaa75c2..0000000 --- a/Units.Test/ModifierTest.cs +++ /dev/null @@ -1,177 +0,0 @@ -using System; -using System.Diagnostics.Contracts; -using Units; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -/// -///This is a test class for UnitTest and is intended -///to contain all UnitTest Unit Tests -/// -[TestClass()] -public class ModifierTest -{ - - - private TestContext testContextInstance; - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get { return testContextInstance; } - set { testContextInstance = value; } - } - - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ - //Public Sub MyTestCleanup() - //End Sub - // - #endregion - - #region "Modifier.Modifier()" - [TestMethod()] - public void ModifierNewTest() - { - Modifier testObj = new Modifier(); - - Assert.IsNotNull(testObj); - Assert.IsTrue(testObj.ID == 0); - Assert.IsTrue(testObj.Value == 0); - Assert.IsNull(testObj.ParentUnit); - } - #endregion - - #region "Modifier.ID" - [TestMethod()] - public void ModifierIDTest() - { - Modifier testObj = new Modifier(); - - testObj.ID = 99; - - Assert.AreEqual(99, testObj.ID); - } - #endregion - - #region "Modifier.ParentUnit" - [TestMethod()] - public void ModifierParentUnitTest() - { - Unit testUnitObj = new Unit - { - ID = 99, - Name = "Name" - }; - Modifier testObj = new Modifier(); - - testObj.ParentUnit = testUnitObj; - - Assert.IsNotNull(testObj.ParentUnit); - Assert.AreEqual(testUnitObj.ID, testObj.ParentUnit.ID); - Assert.AreEqual(testUnitObj.Name, testObj.ParentUnit.Name); - } - - [TestMethod()] - public void ModifierParentUnitNullTest() - { - Modifier testObj = new Modifier(); - - testObj.ParentUnit = null; - - Assert.IsNull(testObj.ParentUnit); - } - #endregion - - #region "Modifier.Value" - [TestMethod()] - public void ModifierValueTest() - { - Modifier testObj = new Modifier(); - - testObj.Value = Convert.ToDecimal(0.001); - - Assert.AreEqual(Convert.ToDecimal(0.001), testObj.Value); - } - #endregion - - #region "Modifier.Order" - [TestMethod()] - public void ModifierOrderTest() - { - Modifier testObj = new Modifier(); - - testObj.Order = 10; - - Assert.AreEqual(10, testObj.Order); - } - - - #endregion - - #region "Modifier.ModifierType" - [TestMethod()] - public void ModifierTypeTest() - { - Modifier testObj = new Modifier(); - - testObj.ModifierType = ModifierType.Multiply; - - Assert.AreEqual(ModifierType.Multiply, testObj.ModifierType); - } - #endregion - - //Private Function InitEfObjects() As EFUnit - //Dim efUnitTypeObj As New EFUnitType - //efUnitTypeObj.ID = 10 - //efUnitTypeObj.Name = "Test Type" - //efUnitTypeObj.Description = "Test Desc" - - //Dim efUnitObj As New EFUnit - //efUnitObj.ID = 2 - //efUnitObj.Name = "Test Unit" - //efUnitObj.UnitType = efUnitTypeObj - - //Dim efUnitModifierObj As New EFUnitModifier - //efUnitModifierObj.ID = 2 - //efUnitModifierObj.ModifierID = 2 - //efUnitModifierObj.Order = 1 - //efUnitModifierObj.Value = 0.5 - - //Dim efUnitSymbolObj As New EFUnitSymbol - //efUnitSymbolObj.ID = 3 - //efUnitSymbolObj.IsDefault = True - //efUnitSymbolObj.Symbol = "Tst" - - //efUnitModifierObj.Unit = efUnitObj - //efUnitSymbolObj.Unit = efUnitObj - - //efUnitTypeObj.Unit.Add(efUnitObj) - //efUnitObj.UnitModifiers.Add(efUnitModifierObj) - //efUnitObj.UnitSymbol.Add(efUnitSymbolObj) - - //Return efUnitObj - //End Function - -} - diff --git a/Units.Test/Properties/AssemblyInfo.cs b/Units.Test/Properties/AssemblyInfo.cs deleted file mode 100644 index 55857f6..0000000 --- a/Units.Test/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Units.Test")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Units.Test")] -[assembly: AssemblyCopyright("Copyright © 2012")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("08a4b0dc-fee4-4882-9540-ae320526435a")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Units.Test/SymbolTest.cs b/Units.Test/SymbolTest.cs deleted file mode 100644 index e7fb7d0..0000000 --- a/Units.Test/SymbolTest.cs +++ /dev/null @@ -1,422 +0,0 @@ -using System; -using System.Diagnostics.Contracts; -using Units; -using Microsoft.VisualStudio.TestTools.UnitTesting; - - -/// -///This is a test class for UnitTest and is intended -///to contain all UnitTest Unit Tests -/// -[TestClass()] -public class SymbolTest -{ - - private TestContext testContextInstance; - - private UnitProvider unitPro = new UnitProvider(); - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get { return testContextInstance; } - set { testContextInstance = value; } - } - - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ - //Public Sub MyTestCleanup() - //End Sub - // - #endregion - - #region "Symbol.Symbol()" - [TestMethod()] - public void SymbolNewTest() - { - Symbol testObj = new Symbol(); - - Assert.IsNotNull(testObj); - Assert.IsTrue(testObj.Id == 0); - Assert.IsTrue(testObj.Value == null); - Assert.IsNull(testObj.Unit); - } - #endregion - - #region "Symbol.Symbol(Unit)" - [TestMethod()] - [ExpectedException(typeof(ArgumentNullException))] - public void SymbolNewEfUnitSymbolUnitNullTest() - { - Symbol testObj = new Symbol(null); - - Assert.Fail("Null values are not allowed for this constructor."); - } - - [TestMethod()] - public void SymbolNewEfUnitSymbolUnitTest() - { - Unit unitObj = new Unit - { - ID = 99, - Name = "Name" - }; - Symbol testObj = new Symbol(unitObj); - - Assert.IsNotNull(testObj); - - Assert.IsTrue(string.IsNullOrEmpty(testObj.Value)); - - Assert.IsNotNull(testObj.Unit); - Assert.IsTrue(testObj.Unit.ID == unitObj.ID); - } - #endregion - - #region "Symbol.ID" - //[TestMethod()] - //public void SymbolIDNullTest() - //{ - // Symbol testObj = new Symbol(); - - // testObj.Id = null; - - // Assert.AreEqual(null, testObj.Id); - //} - - //[TestMethod()] - //public void SymbolIDNegativeTest() - //{ - // Symbol testObj = new Symbol(); - - // testObj.Id = -1; - - // Assert.IsTrue(testObj.Id == -1); - - // List data = Validation.DataAnnotationValidator.GetErrors(testObj).ToList; - - // Assert.IsNotNull(data); - // Assert.IsTrue(data.Count > 0); - // Assert.IsTrue(data[0].PropertyName == "ID"); - //} - - [TestMethod()] - public void SymbolIDTest() - { - Symbol testObj = new Symbol(); - - testObj.Id = 99; - - Assert.AreEqual(99, testObj.Id); - } - #endregion - - #region "Symbol.ParentUnit" - [TestMethod()] - public void SymbolParentUnitTest() - { - Unit testUnitObj = new Unit(); - Symbol testObj = new Symbol(testUnitObj); - - - - testObj.Unit = testUnitObj; - - Assert.IsNotNull(testObj.Unit); - Assert.AreEqual(testUnitObj.ID, testObj.Unit.ID); - Assert.AreEqual(testUnitObj.Name, testObj.Unit.Name); - } - - [TestMethod()] - public void SymbolParentUnitNullTest() - { - Symbol testObj = new Symbol(); - - testObj.Unit = null; - - Assert.IsNull(testObj.Unit); - } - #endregion - - #region "Symbol.Value" - [TestMethod()] - public void SymbolValueTest() - { - Symbol testObj = new Symbol(); - - testObj.Value = "Test Name"; - - Assert.AreEqual("Test Name", testObj.Value); - } - - //[TestMethod()] - //public void SymbolValueNullTest() - //{ - // Symbol testObj = new Symbol(); - - // testObj.Value = null; - - // Assert.IsTrue(string.IsNullOrWhiteSpace(testObj.Value)); - - // List data = Validation.DataAnnotationValidator.GetErrors(testObj).ToList; - - // Assert.IsNotNull(data); - // Assert.IsTrue(data.Count > 0); - // Assert.IsTrue(data[0].PropertyName == "Value"); - //} - #endregion - - #region "Symbol.IsDefault" - [TestMethod()] - public void SymbolIsDefaultTest() - { - Symbol testObj = new Symbol(); - - testObj.IsDefault = true; - - Assert.AreEqual(true, testObj.IsDefault); - } - #endregion - - #region "IEquatable" - [TestMethod()] - public void Symbol_EqualityTest() - { - Symbol expected = unitPro.Symbols["ft"].Symbols[0]; - Symbol target = unitPro.Symbols["ft"].Symbols[0]; - - Assert.IsTrue(expected == target); - } - - [TestMethod()] - public void Unit_EqualityTest2() - { - Symbol expected = unitPro.Symbols["ft"].Symbols[0]; - Symbol target = unitPro.Symbols["in"].Symbols[0]; - - Assert.IsFalse(expected == target); - } - - [TestMethod()] - public void Unit_EqualityTest3() - { - Symbol expected = null; - Symbol target = unitPro.Symbols["in"].Symbols[0]; - - Assert.IsFalse(expected == target); - } - - [TestMethod()] - public void Unit_EqualityTest4() - { - Symbol expected = unitPro.Symbols["in"].Symbols[0]; - Symbol target = null; - - Assert.IsFalse(expected == target); - } - - [TestMethod()] - public void Unit_EqualityTest5() - { - Symbol expected = null; - Symbol target = null; - - Assert.IsTrue(expected == target); - } - - [TestMethod()] - public void Unit_EqualityTest6() - { - Symbol expected = unitPro.Symbols["ft"].Symbols[0]; - Symbol target = unitPro.Symbols["in"].Symbols[0]; - - Assert.IsTrue(expected != target); - } - - [TestMethod()] - public void Unit_EqualityTest7() - { - Symbol expected = unitPro.Symbols["ft"].Symbols[0]; - Symbol target = null; - - Assert.IsTrue(expected != target); - } - - [TestMethod()] - public void Unit_EqualityTest8() - { - Symbol expected = null; - Symbol target = unitPro.Symbols["ft"].Symbols[0]; - - Assert.IsTrue(expected != target); - } - - [TestMethod()] - public void Unit_EqualityTest8_1() - { - Symbol expected = null; - Symbol target = null; - - Assert.IsFalse(expected != target); - } - - [TestMethod()] - public void Unit_EqualityTest9() - { - Symbol expected = unitPro.Symbols["in"].Symbols[0]; - Symbol target = unitPro.Symbols["ft"].Symbols[0]; - - Assert.IsFalse(expected.Equals(target)); - } - - [TestMethod()] - public void Unit_EqualityTest10() - { - Symbol expected = unitPro.Symbols["ft"].Symbols[0]; - Symbol target = unitPro.Symbols["ft"].Symbols[0]; - - Assert.IsTrue(expected.Equals(target)); - } - - [TestMethod()] - public void Unit_EqualityTest11() - { - Symbol expected = unitPro.Symbols["ft"].Symbols[0]; - Symbol target = unitPro.Symbols["in"].Symbols[0]; - - Assert.IsFalse(expected.Equals(target)); - } - - [TestMethod()] - public void Unit_EqualityTest12() - { - Symbol expected = unitPro.Symbols["ft"].Symbols[0]; - Symbol target = null; - - Assert.IsFalse(expected.Equals(target)); - } - - [TestMethod()] - public void Unit_EqualityTest13() - { - Symbol expected = unitPro.Symbols["ft"].Symbols[0]; - Symbol target = unitPro.Symbols["ft"].Symbols[0]; - - Assert.IsTrue(expected.Equals((object)target)); - } - - [TestMethod()] - public void Unit_EqualityTest14() - { - Symbol expected = unitPro.Symbols["ft"].Symbols[0]; - Symbol target = unitPro.Symbols["in"].Symbols[0]; - - Assert.IsFalse(expected.Equals((object)target)); - } - - [TestMethod()] - public void Unit_EqualityTest154() - { - Symbol expected = unitPro.Symbols["ft"].Symbols[0]; - Symbol target = null; - - Assert.IsFalse(expected.Equals((object)target)); - } - - [TestMethod()] - public void Unit_EqualityTest15() - { - Symbol expected = unitPro.Symbols["ft"].Symbols[0]; - - Assert.IsTrue(expected.GetHashCode() == expected.Value.GetHashCode()); - } - #endregion - - #region "Serialization" - //[TestMethod()] - //public void Unit_BinarySerializationTest() - //{ - // Symbol expected = unitPro.Symbols["ft"].Symbols[0]; - // Symbol actual = default(Symbol); - - // byte[] data = Utility.BinarySerialize(expected); - // actual = (Symbol)Utility.BinaryDeserialize(data); - - // Assert.IsNotNull(actual); - // Assert.AreEqual(expected.Id, actual.Id); - // Assert.AreEqual(expected.Value, actual.Value); - // Assert.AreEqual(expected.IsDefault, actual.IsDefault); - // Assert.AreEqual(expected.UnitId, actual.UnitId); - //} - - //[TestMethod()] - //public void Unit_DataContractSerializationTest() - //{ - // Symbol expected = unitPro.Symbols["ft"].Symbols[0]; - // Symbol actual = default(Symbol); - - // string data = Utility.DataContractSerialize(expected); - // actual = (Symbol)Utility.DataContractDeserialize(data, typeof(Symbol)); - - // Assert.IsNotNull(actual); - // Assert.AreEqual(expected.Id, actual.Id); - // Assert.AreEqual(expected.Value, actual.Value); - // Assert.AreEqual(expected.IsDefault, actual.IsDefault); - // Assert.AreEqual(expected.UnitId, actual.UnitId); - //} - #endregion - - //Private Function InitEfObjects() As EFUnit - //Dim efUnitTypeObj As New EFUnitType - //efUnitTypeObj.ID = 10 - //efUnitTypeObj.Name = "Test Type" - //efUnitTypeObj.Description = "Test Desc" - - //Dim efUnitObj As New EFUnit - //efUnitObj.ID = 2 - //efUnitObj.Name = "Test Unit" - //efUnitObj.UnitType = efUnitTypeObj - - //Dim efUnitModifierObj As New EFUnitModifier - //efUnitModifierObj.ID = 2 - //efUnitModifierObj.ModifierID = 2 - //efUnitModifierObj.Order = 1 - //efUnitModifierObj.Value = 0.5 - - //Dim efSymbolsymbolObj As New EFUnitSymbol - //efUnitSymbolObj.ID = 3 - //efUnitSymbolObj.IsDefault = True - //efUnitSymbolObj.Symbol = "Tst" - - //efUnitModifierObj.Unit = efUnitObj - //efUnitSymbolObj.Unit = efUnitObj - - //efUnitTypeObj.Unit.Add(efUnitObj) - //efUnitObj.UnitModifiers.Add(efUnitModifierObj) - //efUnitObj.UnitSymbol.Add(efUnitSymbolObj) - - //Return efUnitObj - //End Function - -} - diff --git a/Units.Test/UnitConverterTest.cs b/Units.Test/UnitConverterTest.cs deleted file mode 100644 index 09df7ba..0000000 --- a/Units.Test/UnitConverterTest.cs +++ /dev/null @@ -1,9119 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Units; - -/// -///This is a test class for UnitConverterTest and is intended -///to contain all UnitConverterTest Unit Tests -/// -[TestClass()] -public class UnitConverterTest -{ - - - private TestContext testContextInstance; - - private UnitProvider unitPro = new UnitProvider(); - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get { return testContextInstance; } - set { testContextInstance = value; } - } - - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ _ - //Public Sub MyTestCleanup() - //End Sub - // - - #endregion - - #region "UnitConverter.ParseUnitString" - /// - ///A test for ParseUnitString - /// - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverter_ParseUnitStringTest() - { - UnitConverter target = new UnitConverter(); - string input = "10ft"; - Measurement expected = new Measurement(10, "ft"); - Measurement actual = default(Measurement); - actual = target.ParseUnitString(input); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverter_ParseUnitStringTest2() - { - UnitConverter target = new UnitConverter(); - string input = "10 ft"; - Measurement expected = new Measurement(10, "ft"); - Measurement actual = default(Measurement); - actual = target.ParseUnitString(input); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverter_ParseUnitStringTest3() - { - UnitConverter target = new UnitConverter(); - string input = "10 m/s"; - Measurement expected = new Measurement(10, "m/s"); - Measurement actual = default(Measurement); - actual = target.ParseUnitString(input); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverter_ParseUnitStringTest4() - { - UnitConverter target = new UnitConverter(); - string input = "10'"; - Measurement expected = new Measurement(10, "'"); - Measurement actual = default(Measurement); - actual = target.ParseUnitString(input); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverter_ParseUnitStringTest5() - { - UnitConverter target = new UnitConverter(); - string input = "10ft²"; - Measurement expected = new Measurement(10, "ft²"); - Measurement actual = default(Measurement); - actual = target.ParseUnitString(input); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverter_ParseUnitStringTest6() - { - UnitConverter target = new UnitConverter(); - string input = "10˚"; - Measurement expected = new Measurement(10, "˚"); - Measurement actual = default(Measurement); - actual = target.ParseUnitString(input); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverter_ParseUnitStringTest7() - { - UnitConverter target = new UnitConverter(); - string input = "10 ˚F"; - Measurement expected = new Measurement(10, "˚F"); - Measurement actual = default(Measurement); - actual = target.ParseUnitString(input); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverter_ParseUnitStringTest8() - { - UnitConverter target = new UnitConverter(); - string input = "10 µK"; - Measurement expected = new Measurement(10, "µK"); - Measurement actual = default(Measurement); - actual = target.ParseUnitString(input); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverter_ParseUnitStringTest9() - { - UnitConverter target = new UnitConverter(); - string input = "-10 µK"; - Measurement expected = new Measurement(-10, "µK"); - Measurement actual = default(Measurement); - actual = target.ParseUnitString(input); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverter_ParseUnitStringNotFoundTest() - { - UnitConverter target = new UnitConverter(); - string input = "10 ZZZZ"; - Measurement expected = new Measurement(0, Result.BadUnit); - Measurement actual = default(Measurement); - actual = target.ParseUnitString(input); - - Assert.AreNotEqual(expected, actual); - Assert.AreEqual(expected.ConversionResult, actual.ConversionResult); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverter_ParseUnitStringNoSymbolTest() - { - UnitConverter target = new UnitConverter(); - string input = "10"; - Measurement expected = new Measurement(0, Result.BadUnit); - Measurement actual = default(Measurement); - actual = target.ParseUnitString(input); - - Assert.AreNotEqual(expected, actual); - Assert.AreEqual(expected.ConversionResult, actual.ConversionResult); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverter_ParseUnitStringNoValueTest() - { - UnitConverter target = new UnitConverter(); - string input = "ft"; - Measurement expected = new Measurement(0, "ft"); - Measurement actual = default(Measurement); - actual = target.ParseUnitString(input); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverter_ParseUnitStringNullTest() - { - UnitConverter target = new UnitConverter(); - Measurement expected = new Measurement(0, Result.BadValue); - Measurement actual = default(Measurement); - actual = target.ParseUnitString(null); - Assert.AreNotEqual(expected, actual); - Assert.AreEqual(expected.ConversionResult, actual.ConversionResult); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverter_ParseUnitStringEmptyTest() - { - UnitConverter target = new UnitConverter(); - Measurement expected = new Measurement(0, Result.BadValue); - Measurement actual = default(Measurement); - actual = target.ParseUnitString(string.Empty); - Assert.AreNotEqual(expected, actual); - Assert.AreEqual(expected.ConversionResult, actual.ConversionResult); - } - #endregion - - #region "UnitConverter.IsCompatible" - /// - ///A test for IsCompatible - /// - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - public void UnitConverter_IsCompatibleTest() - { - UnitConverter target = new UnitConverter(); - string leftSymbol = "C"; - string rightSymbol = "F"; - bool actual = false; - actual = target.IsCompatible(leftSymbol, rightSymbol); - Assert.IsTrue(actual); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - public void UnitConverter_IsCompatibleFalseTest() - { - UnitConverter target = new UnitConverter(); - string leftSymbol = "C"; - string rightSymbol = "in"; - bool actual = false; - actual = target.IsCompatible(leftSymbol, rightSymbol); - Assert.IsFalse(actual); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - [ExpectedException(typeof(ArgumentException))] - public void UnitConverter_IsCompatibleNullTest() - { - UnitConverter target = new UnitConverter(); - bool actual = false; - actual = target.IsCompatible(null, null); - - Assert.Fail(); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - [ExpectedException(typeof(ArgumentException))] - public void UnitConverter_IsCompatibleLeftNullTest() - { - UnitConverter target = new UnitConverter(); - string rightSymbol = "in"; - bool actual = false; - actual = target.IsCompatible(null, rightSymbol); - - Assert.Fail(); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - [ExpectedException(typeof(ArgumentException))] - public void UnitConverter_IsCompatibleRightNullTest() - { - UnitConverter target = new UnitConverter(); - string leftSymbol = "C"; - bool actual = false; - actual = target.IsCompatible(leftSymbol, null); - - Assert.Fail(); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - [ExpectedException(typeof(ArgumentException))] - public void UnitConverter_IsCompatibleEmptyTest() - { - UnitConverter target = new UnitConverter(); - bool actual = false; - actual = target.IsCompatible(string.Empty, string.Empty); - - Assert.Fail(); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - [ExpectedException(typeof(ArgumentException))] - public void UnitConverter_IsCompatibleLeftEmptyTest() - { - UnitConverter target = new UnitConverter(); - string rightSymbol = "in"; - bool actual = false; - actual = target.IsCompatible(string.Empty, rightSymbol); - - Assert.Fail(); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - [ExpectedException(typeof(ArgumentException))] - public void UnitConverter_IsCompatibleRightEmptyTest() - { - UnitConverter target = new UnitConverter(); - string leftSymbol = "C"; - bool actual = false; - actual = target.IsCompatible(leftSymbol, string.Empty); - - Assert.Fail(); - } - #endregion - - #region "UnitProvider.GetUnitBySymbol" - /// - ///A test for GetUnitBySymbol - /// - [TestMethod()] - [TestCategory(UnitTestCategory.CRUD)] - public void UnitConverter_GetUnitBySymbol_Test() - { - UnitConverter target = new UnitConverter(); - string unitSymbol = "C"; - Unit expected = unitPro.Symbols["C"]; - Unit actual = default(Unit); - actual = target.GetUnitBySymbol(unitSymbol); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.ExceptionTest)] - [ExpectedException(typeof(ArgumentNullException))] - public void UnitConverter_GetUnitBySymbolNull_Test() - { - UnitConverter target = new UnitConverter(); - Unit actual = default(Unit); - actual = target.GetUnitBySymbol(null); - - Assert.Fail(); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.ExceptionTest)] - [ExpectedException(typeof(ArgumentNullException))] - public void UnitConverter_GetUnitBySymbolEmpty_Test() - { - UnitConverter target = new UnitConverter(); - Unit actual = default(Unit); - actual = target.GetUnitBySymbol(string.Empty); - - Assert.Fail(); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.ExceptionTest)] - [ExpectedException(typeof(ArgumentException))] - public void UnitConverter_GetUnitBySymbol_UnrecognizedSymbol_Test() - { - UnitConverter target = new UnitConverter(); - string unitName = "BogusUnitSymbol"; - Unit actual = default(Unit); - actual = target.GetUnitByName(unitName); - Assert.Fail(); - } - #endregion - - #region "UnitConverter.GetUnitByName" - /// - ///A test for GetUnitByName - /// - [TestMethod()] - [TestCategory(UnitTestCategory.CRUD)] - public void UnitConverter_GetUnitByName_Test() - { - UnitConverter target = new UnitConverter(); - string unitName = "Celsius"; - Unit expected = unitPro.Units["Celsius"]; - Unit actual = default(Unit); - actual = target.GetUnitByName(unitName); - Assert.AreEqual(expected, actual); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.ExceptionTest)] - [ExpectedException(typeof(ArgumentException))] - public void UnitConverter_GetUnitByNameNull_Test() - { - UnitConverter target = new UnitConverter(); - - Unit actual = default(Unit); - actual = target.GetUnitByName(null); - - Assert.Fail(); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.ExceptionTest)] - [ExpectedException(typeof(ArgumentException))] - public void UnitConverter_GetUnitByNameEmpty_Test() - { - UnitConverter target = new UnitConverter(); - - Unit actual = default(Unit); - actual = target.GetUnitByName(string.Empty); - - Assert.Fail(); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.ExceptionTest)] - [ExpectedException(typeof(ArgumentException))] - public void UnitConverter_GetUnitByName_UnrecognizedName_Test() - { - UnitConverter target = new UnitConverter(); - string unitName = "BogusUnitName"; - Unit actual = default(Unit); - actual = target.GetUnitByName(unitName); - Assert.Fail(); - } - #endregion - - #region "UnitConverter.ConvertUnits" - #region "Temperature Tests" - #region "Source as Kelvin" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_Celcius_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "K"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(-173.15), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_Celcius_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "K"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(-272.65), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_Celcius_Test3() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0); - string currentUnitName = "K"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(-273.15), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_Fahrenheit_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "K"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(-279.67), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_Fahrenheit_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "K"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(-458.77), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_Fahrenheit_Test3() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0); - string currentUnitName = "K"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(-459.67), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_Millikelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "K"; - string targetUnitName = "mK"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "mK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_Millikelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "K"; - string targetUnitName = "mK"; - Measurement expected = new Measurement(Convert.ToDouble(500), "mK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_Microkelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "K"; - string targetUnitName = "µK"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "µK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_Microkelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "K"; - string targetUnitName = "µK"; - Measurement expected = new Measurement(Convert.ToDouble(500000), "µK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_nK_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "K"; - string targetUnitName = "nK"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000L), "nK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_nK_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "K"; - string targetUnitName = "nK"; - Measurement expected = new Measurement(Convert.ToDouble(500000000), "nK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_kK_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "K"; - string targetUnitName = "kK"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "kK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_kK_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "K"; - string targetUnitName = "kK"; - Measurement expected = new Measurement(Convert.ToDouble(0.0005), "kK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_Megakelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "K"; - string targetUnitName = "MK"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "MK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_Megakelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "K"; - string targetUnitName = "MK"; - Measurement expected = new Measurement(Convert.ToDouble(5E-07), "MK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_Reaumur_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "K"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(-138.52), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_Reaumur_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "K"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(-218.12), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_Reaumur_Test3() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0); - string currentUnitName = "K"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(-218.52), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_Rankine_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "K"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(180), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_Rankine_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "K"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(0.9), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kelvin_to_Rankine_Test3() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0); - string currentUnitName = "K"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(0), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Celsius" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celcius_to_Kelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "C"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(373.15), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celcius_to_Kelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "C"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(273.65), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celcius_to_Kelvin_Test3() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0); - string currentUnitName = "C"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(273.15), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celsius_to_Fahrenheit_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "C"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(212), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celsius_to_Fahrenheit_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "C"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(32.9), "F"); - Measurement actual; - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celsius_to_Fahrenheit_Test3() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0); - string currentUnitName = "C"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(32), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celsius_to_Millikelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "C"; - string targetUnitName = "mK"; - Measurement expected = new Measurement(Convert.ToDouble(373150), "mK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celsius_to_Millikelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "C"; - string targetUnitName = "mK"; - Measurement expected = new Measurement(Convert.ToDouble(273650), "mK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celsius_to_Microkelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "C"; - string targetUnitName = "µK"; - Measurement expected = new Measurement(Convert.ToDouble(373150000), "µK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celsius_to_Microkelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "C"; - string targetUnitName = "µK"; - Measurement expected = new Measurement(Convert.ToDouble(273650000), "µK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celsius_to_nK_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "C"; - string targetUnitName = "nK"; - Measurement expected = new Measurement(Convert.ToDouble(373150000000L), "nK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celsius_to_nK_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "C"; - string targetUnitName = "nK"; - Measurement expected = new Measurement(Convert.ToDouble(273650000000L), "nK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celsius_to_kK_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "C"; - string targetUnitName = "kK"; - Measurement expected = new Measurement(Convert.ToDouble(0.37315), "kK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celsius_to_kK_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "C"; - string targetUnitName = "kK"; - Measurement expected = new Measurement(Convert.ToDouble(0.27365), "kK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celsius_to_Megakelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "C"; - string targetUnitName = "MK"; - Measurement expected = new Measurement(Convert.ToDouble(0.00037315), "MK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celsius_to_Megakelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "C"; - string targetUnitName = "MK"; - Measurement expected = new Measurement(Convert.ToDouble(0.00027365), "MK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celsius_to_Reaumur_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "C"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(80), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celsius_to_Reaumur_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "C"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(0.4), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celsius_to_Reaumur_Test3() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0); - string currentUnitName = "C"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(0), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celsius_to_Rankine_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "C"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(671.67), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celsius_to_Rankine_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "C"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(492.57), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Celsius_to_Rankine_Test3() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0); - string currentUnitName = "C"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(491.67), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Fahrenheit" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_Kelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "F"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(310.93), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_Kelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "F"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(255.65), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_Kelvin_Test3() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0); - string currentUnitName = "F"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(255.37), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_Celsius_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "F"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(37.78), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_Celsius_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "F"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(-17.5), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_Celsius_Test3() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0); - string currentUnitName = "F"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(-17.78), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_Millikelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "F"; - string targetUnitName = "mK"; - Measurement expected = new Measurement(Convert.ToDouble(310927.78), "mK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_Millikelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "F"; - string targetUnitName = "mK"; - Measurement expected = new Measurement(Convert.ToDouble(255650), "mK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_Microkelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "F"; - string targetUnitName = "µK"; - Measurement expected = new Measurement(Convert.ToDouble(310927777.78), "µK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_Microkelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "F"; - string targetUnitName = "µK"; - Measurement expected = new Measurement(Convert.ToDouble(255650000), "µK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_nK_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "F"; - string targetUnitName = "nK"; - Measurement expected = new Measurement(Convert.ToDouble(310927777777.78), "nK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_nK_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "F"; - string targetUnitName = "nK"; - Measurement expected = new Measurement(Convert.ToDouble(255650000000L), "nK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_kK_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "F"; - string targetUnitName = "kK"; - Measurement expected = new Measurement(Convert.ToDouble(0.310927777777778), "kK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_kK_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "F"; - string targetUnitName = "kK"; - Measurement expected = new Measurement(Convert.ToDouble(0.25565), "kK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_Megakelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "F"; - string targetUnitName = "MK"; - Measurement expected = new Measurement(Convert.ToDouble(0.000310927777778), "MK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_Megakelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "F"; - string targetUnitName = "MK"; - Measurement expected = new Measurement(Convert.ToDouble(0.00025565), "MK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_Reaumur_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "F"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(30.22), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_Reaumur_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "F"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(-14), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_Reaumur_Test3() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0); - string currentUnitName = "F"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(-14.22), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_Rankine_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "F"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(559.67), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_Rankine_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "F"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(460.17), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Fahrenheit_to_Rankine_Test3() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0); - string currentUnitName = "F"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(459.67), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Millikelvin" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Millikelvin_to_Kelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mK"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Millikelvin_to_Kelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "mK"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(0.0005), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Millikelvin_to_Celsius_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mK"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(-273.05), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Millikelvin_to_Celsius_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "mK"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(-273.15), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Millikelvin_to_Fahrenheit_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mK"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(-459.49), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Millikelvin_to_Fahrenheit_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "mK"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(-459.67), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Millikelvin_to_Microkelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mK"; - string targetUnitName = "µK"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "µK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Millikelvin_to_Microkelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "mK"; - string targetUnitName = "µK"; - Measurement expected = new Measurement(Convert.ToDouble(500), "µK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Millikelvin_to_nK_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mK"; - string targetUnitName = "nK"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "nK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Millikelvin_to_nK_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "mK"; - string targetUnitName = "nK"; - Measurement expected = new Measurement(Convert.ToDouble(500000), "nK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Millikelvin_to_kK_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mK"; - string targetUnitName = "kK"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "kK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Millikelvin_to_kK_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "mK"; - string targetUnitName = "kK"; - Measurement expected = new Measurement(Convert.ToDouble(5E-07), "kK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Millikelvin_to_Megakelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mK"; - string targetUnitName = "MK"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "MK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Millikelvin_to_Megakelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "mK"; - string targetUnitName = "MK"; - Measurement expected = new Measurement(Convert.ToDouble(5E-10), "MK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Millikelvin_to_Reaumur_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mK"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(-218.44), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Millikelvin_to_Reaumur_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "mK"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(-218.52), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Millikelvin_to_Rankine_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mK"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(0.18), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Millikelvin_to_Rankine_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "mK"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(0.0009), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Millikelvin" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microkelvin_to_Kelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µK"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microkelvin_to_Kelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "µK"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(5E-07), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microkelvin_to_Celsius_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µK"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(-273.15), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microkelvin_to_Celsius_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "µK"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(-273.15), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microkelvin_to_Fahrenheit_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µK"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(-459.67), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microkelvin_to_Fahrenheit_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "µK"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(-459.67), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microkelvin_to_Millikelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µK"; - string targetUnitName = "mK"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "mK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microkelvin_to_Millikelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "µK"; - string targetUnitName = "mK"; - Measurement expected = new Measurement(Convert.ToDouble(0.0005), "mK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microkelvin_to_nK_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µK"; - string targetUnitName = "nK"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "nK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microkelvin_to_nK_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "µK"; - string targetUnitName = "nK"; - Measurement expected = new Measurement(Convert.ToDouble(500), "nK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microkelvin_to_kK_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µK"; - string targetUnitName = "kK"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "kK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microkelvin_to_kK_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "µK"; - string targetUnitName = "kK"; - Measurement expected = new Measurement(Convert.ToDouble(5E-10), "kK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microkelvin_to_Megakelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µK"; - string targetUnitName = "MK"; - Measurement expected = new Measurement(Convert.ToDouble(1E-10), "MK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microkelvin_to_Megakelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "µK"; - string targetUnitName = "MK"; - Measurement expected = new Measurement(Convert.ToDouble(5E-13), "MK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microkelvin_to_Reaumur_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µK"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(-218.52), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microkelvin_to_Reaumur_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "µK"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(-218.52), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microkelvin_to_Rankine_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µK"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(0.00018), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microkelvin_to_Rankine_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "µK"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(9E-07), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Millikelvin" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nK_to_Kelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nK"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nK_to_Kelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "nK"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(5E-10), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nK_to_Celsius_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nK"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(-273.15), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nK_to_Celsius_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "nK"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(-273.15), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nK_to_Fahrenheit_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nK"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(-459.67), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nK_to_Fahrenheit_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "nK"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(-459.67), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nK_to_Millikelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nK"; - string targetUnitName = "mK"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "mK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nK_to_Millikelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "nK"; - string targetUnitName = "mK"; - Measurement expected = new Measurement(Convert.ToDouble(5E-07), "mK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nK_to_Microkelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nK"; - string targetUnitName = "µK"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "µK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nK_to_Microkelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "nK"; - string targetUnitName = "µK"; - Measurement expected = new Measurement(Convert.ToDouble(0.0005), "µK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nK_to_kK_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nK"; - string targetUnitName = "kK"; - Measurement expected = new Measurement(Convert.ToDouble(1E-10), "kK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nK_to_kK_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "nK"; - string targetUnitName = "kK"; - Measurement expected = new Measurement(Convert.ToDouble(5E-13), "kK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nK_to_Megakelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nK"; - string targetUnitName = "MK"; - Measurement expected = new Measurement(Convert.ToDouble(1E-13), "MK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nK_to_Megakelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "nK"; - string targetUnitName = "MK"; - Measurement expected = new Measurement(Convert.ToDouble(0), "MK"); - //should be 0.0000000000000005; can only round to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nK_to_Reaumur_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nK"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(-218.52), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nK_to_Reaumur_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "nK"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(-218.52), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nK_to_Rankine_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nK"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(1.8E-07), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nK_to_Rankine_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "nK"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(9E-10), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Kilokelvin" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kK_to_Kelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kK"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kK_to_Kelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "kK"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(500), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kK_to_Celsius_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kK"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(99726.85), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kK_to_Celsius_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "kK"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(226.85), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kK_to_Fahrenheit_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kK"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(179540.33), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kK_to_Fahrenheit_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "kK"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(440.33), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kK_to_Millikelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kK"; - string targetUnitName = "mK"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "mK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kK_to_Millikelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "kK"; - string targetUnitName = "mK"; - Measurement expected = new Measurement(Convert.ToDouble(500000), "mK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kK_to_Microkelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kK"; - string targetUnitName = "µK"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000L), "µK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kK_to_Microkelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "kK"; - string targetUnitName = "µK"; - Measurement expected = new Measurement(Convert.ToDouble(500000000), "µK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kK_to_nK_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kK"; - string targetUnitName = "nK"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000L), "nK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kK_to_nK_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "kK"; - string targetUnitName = "nK"; - Measurement expected = new Measurement(Convert.ToDouble(500000000000L), "nK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kK_to_Megakelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kK"; - string targetUnitName = "MK"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "MK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kK_to_Megakelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "kK"; - string targetUnitName = "MK"; - Measurement expected = new Measurement(Convert.ToDouble(0.0005), "MK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kK_to_Reaumur_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kK"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(79781.48), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kK_to_Reaumur_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "kK"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(181.48), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kK_to_Rankine_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kK"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(180000), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kK_to_Rankine_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "kK"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(900), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Megakelvin" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megakelvin_to_Kelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "MK"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megakelvin_to_Kelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "MK"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(500000), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megakelvin_to_Celsius_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "MK"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(99999726.85), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megakelvin_to_Celsius_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "MK"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(499726.85), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megakelvin_to_Fahrenheit_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "MK"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(179999540.33), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megakelvin_to_Fahrenheit_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "MK"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(899540.33), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megakelvin_to_Millikelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "MK"; - string targetUnitName = "mK"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000L), "mK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megakelvin_to_Millikelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "MK"; - string targetUnitName = "mK"; - Measurement expected = new Measurement(Convert.ToDouble(500000000), "mK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megakelvin_to_Microkelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "MK"; - string targetUnitName = "µK"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000L), "µK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megakelvin_to_Microkelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "MK"; - string targetUnitName = "µK"; - Measurement expected = new Measurement(Convert.ToDouble(500000000000L), "µK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megakelvin_to_nK_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "MK"; - string targetUnitName = "nK"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000000L), "nK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megakelvin_to_nK_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "MK"; - string targetUnitName = "nK"; - Measurement expected = new Measurement(Convert.ToDouble(500000000000000L), "nK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megakelvin_to_kK_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "MK"; - string targetUnitName = "kK"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "kK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megakelvin_to_kK_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "MK"; - string targetUnitName = "kK"; - Measurement expected = new Measurement(Convert.ToDouble(500), "kK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megakelvin_to_Reaumur_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "MK"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(79999781.48), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megakelvin_to_Reaumur_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "MK"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(399781.48), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megakelvin_to_Rankine_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "MK"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(180000000), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megakelvin_to_Rankine_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "MK"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(900000), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Reaumur" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_Kelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Re"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(398.15), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_Kelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "Re"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(273.77), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_Kelvin_Test3() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0); - string currentUnitName = "Re"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(273.15), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_Fahrenheit_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Re"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(257), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_Fahrenheit_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "Re"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(33.12), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_Fahrenheit_Test3() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0); - string currentUnitName = "Re"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(32), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_Millikelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Re"; - string targetUnitName = "mK"; - Measurement expected = new Measurement(Convert.ToDouble(398150), "mK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_Millikelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "Re"; - string targetUnitName = "mK"; - Measurement expected = new Measurement(Convert.ToDouble(273775), "mK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_Microkelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Re"; - string targetUnitName = "µK"; - Measurement expected = new Measurement(Convert.ToDouble(398150000), "µK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_Microkelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "Re"; - string targetUnitName = "µK"; - Measurement expected = new Measurement(Convert.ToDouble(273775000), "µK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_nK_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Re"; - string targetUnitName = "nK"; - Measurement expected = new Measurement(Convert.ToDouble(398150000000L), "nK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_nK_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "Re"; - string targetUnitName = "nK"; - Measurement expected = new Measurement(Convert.ToDouble(273775000000L), "nK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_kK_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Re"; - string targetUnitName = "kK"; - Measurement expected = new Measurement(Convert.ToDouble(0.39815), "kK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_kK_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "Re"; - string targetUnitName = "kK"; - Measurement expected = new Measurement(Convert.ToDouble(0.273775), "kK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_Megakelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Re"; - string targetUnitName = "MK"; - Measurement expected = new Measurement(Convert.ToDouble(0.00039815), "MK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_Megakelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "Re"; - string targetUnitName = "MK"; - Measurement expected = new Measurement(Convert.ToDouble(0.000273775), "MK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_Celsius_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Re"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(125), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_Celsius_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "Re"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(0.62), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_Celsius_Test3() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0); - string currentUnitName = "Re"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(0), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_Rankine_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Re"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(716.67), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_Rankine_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "Re"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(492.8), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Reaumur_to_Rankine_Test3() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0); - string currentUnitName = "Re"; - string targetUnitName = "Ra"; - Measurement expected = new Measurement(Convert.ToDouble(491.67), "Ra"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Rankine" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_Kelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Ra"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(55.56), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_Kelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "Ra"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(0.28), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_Kelvin_Test3() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0); - string currentUnitName = "Ra"; - string targetUnitName = "K"; - Measurement expected = new Measurement(Convert.ToDouble(0), "K"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_Fahrenheit_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Ra"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(-359.67), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_Fahrenheit_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "Ra"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(-459.17), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_Fahrenheit_Test3() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0); - string currentUnitName = "Ra"; - string targetUnitName = "F"; - Measurement expected = new Measurement(Convert.ToDouble(-459.67), "F"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_Millikelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Ra"; - string targetUnitName = "mK"; - Measurement expected = new Measurement(Convert.ToDouble(55555.56), "mK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_Millikelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "Ra"; - string targetUnitName = "mK"; - Measurement expected = new Measurement(Convert.ToDouble(277.78), "mK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_Microkelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Ra"; - string targetUnitName = "µK"; - Measurement expected = new Measurement(Convert.ToDouble(55555555.56), "µK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_Microkelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "Ra"; - string targetUnitName = "µK"; - Measurement expected = new Measurement(Convert.ToDouble(277777.78), "µK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_nK_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Ra"; - string targetUnitName = "nK"; - Measurement expected = new Measurement(Convert.ToDouble(55555555555.56), "nK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_nK_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "Ra"; - string targetUnitName = "nK"; - Measurement expected = new Measurement(Convert.ToDouble(277777777.78), "nK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_kK_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Ra"; - string targetUnitName = "kK"; - Measurement expected = new Measurement(Convert.ToDouble(0.055555555555556), "kK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_kK_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "Ra"; - string targetUnitName = "kK"; - Measurement expected = new Measurement(Convert.ToDouble(0.000277777777778), "kK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_Megakelvin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Ra"; - string targetUnitName = "MK"; - Measurement expected = new Measurement(Convert.ToDouble(5.5555555556E-05), "MK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_Megakelvin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "Ra"; - string targetUnitName = "MK"; - Measurement expected = new Measurement(Convert.ToDouble(2.77777778E-07), "MK"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_Celsius_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Ra"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(-217.59), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_Celsius_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "Ra"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(-272.87), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_Celsius_Test3() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0); - string currentUnitName = "Ra"; - string targetUnitName = "C"; - Measurement expected = new Measurement(Convert.ToDouble(-273.15), "C"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_Reaumur_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Ra"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(-174.08), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_Reaumur_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.5); - string currentUnitName = "Ra"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(-218.3), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Rankine_to_Reaumur_Test3() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0); - string currentUnitName = "Ra"; - string targetUnitName = "Re"; - Measurement expected = new Measurement(Convert.ToDouble(-218.52), "Re"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - #endregion - #endregion - - #region "Mass Tests" - #region "Source as kg" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_g_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kg"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_g_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kg"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_mg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kg"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_mg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kg"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_µg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kg"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000L), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_µg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kg"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(999999999), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_ng_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kg"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000L), "ng"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_ng_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kg"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000L), "ng"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_Megagram_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kg"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "Mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_Megagram_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kg"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "Mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_Gg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kg"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "Gg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_Gg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kg"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "Gg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_tonne_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kg"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_tonne_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kg"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_ton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kg"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(0.110231131092439), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_ton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kg"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(0.001102311309822), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_stone_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kg"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(15.747304441777), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_stone_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kg"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(0.157473044260297), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_cwt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kg"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(2.20462262184878), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_cwt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kg"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(0.022046226196442), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_lb_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kg"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(220.462262184878), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_lb_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kg"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(2.20462261964415), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_oz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kg"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(3527.39619495804), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kg_to_oz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kg"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(35.2739619143064), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as g" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_kg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "g"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_kg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "g"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_mg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "g"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_mg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "g"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_µg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "g"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_µg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "g"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_ng_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "g"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000L), "ng"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_ng_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "g"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(999999999), "ng"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_Megagram_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "g"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "Mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_Megagram_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "g"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "Mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_Gg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "g"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "Gg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_Gg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "g"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "Gg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_tonne_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "g"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_tonne_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "g"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_ton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "g"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(0.000110231131092), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_ton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "g"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(1.10231131E-06), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_stone_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "g"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(0.015747304441777), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_stone_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "g"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(0.00015747304426), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_cwt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "g"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(0.002204622621849), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_cwt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "g"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(2.2046226196E-05), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_lb_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "g"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(0.220462262184878), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_lb_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "g"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(0.002204622619644), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_oz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "g"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(3.5273961949580408), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_g_to_oz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "g"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(0.035273961914306), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as mg" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_kg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mg"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_kg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mg"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_g_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mg"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_g_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mg"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_µg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mg"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_µg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mg"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_ng_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mg"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "ng"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_ng_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mg"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "ng"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_Megagram_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mg"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "Mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_Megagram_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mg"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "Mg"); - //should be 0.000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_Gg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mg"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(1E-10), "Gg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_Gg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mg"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(1E-12), "Gg"); - //value should be 0.000000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_tonne_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mg"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_tonne_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mg"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "t"); - // value should be 0.000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_ton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mg"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(1.10231131E-07), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_ton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mg"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(1.102311E-09), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_stone_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mg"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(1.5747304442E-05), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_stone_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mg"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(1.57473044E-07), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_cwt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mg"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(2.204622622E-06), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_cwt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mg"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(2.2046226E-08), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_lb_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mg"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(0.000220462262185), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_lb_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mg"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(2.20462262E-06), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_oz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mg"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(0.003527396194958), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mg_to_oz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mg"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(3.5273961914E-05), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as µg" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_kg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µg"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_kg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µg"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_g_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µg"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_g_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µg"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_mg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µg"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_mg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µg"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_ng_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µg"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "ng"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_ng_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µg"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "ng"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_Megagram_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µg"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(1E-10), "Mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_Megagram_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µg"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(1E-12), "Mg"); - //should be 0.000000000000099999999, .net rounds at 15 total digits - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_Gg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µg"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(1E-13), "Gg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_Gg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µg"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(1E-15), "Gg"); - //should be 0.00000000000000099999999, .net rounds at 15 total digits - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_tonne_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µg"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(1E-10), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_tonne_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µg"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(1E-12), "t"); - //value should be 0.000000000000999999999, .net rounds at 15 total digits - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_ton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µg"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(1.10231E-10), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_ton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µg"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(1.102E-12), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_stone_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µg"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(1.5747304E-08), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_stone_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µg"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(1.57473E-10), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_cwt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µg"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(2.204623E-09), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_cwt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µg"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(2.2046E-11), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_lb_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µg"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(2.20462262E-07), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_lb_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µg"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(2.204623E-09), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_oz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µg"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(3.527396195E-06), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µg_to_oz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µg"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(3.5273962E-08), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as ng" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_kg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ng"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(1E-10), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_kg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ng"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(1E-12), "kg"); - //value should be 0.000000000000999999999, .net rounds at 15 total digits - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_g_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ng"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_g_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ng"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "g"); - //value should be 0.000000000999999999, .net rounds at 15 total digits - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_mg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ng"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_mg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ng"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_µg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ng"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_µg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ng"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_Megagram_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ng"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(1E-13), "Mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_Megagram_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ng"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(1E-15), "Mg"); - //should be 0.000000000000000999999999, .net rounds at 15 total digits - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_Gg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ng"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(0), "Gg"); - //value should be 0.0000000000000001, .net rounds at 15 total digits - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_Gg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ng"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(0.0), "Gg"); - //value should be 9.99999999E-19, .net rounds at 15 total digits - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_tonne_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ng"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(1E-13), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_tonne_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ng"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(1E-15), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_ton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ng"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(1.1E-13), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_ton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ng"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(1E-15), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_stone_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ng"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(1.5747E-11), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_stone_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ng"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(1.57E-13), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_cwt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ng"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(2.205E-12), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_cwt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ng"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(2.2E-14), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_lb_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ng"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(2.20462E-10), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_lb_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ng"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(2.205E-12), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_oz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ng"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(3.527396E-09), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ng_to_oz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ng"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(3.5274E-11), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Megagram" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_kg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mg"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_kg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mg"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_g_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mg"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_g_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mg"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_µg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mg"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000L), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_µg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mg"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000L), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_ng_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mg"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000000L), "ng"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_ng_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mg"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000000L), "ng"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_mg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mg"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000L), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_mg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mg"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(999999999), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_Gg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mg"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "Gg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_Gg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mg"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "Gg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagrams_to_tonne_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mg"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(100), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagrams_to_tonne_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mg"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(0.999999999), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_ton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mg"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(110.231131092439), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_ton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mg"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(1.10231130982208), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_stone_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mg"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(15747.304441777), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_stone_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mg"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(157.473044260297), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_cwt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mg"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(2204.62262184878), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_cwt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mg"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(22.0462261964415), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_lb_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mg"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(220462.262184878), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_lb_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mg"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(2204.62261964415), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_oz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mg"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(3527396.194958), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megagram_to_oz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mg"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(35273.961914306), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Gigagram" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_kg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gg"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_kg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gg"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_g_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gg"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000L), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_g_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gg"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(999999999), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_mg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gg"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000.0), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_mg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gg"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000L), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_µg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gg"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000000L), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_µg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gg"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000000L), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_ng_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gg"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(1E+20), "ng"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_ng_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gg"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000000000L), "ng"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_Megagram_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gg"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_Megagram_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gg"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "Mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_tonne_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gg"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_tonne_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gg"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_ton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gg"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(110231.131092439), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_ton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gg"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(1102.31130982208), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_stone_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gg"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(15747304.441777), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_stone_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gg"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(157473.044260297), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_cwt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gg"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(2204622.62184878), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_cwt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gg"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(22046.2261964415), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_lb_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gg"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(220462262.184878), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_lb_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gg"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(2204622.61964415), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_oz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gg"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(3527396194.95804), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gg_to_oz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gg"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(35273961.9143064), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Tonnes" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_kg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "t"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_kg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "t"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_mg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "t"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000L), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_mg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "t"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(999999999), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_g_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "t"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_g_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "t"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_µg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "t"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000L), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_µg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "t"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000L), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_ng_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "t"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000000L), "ng"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_ng_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "t"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000000L), "ng"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_Megagrams_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "t"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(100), "Mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_Megagrams_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "t"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(0.999999999), "Mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_Gg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "t"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "Gg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_Gg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "t"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "Gg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_ton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "t"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(110.231131092439), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_ton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "t"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(1.10231130982208), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_cwt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "t"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(2204.62262184878), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_cwt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "t"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(22.0462261964415), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_stone_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "t"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(15747.304441777), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_stone_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "t"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(157.473044260297), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_lb_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "t"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(220462.262184878), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_lb_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "t"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(2204.62261964415), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_oz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "t"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(3527396.194958), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonne_to_oz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "t"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(35273.961914306), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Tons" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ton_to_kg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ton"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(90718.474), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ton_to_kg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ton"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(907.184739092815), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ton_to_mg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ton"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(90718474000L), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ton_to_mg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ton"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(907184739.092815), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ton_to_g_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ton"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(90718474), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ton_to_g_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ton"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(907184.739092815), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ton_to_µg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ton"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(90718474000000.0), "µg"); - //should be 90718474000000, .net bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ton_to_µg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ton"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(907184739092.815), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ton_to_ng_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ton"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(90718474000000016L), "ng"); - //should be 90718474000000000, .net bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ton_to_ng_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ton"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(907184739092815.0), "ng"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ton_to_Megagrams_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ton"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(90.718474), "Mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ton_to_Megagrams_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ton"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(0.907184739092815), "Mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ton_to_Gg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ton"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(0.090718474), "Gg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ton_to_Gg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ton"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(0.000907184739093), "Gg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ton_to_tonne_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ton"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(90.718474), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ton_to_tonne_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ton"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(0.907184739092815), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ton_to_lb_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ton"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(200000), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ton_to_lb_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ton"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(1999.999998), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ton_to_oz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ton"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(3200000), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ton_to_oz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ton"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(31999.999968), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Stone" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_kg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "st"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(635.029318), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_kg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "st"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(6.35029317364971), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_g_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "st"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(635029.318), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_g_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "st"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(6350.29317364971), "g"); - //actual value 6350.29318, .net bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_mg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "st"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(635029318.0), "mg"); - //actual value 635029318, .net bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_mg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "st"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(6350293.17364971), "mg"); - //actual value 6350293.1736, .net bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_µg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "st"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(635029318000L), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_µg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "st"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(6350293173.64971), "µg"); - //actual value 6350293173.6, .net bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_ng_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "st"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(635029318000000L), "ng"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_ng_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "st"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(6350293173649.71), "ng"); - //actual value 6350293173600, .net bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_Megagram_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "st"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(0.635029318), "Mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_Megagram_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "st"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(0.00635029317365), "Mg"); - //actual value .006350293173600, .net bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_Gg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "st"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(0.000635029318), "Gg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_Gg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "st"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(6.350293174E-06), "Gg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_tonne_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "st"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(0.635029318), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_tonne_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "st"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(0.00635029317365), "t"); - //actual value 0.006350293, .net bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_ton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "st"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(0.7), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_ton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "st"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(0.006999999993), "ton"); - //should be 0.007, .net bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_cwt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "st"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(14), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_cwt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "st"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(0.13999999986), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_lb_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "st"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(1400), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_lb_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "st"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(13.999999986), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_oz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "st"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(22400), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_stone_to_oz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "st"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(223.999999776), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as CWT" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_kg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cwt"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(4535.9237), "kg"); - // actual value 4535.9237, .net bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_kg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cwt"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(45.3592369546408), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_mg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cwt"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(4535923700L), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_mg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cwt"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(45359236.9546408), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_g_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cwt"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(4535923.7), "g"); - //should be 4535923.7, .net bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_g_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cwt"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(45359.2369546408), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - - //var d = Math.(expected.Value); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_µg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cwt"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(4535923700000.0), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_µg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cwt"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(45359236954.640762), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_ng_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cwt"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(4.5359237E+15), "ng"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_ng_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cwt"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(45359236954640.8), "ng"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_Megagram_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cwt"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(4.5359237), "Mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_Megagram_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cwt"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(0.045359236954641), "Mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_Gg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cwt"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(0.0045359237), "Gg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_Gg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cwt"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(4.5359236955E-05), "Gg"); - //actual value 0.000045359, .net bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_tonne_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cwt"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(4.5359237), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_tonne_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cwt"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(0.045359236954641), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_ton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cwt"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(5), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_ton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cwt"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(0.04999999995), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_stone_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cwt"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(714.285714285714), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_stone_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cwt"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(7.14285713571429), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_lb_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cwt"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(10000), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_lb_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cwt"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(99.9999999), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_oz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cwt"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(160000), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cwt_to_oz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cwt"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(1599.9999984), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Pound" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_kg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(45.359237), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_kg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(0.453592369546408), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_g_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(45359.237), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_g_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(453.592369546408), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_mg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(45359237), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_mg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(453592.369546408), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_µg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(45359237000.0), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_µg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(453592369.546408), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_ng_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(45359237000000.0), "ng"); - //should be 45359237000000, .net conversion bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_ng_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(453592369546.41), "ng"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_Megagram_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(0.045359237), "Mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_Megagram_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(0.000453592369546), "Mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_Gg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(4.5359237E-05), "Gg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_Gg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(4.5359237E-07), "Gg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_tonne_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(0.045359237), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_tonne_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(0.000453592369546), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_ton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(0.05), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_ton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(0.0004999999995), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_stone_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(7.14285714285714), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_stone_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(0.071428571357143), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_cwt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(1), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_cwt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(0.00999999999), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_oz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(1600), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lb_to_oz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb"; - string targetUnitName = "oz"; - Measurement expected = new Measurement(Convert.ToDouble(15.999999984), "oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Ounce" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_kg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "oz"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(2.8349523125), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_kg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "oz"; - string targetUnitName = "kg"; - Measurement expected = new Measurement(Convert.ToDouble(0.02834952309665), "kg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_g_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "oz"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(2834.9523125), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_g_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "oz"; - string targetUnitName = "g"; - Measurement expected = new Measurement(Convert.ToDouble(28.3495230966505), "g"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_mg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "oz"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(2834952.3125), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_mg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "oz"; - string targetUnitName = "mg"; - Measurement expected = new Measurement(Convert.ToDouble(28349.5230966505), "mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_µg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "oz"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(2834952312.5), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_µg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "oz"; - string targetUnitName = "µg"; - Measurement expected = new Measurement(Convert.ToDouble(28349523.0966505), "µg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_ng_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "oz"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(2834952312500.0), "ng"); - //should be 2834952312500, .net conversion bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_ng_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "oz"; - string targetUnitName = "ng"; - Measurement expected = new Measurement(Convert.ToDouble(28349523096.6505), "ng"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_Megagram_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "oz"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(0.0028349523125), "Mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_Megagram_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "oz"; - string targetUnitName = "Mg"; - Measurement expected = new Measurement(Convert.ToDouble(2.8349523097E-05), "Mg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_Gg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "oz"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(2.834952313E-06), "Gg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_Gg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "oz"; - string targetUnitName = "Gg"; - Measurement expected = new Measurement(Convert.ToDouble(2.8349523E-08), "Gg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_tonne_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "oz"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(0.0028349523125), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_tonne_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "oz"; - string targetUnitName = "t"; - Measurement expected = new Measurement(Convert.ToDouble(2.8349523097E-05), "t"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_ton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "oz"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(0.003125), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_ton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "oz"; - string targetUnitName = "ton"; - Measurement expected = new Measurement(Convert.ToDouble(3.1249999969E-05), "ton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_stone_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "oz"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(0.446428571428571), "st"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_stone_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "oz"; - string targetUnitName = "st"; - Measurement expected = new Measurement(Convert.ToDouble(0.004464285709821), "st"); - //UK stone; US stone 0.005 - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_cwt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "oz"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(0.0625), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_cwt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "oz"; - string targetUnitName = "cwt"; - Measurement expected = new Measurement(Convert.ToDouble(0.000624999999375), "cwt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_lb_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "oz"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(6.25), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_oz_to_lb_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "oz"; - string targetUnitName = "lb"; - Measurement expected = new Measurement(Convert.ToDouble(0.0624999999375), "lb"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - #endregion - - #region "Time Tests" - #region "Source as Seconds" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_sec_to_min_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "s"; - string targetUnitName = "min"; - Measurement expected = new Measurement(Convert.ToDouble(1.66666666666667), "min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_sec_to_min_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "s"; - string targetUnitName = "min"; - Measurement expected = new Measurement(Convert.ToDouble(0.01666666665), "min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_sec_to_hr_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "s"; - string targetUnitName = "hr"; - Measurement expected = new Measurement(Convert.ToDouble(0.027777777777778), "hr"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_sec_to_hr_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "s"; - string targetUnitName = "hr"; - Measurement expected = new Measurement(Convert.ToDouble(0.0002777777775), "hr"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_sec_to_ms_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "s"; - string targetUnitName = "ms"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "ms"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_sec_to_ms_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "s"; - string targetUnitName = "ms"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "ms"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_sec_to_day_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "s"; - string targetUnitName = "d"; - Measurement expected = new Measurement(Convert.ToDouble(0.001157407407407), "d"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_sec_to_day_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "s"; - string targetUnitName = "d"; - Measurement expected = new Measurement(Convert.ToDouble(1.1574074062E-05), "d"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_sec_to_wk_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "s"; - string targetUnitName = "wk"; - Measurement expected = new Measurement(Convert.ToDouble(0.000165343915344), "wk"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_sec_to_wk_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "s"; - string targetUnitName = "wk"; - Measurement expected = new Measurement(Convert.ToDouble(1.653439152E-06), "wk"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Minutes" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_min_to_sec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "min"; - string targetUnitName = "s"; - Measurement expected = new Measurement(Convert.ToDouble(6000), "s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_min_to_sec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "min"; - string targetUnitName = "s"; - Measurement expected = new Measurement(Convert.ToDouble(59.99999994), "s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_min_to_hr_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "min"; - string targetUnitName = "hr"; - Measurement expected = new Measurement(Convert.ToDouble(1.66666666666667), "hr"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_min_to_hr_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "min"; - string targetUnitName = "hr"; - Measurement expected = new Measurement(Convert.ToDouble(0.01666666665), "hr"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_min_to_ms_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "min"; - string targetUnitName = "ms"; - Measurement expected = new Measurement(Convert.ToDouble(6000000), "ms"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_min_to_ms_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "min"; - string targetUnitName = "ms"; - Measurement expected = new Measurement(Convert.ToDouble(59999.99994), "ms"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_min_to_day_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "min"; - string targetUnitName = "d"; - Measurement expected = new Measurement(Convert.ToDouble(0.069444444444444), "d"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_min_to_day_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "min"; - string targetUnitName = "d"; - Measurement expected = new Measurement(Convert.ToDouble(0.00069444444375), "d"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_min_to_wk_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "min"; - string targetUnitName = "wk"; - Measurement expected = new Measurement(Convert.ToDouble(0.009920634920635), "wk"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_min_to_wk_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "min"; - string targetUnitName = "wk"; - Measurement expected = new Measurement(Convert.ToDouble(9.9206349107E-05), "wk"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Hours" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_hr_to_sec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "hr"; - string targetUnitName = "s"; - Measurement expected = new Measurement(Convert.ToDouble(360000), "s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_hr_to_sec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "hr"; - string targetUnitName = "s"; - Measurement expected = new Measurement(Convert.ToDouble(3599.9999964), "s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_hr_to_min_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "hr"; - string targetUnitName = "min"; - Measurement expected = new Measurement(Convert.ToDouble(6000), "min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_hr_to_min_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "hr"; - string targetUnitName = "min"; - Measurement expected = new Measurement(Convert.ToDouble(59.99999994), "min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_hr_to_ms_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "hr"; - string targetUnitName = "ms"; - Measurement expected = new Measurement(Convert.ToDouble(360000000), "ms"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_hr_to_ms_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "hr"; - string targetUnitName = "ms"; - Measurement expected = new Measurement(Convert.ToDouble(3599999.9964), "ms"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_hr_to_day_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "hr"; - string targetUnitName = "d"; - Measurement expected = new Measurement(Convert.ToDouble(4.16666666666667), "d"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_hr_to_day_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "hr"; - string targetUnitName = "d"; - Measurement expected = new Measurement(Convert.ToDouble(0.041666666625), "d"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_hr_to_wk_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "hr"; - string targetUnitName = "wk"; - Measurement expected = new Measurement(Convert.ToDouble(0.595238095238095), "wk"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_hr_to_wk_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "hr"; - string targetUnitName = "wk"; - Measurement expected = new Measurement(Convert.ToDouble(0.005952380946429), "wk"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Milliseconds" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ms_to_sec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ms"; - string targetUnitName = "s"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ms_to_sec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ms"; - string targetUnitName = "s"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ms_to_min_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ms"; - string targetUnitName = "min"; - Measurement expected = new Measurement(Convert.ToDouble(0.001666666666667), "min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ms_to_min_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ms"; - string targetUnitName = "min"; - Measurement expected = new Measurement(Convert.ToDouble(1.666666665E-05), "min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ms_to_hr_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ms"; - string targetUnitName = "hr"; - Measurement expected = new Measurement(Convert.ToDouble(2.7777777778E-05), "hr"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ms_to_hr_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ms"; - string targetUnitName = "hr"; - Measurement expected = new Measurement(Convert.ToDouble(2.77777778E-07), "hr"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ms_to_day_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ms"; - string targetUnitName = "d"; - Measurement expected = new Measurement(Convert.ToDouble(1.157407407E-06), "d"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ms_to_day_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ms"; - string targetUnitName = "d"; - Measurement expected = new Measurement(Convert.ToDouble(1.1574074E-08), "d"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ms_to_wk_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ms"; - string targetUnitName = "wk"; - Measurement expected = new Measurement(Convert.ToDouble(1.65343915E-07), "wk"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ms_to_wk_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ms"; - string targetUnitName = "wk"; - Measurement expected = new Measurement(Convert.ToDouble(1.653439E-09), "wk"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Days" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_day_to_sec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "d"; - string targetUnitName = "s"; - Measurement expected = new Measurement(Convert.ToDouble(8640000), "s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_day_to_sec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "d"; - string targetUnitName = "s"; - Measurement expected = new Measurement(Convert.ToDouble(86399.9999136), "s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_day_to_min_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "d"; - string targetUnitName = "min"; - Measurement expected = new Measurement(Convert.ToDouble(144000), "min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_day_to_min_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "d"; - string targetUnitName = "min"; - Measurement expected = new Measurement(Convert.ToDouble(1439.99999856), "min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_day_to_hr_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "d"; - string targetUnitName = "hr"; - Measurement expected = new Measurement(Convert.ToDouble(2400), "hr"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_day_to_hr_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "d"; - string targetUnitName = "hr"; - Measurement expected = new Measurement(Convert.ToDouble(23.999999976), "hr"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_day_to_ms_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "d"; - string targetUnitName = "ms"; - Measurement expected = new Measurement(Convert.ToDouble(8640000000L), "ms"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_day_to_ms_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "d"; - string targetUnitName = "ms"; - Measurement expected = new Measurement(Convert.ToDouble(86399999.9136), "ms"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_day_to_wk_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "d"; - string targetUnitName = "wk"; - Measurement expected = new Measurement(Convert.ToDouble(14.2857142857143), "wk"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_day_to_wk_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "d"; - string targetUnitName = "wk"; - Measurement expected = new Measurement(Convert.ToDouble(0.142857142714286), "wk"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Weeks" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_wk_to_sec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "wk"; - string targetUnitName = "s"; - Measurement expected = new Measurement(Convert.ToDouble(60480000), "s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_wk_to_sec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "wk"; - string targetUnitName = "s"; - Measurement expected = new Measurement(Convert.ToDouble(604799.9993952), "s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_wk_to_min_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "wk"; - string targetUnitName = "min"; - Measurement expected = new Measurement(Convert.ToDouble(1008000), "min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_wk_to_min_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "wk"; - string targetUnitName = "min"; - Measurement expected = new Measurement(Convert.ToDouble(10079.99998992), "min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_wk_to_hr_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "wk"; - string targetUnitName = "hr"; - Measurement expected = new Measurement(Convert.ToDouble(16800), "hr"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_wk_to_hr_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "wk"; - string targetUnitName = "hr"; - Measurement expected = new Measurement(Convert.ToDouble(167.999999832), "hr"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_wk_to_ms_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "wk"; - string targetUnitName = "ms"; - Measurement expected = new Measurement(Convert.ToDouble(60480000000L), "ms"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_wk_to_ms_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "wk"; - string targetUnitName = "ms"; - Measurement expected = new Measurement(Convert.ToDouble(604799999.3952), "ms"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_wk_to_day_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "wk"; - string targetUnitName = "d"; - Measurement expected = new Measurement(Convert.ToDouble(700), "d"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_wk_to_day_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "wk"; - string targetUnitName = "d"; - Measurement expected = new Measurement(Convert.ToDouble(6.999999993), "d"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - #endregion - - - #endregion -} - - diff --git a/Units.Test/UnitConverterTest2.cs b/Units.Test/UnitConverterTest2.cs deleted file mode 100644 index 8bfa331..0000000 --- a/Units.Test/UnitConverterTest2.cs +++ /dev/null @@ -1,10202 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Units; - -namespace Units.Test -{ - [TestClass()] - public class UnitConverterTest2 - { - private TestContext testContextInstance; - - private UnitProvider unitPro = new UnitProvider(); - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get { return testContextInstance; } - set { testContextInstance = value; } - } - - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ _ - //Public Sub MyTestCleanup() - //End Sub - // - - #endregion - #region "UnitConverter.ConvertUnits" - - #region "Force Tests" - #region "Source as Newton (N)" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_N_to_dyn_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "N"; - string targetUnitName = "dyn"; - Measurement expected = new Measurement(Convert.ToDouble(10000000.0), "dyn"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_N_to_dyn_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "N"; - string targetUnitName = "dyn"; - Measurement expected = new Measurement(Convert.ToDouble(99999.9999), "dyn"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_N_to_lbf_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "N"; - string targetUnitName = "lbf"; - Measurement expected = new Measurement(Convert.ToDouble(22.4808943099999), "lbf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_N_to_lbf_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "N"; - string targetUnitName = "lbf"; - Measurement expected = new Measurement(Convert.ToDouble(0.22480894287519), "lbf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_N_to_tonf_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "N"; - string targetUnitName = "tonf"; - Measurement expected = new Measurement(Convert.ToDouble(0.011240447154986), "tonf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_N_to_tonf_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "N"; - string targetUnitName = "tonf"; - Measurement expected = new Measurement(Convert.ToDouble(0.000112404471437), "tonf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_N_to_tonnef_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "N"; - string targetUnitName = "tonnef"; - Measurement expected = new Measurement(Convert.ToDouble(0.010197162129779), "tonnef"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_N_to_tonnef_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "N"; - string targetUnitName = "tonnef"; - Measurement expected = new Measurement(Convert.ToDouble(0.000101971621196), "tonnef"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_N_to_Meganewton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "N"; - string targetUnitName = "Meganewton"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "Meganewton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_N_to_Meganewton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "N"; - string targetUnitName = "Meganewton"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "Meganewton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_N_to_GN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "N"; - string targetUnitName = "GN"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "GN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_N_to_GN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "N"; - string targetUnitName = "GN"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "GN"); - //should be 0.000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_N_to_kN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "N"; - string targetUnitName = "kN"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "kN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_N_to_kN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "N"; - string targetUnitName = "kN"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "kN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_N_to_mN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "N"; - string targetUnitName = "mN"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "mN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_N_to_mN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "N"; - string targetUnitName = "mN"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "mN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_N_to_µN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "N"; - string targetUnitName = "µN"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "µN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_N_to_µN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "N"; - string targetUnitName = "µN"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "µN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_N_to_nN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "N"; - string targetUnitName = "nN"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000.0), "nN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_N_to_nN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "N"; - string targetUnitName = "nN"; - Measurement expected = new Measurement(Convert.ToDouble(999999999), "nN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Dyne (dyn)" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_dyn_to_N_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "dyn"; - string targetUnitName = "N"; - Measurement expected = new Measurement(Convert.ToDouble(0.001), "N"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_dyn_to_N_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "dyn"; - string targetUnitName = "N"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-06), "N"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_dyn_to_lbf_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "dyn"; - string targetUnitName = "lbf"; - Measurement expected = new Measurement(Convert.ToDouble(0.0002248089431), "lbf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_dyn_to_lbf_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "dyn"; - string targetUnitName = "lbf"; - Measurement expected = new Measurement(Convert.ToDouble(2.248089429E-06), "lbf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_dyn_to_tonf_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "dyn"; - string targetUnitName = "tonf"; - Measurement expected = new Measurement(Convert.ToDouble(1.12404472E-07), "tonf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_dyn_to_tonf_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "dyn"; - string targetUnitName = "tonf"; - Measurement expected = new Measurement(Convert.ToDouble(1.124045E-09), "tonf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_dyn_to_ng_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "dyn"; - string targetUnitName = "tonnef"; - Measurement expected = new Measurement(Convert.ToDouble(1.01971621E-07), "tonnef"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_dyn_to_tonnef_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "dyn"; - string targetUnitName = "tonnef"; - Measurement expected = new Measurement(Convert.ToDouble(1.019716E-09), "tonnef"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_dyn_to_Meganewton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "dyn"; - string targetUnitName = "Meganewton"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "Meganewton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_dyn_to_Meganewton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "dyn"; - string targetUnitName = "Meganewton"; - Measurement expected = new Measurement(Convert.ToDouble(1E-11), "Meganewton"); - //should be 0.00000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_dyn_to_GN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "dyn"; - string targetUnitName = "GN"; - Measurement expected = new Measurement(Convert.ToDouble(1E-12), "GN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_dyn_to_GN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "dyn"; - string targetUnitName = "GN"; - Measurement expected = new Measurement(Convert.ToDouble(1E-14), "GN"); - //should be 0.00000000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_dyn_to_kN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "dyn"; - string targetUnitName = "kN"; - Measurement expected = new Measurement(Convert.ToDouble(1E-06), "kN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_dyn_to_kN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "dyn"; - string targetUnitName = "kN"; - Measurement expected = new Measurement(Convert.ToDouble(1E-08), "kN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_dyn_to_mN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "dyn"; - string targetUnitName = "mN"; - Measurement expected = new Measurement(Convert.ToDouble(1), "mN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_dyn_to_mN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "dyn"; - string targetUnitName = "mN"; - Measurement expected = new Measurement(Convert.ToDouble(0.00999999999), "mN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_dyn_to_µN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "dyn"; - string targetUnitName = "µN"; - Measurement expected = new Measurement(Convert.ToDouble(1000), "µN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_dyn_to_µN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "dyn"; - string targetUnitName = "µN"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999), "µN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_dyn_to_nN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "dyn"; - string targetUnitName = "nN"; - Measurement expected = new Measurement(Convert.ToDouble(1000000), "nN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_dyn_to_nN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "dyn"; - string targetUnitName = "nN"; - Measurement expected = new Measurement(Convert.ToDouble(9999.99999), "nN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Pound-force (lbf)" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbf_to_N_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lbf"; - string targetUnitName = "N"; - Measurement expected = new Measurement(Convert.ToDouble(444.82216152548), "N"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbf_to_N_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lbf"; - string targetUnitName = "N"; - Measurement expected = new Measurement(Convert.ToDouble(4.44822161080658), "N"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbf_to_dyn_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lbf"; - string targetUnitName = "dyn"; - Measurement expected = new Measurement(Convert.ToDouble(44482216.152548), "dyn"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbf_to_dyn_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lbf"; - string targetUnitName = "dyn"; - Measurement expected = new Measurement(Convert.ToDouble(444822.161080658), "dyn"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbf_to_tonf_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lbf"; - string targetUnitName = "tonf"; - Measurement expected = new Measurement(Convert.ToDouble(0.05), "tonf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbf_to_tonf_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lbf"; - string targetUnitName = "tonf"; - Measurement expected = new Measurement(Convert.ToDouble(0.0004999999995), "tonf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbf_to_tonnef_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lbf"; - string targetUnitName = "tonnef"; - Measurement expected = new Measurement(Convert.ToDouble(0.045359236999934), "tonnef"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbf_to_tonnef_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lbf"; - string targetUnitName = "tonnef"; - Measurement expected = new Measurement(Convert.ToDouble(0.000453592369546), "tonnef"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbf_to_Meganewton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lbf"; - string targetUnitName = "Meganewton"; - Measurement expected = new Measurement(Convert.ToDouble(0.000444822161525), "Meganewton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbf_to_Meganewton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lbf"; - string targetUnitName = "Meganewton"; - Measurement expected = new Measurement(Convert.ToDouble(4.448221611E-06), "Meganewton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbf_to_GN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lbf"; - string targetUnitName = "GN"; - Measurement expected = new Measurement(Convert.ToDouble(4.44822162E-07), "GN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbf_to_GN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lbf"; - string targetUnitName = "GN"; - Measurement expected = new Measurement(Convert.ToDouble(4.448222E-09), "GN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbf_to_kN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lbf"; - string targetUnitName = "kN"; - Measurement expected = new Measurement(Convert.ToDouble(0.44482216152548), "kN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbf_to_kN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lbf"; - string targetUnitName = "kN"; - Measurement expected = new Measurement(Convert.ToDouble(0.004448221610807), "kN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbf_to_mN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lbf"; - string targetUnitName = "mN"; - Measurement expected = new Measurement(Convert.ToDouble(444822.16152548), "mN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbf_to_mN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lbf"; - string targetUnitName = "mN"; - Measurement expected = new Measurement(Convert.ToDouble(4448.22161080658), "mN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbf_to_µN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lbf"; - string targetUnitName = "µN"; - Measurement expected = new Measurement(Convert.ToDouble(444822161.52548), "µN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbf_to_µN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lbf"; - string targetUnitName = "µN"; - Measurement expected = new Measurement(Convert.ToDouble(4448221.61080658), "µN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbf_to_nN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lbf"; - string targetUnitName = "nN"; - Measurement expected = new Measurement(Convert.ToDouble(444822161525.48), "nN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbf_to_nN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lbf"; - string targetUnitName = "nN"; - Measurement expected = new Measurement(Convert.ToDouble(4448221610.80658), "nN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Ton-force(short) (tonf)" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonf_to_N_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "tonf"; - string targetUnitName = "N"; - Measurement expected = new Measurement(Convert.ToDouble(889644.3230521), "N"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonf_to_N_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "tonf"; - string targetUnitName = "N"; - Measurement expected = new Measurement(Convert.ToDouble(8896.44322162456), "N"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonf_to_dyn_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "tonf"; - string targetUnitName = "dyn"; - Measurement expected = new Measurement(Convert.ToDouble(88964432305.21), "dyn"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonf_to_dyn_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "tonf"; - string targetUnitName = "dyn"; - Measurement expected = new Measurement(Convert.ToDouble(889644322.162456), "dyn"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonf_to_lbf_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "tonf"; - string targetUnitName = "lbf"; - Measurement expected = new Measurement(Convert.ToDouble(200000), "lbf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonf_to_lbf_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "tonf"; - string targetUnitName = "lbf"; - Measurement expected = new Measurement(Convert.ToDouble(1999.999998), "lbf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonf_to_tonnef_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "tonf"; - string targetUnitName = "tonnef"; - Measurement expected = new Measurement(Convert.ToDouble(90.718474), "tonnef"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonf_to_tonnef_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "tonf"; - string targetUnitName = "tonnef"; - Measurement expected = new Measurement(Convert.ToDouble(0.907184739092815), "tonnef"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonf_to_Meganewton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "tonf"; - string targetUnitName = "Meganewton"; - Measurement expected = new Measurement(Convert.ToDouble(0.8896443230521), "Meganewton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonf_to_Meganewton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "tonf"; - string targetUnitName = "Meganewton"; - Measurement expected = new Measurement(Convert.ToDouble(0.008896443221625), "Meganewton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonf_to_GN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "tonf"; - string targetUnitName = "GN"; - Measurement expected = new Measurement(Convert.ToDouble(0.000889644323052), "GN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonf_to_GN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "tonf"; - string targetUnitName = "GN"; - Measurement expected = new Measurement(Convert.ToDouble(8.896443222E-06), "GN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonf_to_kN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "tonf"; - string targetUnitName = "kN"; - Measurement expected = new Measurement(Convert.ToDouble(889.6443230521), "kN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonf_to_kN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "tonf"; - string targetUnitName = "kN"; - Measurement expected = new Measurement(Convert.ToDouble(8.89644322162456), "kN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonf_to_mN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "tonf"; - string targetUnitName = "mN"; - Measurement expected = new Measurement(Convert.ToDouble(889644323.0521), "mN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonf_to_mN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "tonf"; - string targetUnitName = "mN"; - Measurement expected = new Measurement(Convert.ToDouble(8896443.22162456), "mN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonf_to_µN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "tonf"; - string targetUnitName = "µN"; - Measurement expected = new Measurement(Convert.ToDouble(889644323052.1), "µN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonf_to_µN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "tonf"; - string targetUnitName = "µN"; - Measurement expected = new Measurement(Convert.ToDouble(8896443221.62456), "µN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonf_to_nN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "tonf"; - string targetUnitName = "nN"; - Measurement expected = new Measurement(Convert.ToDouble(889644323052100L), "nN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonf_to_nN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "tonf"; - string targetUnitName = "nN"; - Measurement expected = new Measurement(Convert.ToDouble(8896443221624.56), "nN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Tonnes force(metric) (tonnef,tf)" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonnef_to_N_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "tonnef"; - string targetUnitName = "N"; - Measurement expected = new Measurement(Convert.ToDouble(980665), "N"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonnef_to_N_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "tonnef"; - string targetUnitName = "N"; - Measurement expected = new Measurement(Convert.ToDouble(9806.64999019335), "N"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonnef_to_dyn_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "tonnef"; - string targetUnitName = "dyn"; - Measurement expected = new Measurement(Convert.ToDouble(98066500000.0), "dyn"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonnef_to_dyn_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "tonnef"; - string targetUnitName = "dyn"; - Measurement expected = new Measurement(Convert.ToDouble(980664999.019335), "dyn"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonnef_to_lbf_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "tonnef"; - string targetUnitName = "lbf"; - Measurement expected = new Measurement(Convert.ToDouble(220462.2621852), "lbf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonnef_to_lbf_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "tonnef"; - string targetUnitName = "lbf"; - Measurement expected = new Measurement(Convert.ToDouble(2204.62261964738), "lbf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonnef_to_tonf_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "tonnef"; - string targetUnitName = "tonf"; - Measurement expected = new Measurement(Convert.ToDouble(110.231131092439), "tonf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonnef_to_tonf_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "tonnef"; - string targetUnitName = "tonf"; - Measurement expected = new Measurement(Convert.ToDouble(1.10231130982208), "tonf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonnef_to_Meganewton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "tonnef"; - string targetUnitName = "Meganewton"; - Measurement expected = new Measurement(Convert.ToDouble(0.980665), "Meganewton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonnef_to_Meganewton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "tonnef"; - string targetUnitName = "Meganewton"; - Measurement expected = new Measurement(Convert.ToDouble(0.009806649990193), "Meganewton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonnef_to_GN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "tonnef"; - string targetUnitName = "GN"; - Measurement expected = new Measurement(Convert.ToDouble(0.000980665), "GN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonnef_to_GN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "tonnef"; - string targetUnitName = "GN"; - Measurement expected = new Measurement(Convert.ToDouble(9.80664999E-06), "GN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonnef_to_kN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "tonnef"; - string targetUnitName = "kN"; - Measurement expected = new Measurement(Convert.ToDouble(980.665), "kN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonnef_to_kN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "tonnef"; - string targetUnitName = "kN"; - Measurement expected = new Measurement(Convert.ToDouble(9.80664999019335), "kN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonnef_to_mN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "tonnef"; - string targetUnitName = "mN"; - Measurement expected = new Measurement(Convert.ToDouble(980665000), "mN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonnef_to_mN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "tonnef"; - string targetUnitName = "mN"; - Measurement expected = new Measurement(Convert.ToDouble(9806649.99019335), "mN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonnef_to_µN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "tonnef"; - string targetUnitName = "µN"; - Measurement expected = new Measurement(Convert.ToDouble(980665000000.0), "µN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonnef_to_µN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "tonnef"; - string targetUnitName = "µN"; - Measurement expected = new Measurement(Convert.ToDouble(9806649990.19335), "µN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonnef_to_nN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "tonnef"; - string targetUnitName = "nN"; - Measurement expected = new Measurement(Convert.ToDouble(980665000000000.0), "nN"); - //should be 98066500000000, .net conversion bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_tonnef_to_nN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "tonnef"; - string targetUnitName = "nN"; - Measurement expected = new Measurement(Convert.ToDouble(9806649990193.35), "nN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Meganewton (MN)" - - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Meganewton_to_N_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Meganewton"; - string targetUnitName = "N"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "N"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Meganewton_to_N_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Meganewton"; - string targetUnitName = "N"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "N"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Meganewton_to_dyn_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Meganewton"; - string targetUnitName = "dyn"; - Measurement expected = new Measurement(Convert.ToDouble(10000000000000.0), "dyn"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Meganewton_to_dyn_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Meganewton"; - string targetUnitName = "dyn"; - Measurement expected = new Measurement(Convert.ToDouble(99999999900.0), "dyn"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Meganewton_to_lbf_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Meganewton"; - string targetUnitName = "lbf"; - Measurement expected = new Measurement(Convert.ToDouble(22480894.3099999), "lbf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Meganewton_to_lbf_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Meganewton"; - string targetUnitName = "lbf"; - Measurement expected = new Measurement(Convert.ToDouble(224808.94287519), "lbf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Meganewton_to_tonf_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Meganewton"; - string targetUnitName = "tonf"; - Measurement expected = new Measurement(Convert.ToDouble(11240.4471549855), "tonf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Meganewton_to_tonf_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Meganewton"; - string targetUnitName = "tonf"; - Measurement expected = new Measurement(Convert.ToDouble(112.404471437451), "tonf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Meganewton_to_tonnef_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Meganewton"; - string targetUnitName = "tonnef"; - Measurement expected = new Measurement(Convert.ToDouble(10197.1621297793), "tonnef"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Meganewton_to_tonnef_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Meganewton"; - string targetUnitName = "tonnef"; - Measurement expected = new Measurement(Convert.ToDouble(101.971621195821), "tonnef"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Meganewton_to_GN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Meganewton"; - string targetUnitName = "GN"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "GN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Meganewton_to_GN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Meganewton"; - string targetUnitName = "GN"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "GN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Meganewton_to_kN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Meganewton"; - string targetUnitName = "kN"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "kN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Meganewton_to_kN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Meganewton"; - string targetUnitName = "kN"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "kN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Meganewton_to_mN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Meganewton"; - string targetUnitName = "mN"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000L), "mN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Meganewton_to_mN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Meganewton"; - string targetUnitName = "mN"; - Measurement expected = new Measurement(Convert.ToDouble(999999999.0), "mN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Meganewton_to_µN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Meganewton"; - string targetUnitName = "µN"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000.0), "µN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Meganewton_to_µN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Meganewton"; - string targetUnitName = "µN"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000.0), "µN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Meganewton_to_nN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Meganewton"; - string targetUnitName = "nN"; - Measurement expected = new Measurement(Convert.ToDouble(1E+17), "nN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Meganewton_to_nN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Meganewton"; - string targetUnitName = "nN"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000000.0), "nN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Giganewton (GN)" - - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GN_to_N_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "GN"; - string targetUnitName = "N"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000.0), "N"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GN_to_N_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "GN"; - string targetUnitName = "N"; - Measurement expected = new Measurement(Convert.ToDouble(999999999), "N"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GN_to_dyn_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "GN"; - string targetUnitName = "dyn"; - Measurement expected = new Measurement(Convert.ToDouble(1E+16), "dyn"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GN_to_dyn_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "GN"; - string targetUnitName = "dyn"; - Measurement expected = new Measurement(Convert.ToDouble(99999999900000.0), "dyn"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GN_to_lbf_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "GN"; - string targetUnitName = "lbf"; - Measurement expected = new Measurement(Convert.ToDouble(22480894309.9999), "lbf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GN_to_lbf_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "GN"; - string targetUnitName = "lbf"; - Measurement expected = new Measurement(Convert.ToDouble(224808942.87519), "lbf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GN_to_tonf_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "GN"; - string targetUnitName = "tonf"; - Measurement expected = new Measurement(Convert.ToDouble(11240447.154986), "tonf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GN_to_tonf_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "GN"; - string targetUnitName = "tonf"; - Measurement expected = new Measurement(Convert.ToDouble(112404.471437456), "tonf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GN_to_ng_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "GN"; - string targetUnitName = "tonnef"; - Measurement expected = new Measurement(Convert.ToDouble(10197162.1297793), "tonnef"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GN_to_tonnef_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "GN"; - string targetUnitName = "tonnef"; - Measurement expected = new Measurement(Convert.ToDouble(101971.621195821), "tonnef"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GN_to_Meganewton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "GN"; - string targetUnitName = "Meganewton"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "Meganewton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GN_to_Meganewton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "GN"; - string targetUnitName = "Meganewton"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "Meganewton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GN_to_kN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "GN"; - string targetUnitName = "kN"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "kN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GN_to_kN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "GN"; - string targetUnitName = "kN"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "kN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GN_to_mN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "GN"; - string targetUnitName = "mN"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000.0), "mN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GN_to_mN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "GN"; - string targetUnitName = "mN"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000.0), "mN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GN_to_µN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "GN"; - string targetUnitName = "µN"; - Measurement expected = new Measurement(Convert.ToDouble(1E+17), "µN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GN_to_µN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "GN"; - string targetUnitName = "µN"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000000.0), "µN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GN_to_nN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "GN"; - string targetUnitName = "nN"; - Measurement expected = new Measurement(Convert.ToDouble(1E+20), "nN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GN_to_nN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "GN"; - string targetUnitName = "nN"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E+17), "nN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Kilonewton (kN)" - - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kN_to_N_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kN"; - string targetUnitName = "N"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "N"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kN_to_N_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kN"; - string targetUnitName = "N"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "N"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kN_to_dyn_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kN"; - string targetUnitName = "dyn"; - Measurement expected = new Measurement(Convert.ToDouble(10000000000L), "dyn"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kN_to_dyn_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kN"; - string targetUnitName = "dyn"; - Measurement expected = new Measurement(Convert.ToDouble(99999999.9), "dyn"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kN_to_lbf_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kN"; - string targetUnitName = "lbf"; - Measurement expected = new Measurement(Convert.ToDouble(22480.8943099999), "lbf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kN_to_lbf_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kN"; - string targetUnitName = "lbf"; - Measurement expected = new Measurement(Convert.ToDouble(224.80894287519), "lbf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kN_to_tonf_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kN"; - string targetUnitName = "tonf"; - Measurement expected = new Measurement(Convert.ToDouble(11.2404471549855), "tonf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kN_to_tonf_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kN"; - string targetUnitName = "tonf"; - Measurement expected = new Measurement(Convert.ToDouble(0.112404471437451), "tonf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kN_to_tonnef_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kN"; - string targetUnitName = "tonnef"; - Measurement expected = new Measurement(Convert.ToDouble(10.1971621297793), "tonnef"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kN_to_tonnef_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kN"; - string targetUnitName = "tonnef"; - Measurement expected = new Measurement(Convert.ToDouble(0.101971621195821), "tonnef"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kN_to_Meganewton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kN"; - string targetUnitName = "Meganewton"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "Meganewton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kN_to_Meganewton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kN"; - string targetUnitName = "Meganewton"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "Meganewton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kN_to_GN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kN"; - string targetUnitName = "GN"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "GN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kN_to_GN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kN"; - string targetUnitName = "GN"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "GN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kN_to_mN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kN"; - string targetUnitName = "mN"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "mN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kN_to_mN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kN"; - string targetUnitName = "mN"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "mN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kN_to_µN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kN"; - string targetUnitName = "µN"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000.0), "µN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kN_to_µN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kN"; - string targetUnitName = "µN"; - Measurement expected = new Measurement(Convert.ToDouble(999999999), "µN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kN_to_nN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kN"; - string targetUnitName = "nN"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000.0), "nN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kN_to_nN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kN"; - string targetUnitName = "nN"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000.0), "nN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Milinewton (mN)" - - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mN_to_N_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mN"; - string targetUnitName = "N"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "N"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mN_to_N_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mN"; - string targetUnitName = "N"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "N"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mN_to_dyn_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mN"; - string targetUnitName = "dyn"; - Measurement expected = new Measurement(Convert.ToDouble(10000), "dyn"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mN_to_dyn_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mN"; - string targetUnitName = "dyn"; - Measurement expected = new Measurement(Convert.ToDouble(99.9999999), "dyn"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mN_to_lbf_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mN"; - string targetUnitName = "lbf"; - Measurement expected = new Measurement(Convert.ToDouble(0.02248089431), "lbf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mN_to_lbf_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mN"; - string targetUnitName = "lbf"; - Measurement expected = new Measurement(Convert.ToDouble(0.000224808942875), "lbf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mN_to_tonf_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mN"; - string targetUnitName = "tonf"; - Measurement expected = new Measurement(Convert.ToDouble(1.1240447155E-05), "tonf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mN_to_tonf_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mN"; - string targetUnitName = "tonf"; - Measurement expected = new Measurement(Convert.ToDouble(1.12404471E-07), "tonf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mN_to_tonnef_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mN"; - string targetUnitName = "tonnef"; - Measurement expected = new Measurement(Convert.ToDouble(1.019716213E-05), "tonnef"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mN_to_tonnef_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mN"; - string targetUnitName = "tonnef"; - Measurement expected = new Measurement(Convert.ToDouble(1.01971621E-07), "tonnef"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mN_to_Meganewton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mN"; - string targetUnitName = "Meganewton"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "Meganewton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mN_to_Meganewton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mN"; - string targetUnitName = "Meganewton"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "Meganewton"); - //should be 0.000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mN_to_GN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mN"; - string targetUnitName = "GN"; - Measurement expected = new Measurement(Convert.ToDouble(1E-10), "GN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mN_to_GN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mN"; - string targetUnitName = "GN"; - Measurement expected = new Measurement(Convert.ToDouble(1E-12), "GN"); - //should be 0.000000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mN_to_kN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mN"; - string targetUnitName = "kN"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "kN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mN_to_kN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mN"; - string targetUnitName = "kN"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "kN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mN_to_µN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mN"; - string targetUnitName = "µN"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "µN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mN_to_µN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mN"; - string targetUnitName = "µN"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "µN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mN_to_nN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mN"; - string targetUnitName = "nN"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "nN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mN_to_nN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mN"; - string targetUnitName = "nN"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "nN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Micronewton (µN)" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µN_to_N_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µN"; - string targetUnitName = "N"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "N"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µN_to_N_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µN"; - string targetUnitName = "N"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "N"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µN_to_dyn_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µN"; - string targetUnitName = "dyn"; - Measurement expected = new Measurement(Convert.ToDouble(10), "dyn"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µN_to_dyn_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µN"; - string targetUnitName = "dyn"; - Measurement expected = new Measurement(Convert.ToDouble(0.0999999999), "dyn"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µN_to_lbf_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µN"; - string targetUnitName = "lbf"; - Measurement expected = new Measurement(Convert.ToDouble(2.248089431E-05), "lbf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µN_to_lbf_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µN"; - string targetUnitName = "lbf"; - Measurement expected = new Measurement(Convert.ToDouble(2.24808943E-07), "lbf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µN_to_tonf_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µN"; - string targetUnitName = "tonf"; - Measurement expected = new Measurement(Convert.ToDouble(1.1240447E-08), "tonf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µN_to_tonf_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µN"; - string targetUnitName = "tonf"; - Measurement expected = new Measurement(Convert.ToDouble(1.12404E-10), "tonf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µN_to_tonnef_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µN"; - string targetUnitName = "tonnef"; - Measurement expected = new Measurement(Convert.ToDouble(1.0197162E-08), "tonnef"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µN_to_tonnef_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µN"; - string targetUnitName = "tonnef"; - Measurement expected = new Measurement(Convert.ToDouble(1.01972E-10), "tonnef"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µN_to_Meganewton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µN"; - string targetUnitName = "Meganewton"; - Measurement expected = new Measurement(Convert.ToDouble(1E-10), "Meganewton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µN_to_Meganewton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µN"; - string targetUnitName = "Meganewton"; - Measurement expected = new Measurement(Convert.ToDouble(1E-12), "Meganewton"); - //should be 0.000000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µN_to_GN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µN"; - string targetUnitName = "GN"; - Measurement expected = new Measurement(Convert.ToDouble(1E-13), "GN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µN_to_GN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µN"; - string targetUnitName = "GN"; - Measurement expected = new Measurement(Convert.ToDouble(1E-15), "GN"); - //should be 0.000000000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µN_to_kN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µN"; - string targetUnitName = "kN"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "kN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µN_to_kN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µN"; - string targetUnitName = "kN"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "kN"); - //should be 0.000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µN_to_mN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µN"; - string targetUnitName = "mN"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "mN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µN_to_mN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µN"; - string targetUnitName = "mN"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "mN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µN_to_nN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µN"; - string targetUnitName = "nN"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "nN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µN_to_nN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µN"; - string targetUnitName = "nN"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "nN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Nananewton (nN)" - - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nN_to_N_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nN"; - string targetUnitName = "N"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "N"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nN_to_N_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nN"; - string targetUnitName = "N"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "N"); - //should be 0.000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nN_to_dyn_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nN"; - string targetUnitName = "dyn"; - Measurement expected = new Measurement(Convert.ToDouble(0.01), "dyn"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nN_to_dyn_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nN"; - string targetUnitName = "dyn"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-05), "dyn"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nN_to_lbf_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nN"; - string targetUnitName = "lbf"; - Measurement expected = new Measurement(Convert.ToDouble(2.2480894E-08), "lbf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nN_to_lbf_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nN"; - string targetUnitName = "lbf"; - Measurement expected = new Measurement(Convert.ToDouble(2.24809E-10), "lbf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nN_to_tonf_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nN"; - string targetUnitName = "tonf"; - Measurement expected = new Measurement(Convert.ToDouble(1.124E-11), "tonf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nN_to_tonf_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nN"; - string targetUnitName = "tonf"; - Measurement expected = new Measurement(Convert.ToDouble(1.12E-13), "tonf"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nN_to_tonnef_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nN"; - string targetUnitName = "tonnef"; - Measurement expected = new Measurement(Convert.ToDouble(1.0197E-11), "tonnef"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nN_to_tonnef_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nN"; - string targetUnitName = "tonnef"; - Measurement expected = new Measurement(Convert.ToDouble(1.02E-13), "tonnef"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nN_to_Meganewton_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nN"; - string targetUnitName = "Meganewton"; - Measurement expected = new Measurement(Convert.ToDouble(1E-13), "Meganewton"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nN_to_Meganewton_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nN"; - string targetUnitName = "Meganewton"; - Measurement expected = new Measurement(Convert.ToDouble(1E-15), "Meganewton"); - //should be 0.000000000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nN_to_GN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nN"; - string targetUnitName = "GN"; - Measurement expected = new Measurement(Convert.ToDouble(0), "GN"); - //should be .0000000000000001, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nN_to_GN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nN"; - string targetUnitName = "GN"; - Measurement expected = new Measurement(Convert.ToDouble(0), "GN"); - //should be 9.99999999E-19, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nN_to_kN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nN"; - string targetUnitName = "kN"; - Measurement expected = new Measurement(Convert.ToDouble(1E-10), "kN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nN_to_kN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nN"; - string targetUnitName = "kN"; - Measurement expected = new Measurement(Convert.ToDouble(1E-12), "kN"); - //should be 0.000000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nN_to_mN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nN"; - string targetUnitName = "mN"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "mN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nN_to_mN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nN"; - string targetUnitName = "mN"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "mN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nN_to_µN_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nN"; - string targetUnitName = "µN"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "µN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nN_to_µN_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nN"; - string targetUnitName = "µN"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "µN"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - #endregion - - #region "Momentum Tests" - #region "Source as kg m/s" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kgMetersPerSec_to_lbFtPerHr_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kg m/s"; - string targetUnitName = "lb ft/hr"; - Measurement expected = new Measurement(Convert.ToDouble(2603884.98643556), "lb ft/hr"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kgMetersPerSec_to_lbFtPerHr_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kg m/s"; - string targetUnitName = "lb ft/hr"; - Measurement expected = new Measurement(Convert.ToDouble(26038.8498383168), "lb ft/hr"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kgMeterPerSec_to_GramCentimeterPerSec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kg m/s"; - string targetUnitName = "g cm/s"; - Measurement expected = new Measurement(Convert.ToDouble(10000000), "g cm/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kgMeterPerSec_to_GramCentimeterPerSec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kg m/s"; - string targetUnitName = "g cm/s"; - Measurement expected = new Measurement(Convert.ToDouble(99999.9999), "g cm/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kgMeterPerSec_to_lbFtPerMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kg m/s"; - string targetUnitName = "lb ft/min"; - Measurement expected = new Measurement(Convert.ToDouble(43398.0831072594), "lb ft/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kgMeterPerSec_to_lbFtPerMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kg m/s"; - string targetUnitName = "lb ft/min"; - Measurement expected = new Measurement(Convert.ToDouble(433.980830638613), "lb ft/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kgMeterPerSec_to_lbFtPerSec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kg m/s"; - string targetUnitName = "lb ft/s"; - Measurement expected = new Measurement(Convert.ToDouble(723.301385120989), "lb ft/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kgMeterPerSec_to_lbFtPerSec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kg m/s"; - string targetUnitName = "lb ft/s"; - Measurement expected = new Measurement(Convert.ToDouble(7.23301384397688), "lb ft/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as lb ft/hr" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerHr_to_kgMetersPerSec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb ft/hr"; - string targetUnitName = "kg m/s"; - Measurement expected = new Measurement(Convert.ToDouble(0.003840415399333), "kg m/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerHr_to_kgMetersPerSec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb ft/hr"; - string targetUnitName = "kg m/s"; - Measurement expected = new Measurement(Convert.ToDouble(3.8404153955E-05), "kg m/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerHr_to_GramCentimeterPerSec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb ft/hr"; - string targetUnitName = "g cm/s"; - Measurement expected = new Measurement(Convert.ToDouble(384.041539933333), "g cm/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerHr_to_GramCentimeterPerSec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb ft/hr"; - string targetUnitName = "g cm/s"; - Measurement expected = new Measurement(Convert.ToDouble(3.84041539549292), "g cm/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerHr_to_lbFtPerMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb ft/hr"; - string targetUnitName = "lb ft/min"; - Measurement expected = new Measurement(Convert.ToDouble(1.66666666666667), "lb ft/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerHr_to_lbFtPerMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb ft/hr"; - string targetUnitName = "lb ft/min"; - Measurement expected = new Measurement(Convert.ToDouble(0.01666666665), "lb ft/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerHr_to_lbFtPerSec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb ft/hr"; - string targetUnitName = "lb ft/s"; - Measurement expected = new Measurement(Convert.ToDouble(0.027777777777778), "lb ft/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerHr_to_lbFtPerSec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb ft/hr"; - string targetUnitName = "lb ft/s"; - Measurement expected = new Measurement(Convert.ToDouble(0.0002777777775), "lb ft/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as g cm/s" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_kgMetersPerSec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "g cm/s"; - string targetUnitName = "kg m/s"; - Measurement expected = new Measurement(Convert.ToDouble(0.001), "kg m/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_kgMetersPerSec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "g cm/s"; - string targetUnitName = "kg m/s"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-06), "kg m/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerHr_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "g cm/s"; - string targetUnitName = "lb ft/hr"; - Measurement expected = new Measurement(Convert.ToDouble(26.0388498643556), "lb ft/hr"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerHr_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "g cm/s"; - string targetUnitName = "lb ft/hr"; - Measurement expected = new Measurement(Convert.ToDouble(0.260388498383168), "lb ft/hr"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "g cm/s"; - string targetUnitName = "lb ft/min"; - Measurement expected = new Measurement(Convert.ToDouble(0.4339808310726), "lb ft/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "g cm/s"; - string targetUnitName = "lb ft/min"; - Measurement expected = new Measurement(Convert.ToDouble(0.004339808306386), "lb ft/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerSec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "g cm/s"; - string targetUnitName = "lb ft/s"; - Measurement expected = new Measurement(Convert.ToDouble(0.0072330138512), "lb ft/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerSec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "g cm/s"; - string targetUnitName = "lb ft/s"; - Measurement expected = new Measurement(Convert.ToDouble(7.233013844E-05), "lb ft/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as lb ft/min" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerMin_to_kgMetersPerSec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb ft/min"; - string targetUnitName = "kg m/s"; - Measurement expected = new Measurement(Convert.ToDouble(0.23042492396), "kg m/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerMin_to_kgMetersPerSec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb ft/min"; - string targetUnitName = "kg m/s"; - Measurement expected = new Measurement(Convert.ToDouble(0.002304249237296), "kg m/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerMin_to_lbFtPerHr_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb ft/min"; - string targetUnitName = "lb ft/hr"; - Measurement expected = new Measurement(Convert.ToDouble(6000), "lb ft/hr"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerMin_to_lbFtPerHr_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb ft/min"; - string targetUnitName = "lb ft/hr"; - Measurement expected = new Measurement(Convert.ToDouble(59.99999994), "lb ft/hr"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerMin_to_GramCentimeterPerSec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb ft/min"; - string targetUnitName = "g cm/s"; - Measurement expected = new Measurement(Convert.ToDouble(23042.4923959997), "g cm/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerMin_to_GramCentimeterPerSec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb ft/min"; - string targetUnitName = "g cm/s"; - Measurement expected = new Measurement(Convert.ToDouble(230.424923729572), "g cm/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerMin_to_lbFtPerSec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb ft/min"; - string targetUnitName = "lb ft/s"; - Measurement expected = new Measurement(Convert.ToDouble(1.66666666666667), "lb ft/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerMin_to_lbFtPerSec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb ft/min"; - string targetUnitName = "lb ft/s"; - Measurement expected = new Measurement(Convert.ToDouble(0.01666666665), "lb ft/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as lb ft/sec" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerSec_to_kgMetersPerSec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb ft/s"; - string targetUnitName = "kg m/s"; - Measurement expected = new Measurement(Convert.ToDouble(13.8254954376), "kg m/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerSec_to_kgMetersPerSec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb ft/s"; - string targetUnitName = "kg m/s"; - Measurement expected = new Measurement(Convert.ToDouble(0.138254954237745), "kg m/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerSec_to_lbFtPerHr_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb ft/s"; - string targetUnitName = "lb ft/hr"; - Measurement expected = new Measurement(Convert.ToDouble(360000), "lb ft/hr"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerSec_to_lbFtPerHr_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb ft/s"; - string targetUnitName = "lb ft/hr"; - Measurement expected = new Measurement(Convert.ToDouble(3599.9999964), "lb ft/hr"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerSec_to_GramCentimeterPerSec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb ft/s"; - string targetUnitName = "g cm/s"; - Measurement expected = new Measurement(Convert.ToDouble(1382549.54376189), "g cm/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerSec_to_GramCentimeterPerSec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb ft/s"; - string targetUnitName = "g cm/s"; - Measurement expected = new Measurement(Convert.ToDouble(13825.4954237934), "g cm/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerSec_to_lbFtPerMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "lb ft/s"; - string targetUnitName = "lb ft/min"; - Measurement expected = new Measurement(Convert.ToDouble(6000), "lb ft/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_lbFtPerSec_to_lbFtPerMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "lb ft/s"; - string targetUnitName = "lb ft/min"; - Measurement expected = new Measurement(Convert.ToDouble(59.99999994), "lb ft/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - #endregion - - #region "Speed Tests" - #region "Source as Meters/Second" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MetersPerSec_to_KmPerHr_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m/s"; - string targetUnitName = "km/h"; - Measurement expected = new Measurement(Convert.ToDouble(360), "km/h"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MetersPerSec_to_KmPerHr_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m/s"; - string targetUnitName = "km/h"; - Measurement expected = new Measurement(Convert.ToDouble(3.5999999964), "km/h"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MetersPerSec_to_MilesPerHr_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m/s"; - string targetUnitName = "mph"; - Measurement expected = new Measurement(Convert.ToDouble(223.69362920544), "mph"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MetersPerSec_to_MilesPerHr_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m/s"; - string targetUnitName = "mph"; - Measurement expected = new Measurement(Convert.ToDouble(2.23693628981747), "mph"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MetersPerSec_to_MetersPerMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m/s"; - string targetUnitName = "m/min"; - Measurement expected = new Measurement(Convert.ToDouble(6000), "m/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MetersPerSec_to_MetersPerMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m/s"; - string targetUnitName = "m/min"; - Measurement expected = new Measurement(Convert.ToDouble(59.99999994), "m/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MetersPerSec_to_FtPerSec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m/s"; - string targetUnitName = "ft/s"; - Measurement expected = new Measurement(Convert.ToDouble(328.083989501312), "ft/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MetersPerSec_to_FtPerSec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m/s"; - string targetUnitName = "ft/s"; - Measurement expected = new Measurement(Convert.ToDouble(3.28083989173228), "ft/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Kilometers/Hour" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_KmPerHr_to_MetersPerSec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km/h"; - string targetUnitName = "m/s"; - Measurement expected = new Measurement(Convert.ToDouble(27.7777777777778), "m/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_KmPerHr_to_MetersPerSec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km/h"; - string targetUnitName = "m/s"; - Measurement expected = new Measurement(Convert.ToDouble(0.2777777775), "m/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_KmPerHr_to_MilesPerHr_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km/h"; - string targetUnitName = "mph"; - Measurement expected = new Measurement(Convert.ToDouble(62.1371192237334), "mph"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_KmPerHr_to_MilesPerHr_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km/h"; - string targetUnitName = "mph"; - Measurement expected = new Measurement(Convert.ToDouble(0.621371191615963), "mph"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_KmPerHr_to_MetersPerMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km/h"; - string targetUnitName = "m/min"; - Measurement expected = new Measurement(Convert.ToDouble(1666.66666666667), "m/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_KmPerHr_to_MetersPerMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km/h"; - string targetUnitName = "m/min"; - Measurement expected = new Measurement(Convert.ToDouble(16.66666665), "m/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_KmPerHr_to_FtPerSec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km/h"; - string targetUnitName = "ft/s"; - Measurement expected = new Measurement(Convert.ToDouble(91.1344415281423), "ft/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_KmPerHr_to_FtPerSec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km/h"; - string targetUnitName = "ft/s"; - Measurement expected = new Measurement(Convert.ToDouble(0.911344414370079), "ft/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Miles/Hour" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MilesPerHr_to_MetersPerSec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mph"; - string targetUnitName = "m/s"; - Measurement expected = new Measurement(Convert.ToDouble(44.704), "m/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MilesPerHr_to_MetersPerSec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mph"; - string targetUnitName = "m/s"; - Measurement expected = new Measurement(Convert.ToDouble(0.44703999955296), "m/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MilesPerHr_to_KmPerHr_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mph"; - string targetUnitName = "km/h"; - Measurement expected = new Measurement(Convert.ToDouble(160.9344), "km/h"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MilesPerHr_to_KmPerHr_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mph"; - string targetUnitName = "km/h"; - Measurement expected = new Measurement(Convert.ToDouble(1.60934399839066), "km/h"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MilesPerHr_to_MetersPerMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mph"; - string targetUnitName = "m/min"; - Measurement expected = new Measurement(Convert.ToDouble(2682.24), "m/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MilesPerHr_to_MetersPerMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mph"; - string targetUnitName = "m/min"; - Measurement expected = new Measurement(Convert.ToDouble(26.8223999731776), "m/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MilesPerHr_to_FtPerSec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mph"; - string targetUnitName = "ft/s"; - Measurement expected = new Measurement(Convert.ToDouble(146.666666666667), "ft/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MilesPerHr_to_FtPerSec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mph"; - string targetUnitName = "ft/s"; - Measurement expected = new Measurement(Convert.ToDouble(1.4666666652), "ft/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Meters/Minute" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MetersPerMin_to_MetersPerSec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m/min"; - string targetUnitName = "m/s"; - Measurement expected = new Measurement(Convert.ToDouble(1.66666666666667), "m/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MetersPerMin_to_MetersPerSec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m/min"; - string targetUnitName = "m/s"; - Measurement expected = new Measurement(Convert.ToDouble(0.01666666665), "m/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MetersPerMin_to_KmPerHr_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m/min"; - string targetUnitName = "km/h"; - Measurement expected = new Measurement(Convert.ToDouble(6), "km/h"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MetersPerMin_to_KmPerHr_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m/min"; - string targetUnitName = "km/h"; - Measurement expected = new Measurement(Convert.ToDouble(0.05999999994), "km/h"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MetersPerMin_to_MilesPerHr_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m/min"; - string targetUnitName = "mph"; - Measurement expected = new Measurement(Convert.ToDouble(3.728227153424), "mph"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MetersPerMin_to_MilesPerHr_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m/min"; - string targetUnitName = "mph"; - Measurement expected = new Measurement(Convert.ToDouble(0.037282271496958), "mph"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MetersPerMin_to_FtPerSec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m/min"; - string targetUnitName = "ft/s"; - Measurement expected = new Measurement(Convert.ToDouble(5.46806649168854), "ft/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_MetersPerMin_to_FtPerSec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m/min"; - string targetUnitName = "ft/s"; - Measurement expected = new Measurement(Convert.ToDouble(0.054680664862205), "ft/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Feet/Second" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtPerSec_to_MetersPerSec_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft/s"; - string targetUnitName = "m/s"; - Measurement expected = new Measurement(Convert.ToDouble(30.48), "m/s"); - //should be 30.48, .net conversion bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtPerSec_to_MetersPerSec_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft/s"; - string targetUnitName = "m/s"; - Measurement expected = new Measurement(Convert.ToDouble(0.3047999996952), "m/s"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtPerSec_to_KmPerHr_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft/s"; - string targetUnitName = "km/h"; - Measurement expected = new Measurement(Convert.ToDouble(109.728), "km/h"); - //should be 109.728, .net conversion bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtPerSec_to_KmPerHr_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft/s"; - string targetUnitName = "km/h"; - Measurement expected = new Measurement(Convert.ToDouble(1.09727999890272), "km/h"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtPerSec_to_MilesPerHr_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft/s"; - string targetUnitName = "mph"; - Measurement expected = new Measurement(Convert.ToDouble(68.1818181818182), "mph"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtPerSec_to_MilesPerHr_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft/s"; - string targetUnitName = "mph"; - Measurement expected = new Measurement(Convert.ToDouble(0.681818181136364), "mph"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtPerSec_to_MetersPerMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft/s"; - string targetUnitName = "m/min"; - Measurement expected = new Measurement(Convert.ToDouble(1828.8), "m/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtPerSec_to_MetersPerMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft/s"; - string targetUnitName = "m/min"; - Measurement expected = new Measurement(Convert.ToDouble(18.287999981712), "m/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - #endregion - - #region "Length Tests" - #region "Source as Metres" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_yd_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(109.361329833771), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_yd_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(1.0936132972441), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_ft_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(328.083989501312), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - Assert.AreEqual(Result.NoError, actual.ConversionResult); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_ft_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(3.28083989173228), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_chain_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(4.97096953789867), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_chain_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(0.049709695329277), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_mile_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(0.062137119223733), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_mile_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(0.000621371191616), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_km_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_km_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_Megametres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_Megametres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_Gm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_Gm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_furlong_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(0.497096953789867), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_furlong_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(0.004970969532928), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_thou_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(3937007.87401575), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_thou_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(39370.0787007874), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_µm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_µm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_in_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(3937.00787401575), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_in_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(39.3700787007874), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_cm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(10000), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_cm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(99.9999999), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_millimetres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m_to_millimetres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Yards" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_m_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(91.44), "m"); - //expected altered to meet .net conversion bug (91.44 m) - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_m_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(0.9143999990856), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_ft_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(300), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_ft_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(2.999999997), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_chain_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(4.54545454545455), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_chain_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(0.045454545409091), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_mile_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(0.056818181818182), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_mile_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(0.000568181817614), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_km_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(0.09144), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_km_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(0.000914399999086), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_Megametres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(9.144E-05), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_Megametres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(9.14399999E-07), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_Gm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(9.144E-08), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_Gm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(9.144E-10), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_furlong_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(0.454545454545454), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_furlong_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(0.004545454540909), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_thou_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(3600000), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_thou_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(35999.999964), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_µm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(91440000), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_µm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(914399.9990856), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_in_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(3600), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_in_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(35.999999964), "in"); - //expected altered to meet .net conversion bug (35.999999964) - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_cm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(9144), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_cm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(91.43999990856), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_millimetres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(91440), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd_to_millimetres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(914.3999990856), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Feet" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_m_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(30.48), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_m_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(0.3047999996952), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_m_negative_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(-0.999999999); - string currentUnitName = "ft"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(-0.3047999996952), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_yd_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(33.3333333333333), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_yd_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(0.333333333), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_chain_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(1.51515151515151), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_chain_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(0.015151515136364), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_mile_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(0.018939393939394), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_mile_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(0.000189393939205), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_km_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(0.03048), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_km_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(0.000304799999695), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_Megametres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(3.048E-05), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_Megametres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(3.048E-07), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_Gm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(3.048E-08), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_Gm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(3.048E-10), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_furlong_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(0.151515151515152), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_furlong_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(0.001515151513636), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_thou_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(1200000), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_thou_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(11999.999988), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_µm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(30480000), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_µm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(304799.9996952), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_in_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(1200), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_in_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(11.999999988), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_cm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(3048), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_cm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(30.47999996952), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_millimetres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(30480), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft_to_millimetres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(304.7999996952), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Chain" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_m_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "chain"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(2011.68), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_m_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "chain"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(20.1167999798832), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_yd_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "chain"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(2200), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_yd_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "chain"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(21.999999978), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_ft_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "chain"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(6600), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_ft_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "chain"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(65.999999934), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_mile_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "chain"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(1.25), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_mile_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "chain"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(0.0124999999875), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_km_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "chain"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(2.01168), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_km_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "chain"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(0.020116799979883), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_Megametres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "chain"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(0.00201168), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_Megametres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "chain"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(2.011679998E-05), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_Gm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "chain"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(2.01168E-06), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_Gm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "chain"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(2.01168E-08), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_furlong_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "chain"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(10), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_furlong_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "chain"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(0.0999999999), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_thou_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "chain"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(79200000), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_thou_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "chain"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(791999.999208), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_µm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "chain"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(2011680000), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_µm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "chain"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(20116799.979883), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_in_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "chain"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(79200), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_in_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "chain"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(791.999999208), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_cm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "chain"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(201168), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_cm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "chain"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(2011.67999798832), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_millimetres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "chain"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(2011680), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_chain_to_millimetres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "chain"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(20116.7999798832), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Miles" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_m_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(160934.4), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_m_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(1609.34399839066), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_yd_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(176000), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_yd_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(1759.99999824), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_ft_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(528000), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_ft_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(5279.99999472), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_chain_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(8000), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_chain_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(79.99999992), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_km_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(160.9344), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_km_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(1.60934399839066), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_Megametres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(0.1609344), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_Megametres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(0.001609343998391), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_Gm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001609344), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_Gm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(1.609343998E-06), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_furlong_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(800), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_furlong_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(7.999999992), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_thou_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(6336000000L), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_thou_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(63359999.93664), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_µm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(160934400000L), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_µm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(1609343998.391), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_in_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(6336000), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_in_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(63359.99993664), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_cm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(16093440), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_cm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(160934.399839066), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_millimetres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(160934400), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_miles_to_millimetres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(1609343.998391), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Kilometres" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_m_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_m_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_yd_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(109361.329833771), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_yd_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(1093.61329724409), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_ft_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(328083.989501312), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_ft_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(3280.83989173228), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_chain_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(4970.96953789867), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_chain_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(49.709695329277), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_miles_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(62.1371192237334), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_miles_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(0.621371191615963), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_Megametres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_Megametres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_Gm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_Gm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_furlong_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(497.096953789867), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_furlong_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(4.9709695329277), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_thou_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(3937007874.01575), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_thou_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(39370078.7007874), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_µm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000L), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_µm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(999999999), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_in_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(3937007.87401575), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_in_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(39370.0787007874), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_cm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(10000000), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_cm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(99999.9999), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_millimetres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km_to_millimetres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Megametres" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_m_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mm"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_m_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mm"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_yd_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mm"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(109361329.833771), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_yd_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mm"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(1093613.29724409), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_ft_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mm"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(328083989.501312), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_ft_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mm"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(3280839.89173228), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_chain_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mm"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(4970969.53789867), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_chain_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mm"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(49709.695329277), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_miles_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mm"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(62137.1192237334), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_miles_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mm"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(621.371191615963), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_km_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mm"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_km_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mm"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_Gm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mm"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_Gm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mm"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_furlong_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mm"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(497096.953789867), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_furlong_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mm"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(4970.9695329277), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_thou_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mm"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(3937007874015.75), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_thou_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mm"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(39370078700.7874), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_µm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mm"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000L), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_µm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mm"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000L), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_in_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mm"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(3937007874.01575), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_in_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mm"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(39370078.7007874), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_cm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mm"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(10000000000L), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_cm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mm"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(99999999.9), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_millimetres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Mm"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000L), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megametres_to_millimetres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Mm"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(999999999), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Gigametres" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_m_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gm"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000L), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_m_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gm"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(999999999), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_yd_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gm"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(109361329833.771), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_yd_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gm"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(1093613297.24409), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_ft_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gm"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(328083989501.312), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_ft_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gm"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(3280839891.73228), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_chain_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gm"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(4970969537.89867), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_chain_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gm"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(49709695.329277), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_miles_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gm"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(62137119.2237334), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_miles_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gm"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(621371.191615963), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_km_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gm"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gms_to_km_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gm"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_Megametres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gm"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_Megametres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gm"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_furlong_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gm"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(497096953.789867), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_furlong_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gm"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(4970969.5329277), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_thou_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gm"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(3937007874015748L), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_thou_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gm"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(39370078700787.4), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_µm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gm"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000000L), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_µm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gm"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000000L), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_in_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gm"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(3937007874015.75), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_in_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gm"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(39370078700.7874), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_cm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gm"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(10000000000000L), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_cm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gm"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(99999999900L), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_millimetres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gm"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000L), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gm_to_millimetres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gm"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000L), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Furlongs" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_m_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "furlong"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(20116.8), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_m_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "furlong"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(201.167999798832), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_yd_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "furlong"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(22000), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_yd_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "furlong"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(219.99999978), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_ft_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "furlong"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(66000), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_ft_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "furlong"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(659.99999934), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_mile_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "furlong"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(12.5), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_mile_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "furlong"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(0.124999999875), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_km_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "furlong"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(20.1168), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_km_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "furlong"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(0.201167999798832), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_Megametres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "furlong"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(0.0201168), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_Megametres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "furlong"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(0.000201167999799), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_Gm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "furlong"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(2.01168E-05), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_Gm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "furlong"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(2.01168E-07), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_chain_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "furlong"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(1000), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_chain_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "furlong"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_thou_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "furlong"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(792000000), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_thou_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "furlong"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(7919999.99208), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_µm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "furlong"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(20116800000L), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_µm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "furlong"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(201167999.799), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_in_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "furlong"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(792000), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_in_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "furlong"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(7919.99999208), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_cm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "furlong"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(2011680), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_cm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "furlong"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(20116.7999798832), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_millimetres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "furlong"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(20116800), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_furlong_to_millimetres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "furlong"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(201167.999799), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Thou" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_m_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "thou"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(0.00254), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_m_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "thou"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(2.5399999975E-05), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_yd_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "thou"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(0.002777777777778), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_yd_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "thou"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(2.777777775E-05), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_ft_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "thou"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(0.008333333333333), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_ft_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "thou"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(8.333333325E-05), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_mile_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "thou"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(1.578282828E-06), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_mile_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "thou"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(1.5782828E-08), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_km_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "thou"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(2.54E-06), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_km_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "thou"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(2.54E-08), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_Megametres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "thou"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(2.54E-09), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_Megametres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "thou"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(2.54E-11), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_Gm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "thou"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(2.54E-12), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_Gm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "thou"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(2.5E-14), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_chain_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "thou"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(0.000126262626263), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_chain_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "thou"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(1.262626261E-06), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_in_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "thou"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_in_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "thou"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_µm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "thou"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(2540), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_µm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "thou"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(25.3999999746), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_furlong_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "thou"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(1.2626262626E-05), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_furlong_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "thou"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(1.26262626E-07), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_cm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "thou"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(0.254), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_cm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "thou"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(0.00253999999746), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_millimetres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "thou"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(2.54), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_thou_to_millimetres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "thou"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(0.0253999999746), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Microns" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_m_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µm"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_m_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µm"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_yd_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µm"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(0.000109361329834), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_yd_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µm"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(1.093613297E-06), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_ft_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µm"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(0.000328083989501), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - Assert.AreEqual(Result.NoError, actual.ConversionResult); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_ft_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µm"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(3.280839892E-06), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_chain_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µm"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(4.970969538E-06), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_chain_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µm"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(4.9709695E-08), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_mile_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µm"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(6.2137119E-08), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_mile_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µm"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(6.21371E-10), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_km_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µm"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_km_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µm"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_Megametres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µm"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(1E-10), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_Megametres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µm"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(1E-12), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_Gm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µm"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(1E-13), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_Gm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µm"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(1E-15), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_furlong_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µm"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(4.97096954E-07), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_furlong_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µm"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(4.97097E-09), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_thou_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µm"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(3.93700787401575), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_thou_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µm"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(0.039370078700787), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_in_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µm"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(0.003937007874016), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_in_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µm"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(3.9370078701E-05), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_cm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µm"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(0.01), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_cm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µm"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-05), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_millimetres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µm"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µm_to_millimetres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µm"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Inches" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_m_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(2.54), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_m_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(0.0253999999746), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_yd_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(2.77777777777778), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_yd_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(0.02777777775), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_ft_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(8.33333333333333), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_ft_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(0.08333333325), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_mile_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(0.001578282828283), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_mile_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(1.5782828267E-05), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_km_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(0.00254), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_km_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(2.5399999975E-05), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_Megametres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(2.54E-06), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_Megametres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(2.54E-08), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_Gm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(2.54E-09), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_Gm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(2.54E-11), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_chain_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(0.126262626262626), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_chain_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(0.001262626261364), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_thou_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_thou_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_µm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(2540000), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_µm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(25399.9999746), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_furlong_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(0.012626262626263), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_furlong_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(0.000126262626136), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_cm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(254), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_cm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(2.53999999746), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_millimetres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(2540), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in_to_millimetres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(25.3999999746), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Centimetres" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_m_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(1), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_m_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(0.00999999999), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_yd_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(1.09361329833771), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_yd_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(0.010936132972441), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_ft_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(3.280839895013123), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - Assert.AreEqual(Result.NoError, actual.ConversionResult); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_ft_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(0.032808398917323), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_chain_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(0.049709695378987), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_chain_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(0.000497096953293), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_mile_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(0.000621371192237), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_mile_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(6.213711916E-06), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_km_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(0.001), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_km_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-06), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_Megametres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(1E-06), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_Megametres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(1E-08), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_Gm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_Gm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(1E-11), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_furlong_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(0.004970969537899), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_furlong_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(4.9709695329E-05), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_thou_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(39370.0787401575), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_thou_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(393.700787007874), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_µm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(1000000), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_µm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(9999.99999), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_in_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(39.3700787401575), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_in_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(0.393700787007874), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_millimetres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(1000), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm_to_millimetres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm"; - string targetUnitName = "mm"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999), "mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Millimetres" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_m_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mm"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_m_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mm"; - string targetUnitName = "m"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "m"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_yd_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mm"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(0.109361329833771), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_yd_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mm"; - string targetUnitName = "yd"; - Measurement expected = new Measurement(Convert.ToDouble(0.001093613297244), "yd"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_ft_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mm"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(0.328083989501312), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - Assert.AreEqual(Result.NoError, actual.ConversionResult); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_ft_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mm"; - string targetUnitName = "ft"; - Measurement expected = new Measurement(Convert.ToDouble(0.003280839891732), "ft"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_chain_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mm"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(0.004970969537899), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_chain_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mm"; - string targetUnitName = "chain"; - Measurement expected = new Measurement(Convert.ToDouble(4.9709695329E-05), "chain"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_mile_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mm"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(6.2137119224E-05), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_mile_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mm"; - string targetUnitName = "mi"; - Measurement expected = new Measurement(Convert.ToDouble(6.21371192E-07), "mi"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_km_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mm"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_km_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mm"; - string targetUnitName = "km"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "km"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_Megametres_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mm"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_Megametres_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mm"; - string targetUnitName = "Mm"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "Mm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_Gm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mm"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(1E-10), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_Gm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mm"; - string targetUnitName = "Gm"; - Measurement expected = new Measurement(Convert.ToDouble(1E-12), "Gm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_furlong_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mm"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(0.00049709695379), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_furlong_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mm"; - string targetUnitName = "furlong"; - Measurement expected = new Measurement(Convert.ToDouble(4.970969533E-06), "furlong"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_thou_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mm"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(3937.00787401575), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_thou_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mm"; - string targetUnitName = "thou"; - Measurement expected = new Measurement(Convert.ToDouble(39.3700787007874), "thou"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_µm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mm"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_µm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mm"; - string targetUnitName = "µm"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "µm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_in_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mm"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(3.93700787401575), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_in_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mm"; - string targetUnitName = "in"; - Measurement expected = new Measurement(Convert.ToDouble(0.039370078700787), "in"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_cm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mm"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(10), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_millimetres_to_cm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mm"; - string targetUnitName = "cm"; - Measurement expected = new Measurement(Convert.ToDouble(0.0999999999), "cm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - #endregion - #endregion - } -} diff --git a/Units.Test/UnitConverterTest3.cs b/Units.Test/UnitConverterTest3.cs deleted file mode 100644 index 758cf50..0000000 --- a/Units.Test/UnitConverterTest3.cs +++ /dev/null @@ -1,8725 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Units; - -namespace Units.Test -{ - [TestClass()] - public class UnitConverterTest3 - { - private TestContext testContextInstance; - - private UnitProvider unitPro = new UnitProvider(); - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get { return testContextInstance; } - set { testContextInstance = value; } - } - - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ _ - //Public Sub MyTestCleanup() - //End Sub - // - - #endregion - - #region "UnitConverter.ConvertUnits" - - #region "Power Tests" - #region "Source as Watts" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Watts_to_Horsepower_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "W"; - string targetUnitName = "hp"; - Measurement expected = new Measurement(Convert.ToDouble(0.134102208959503), "hp"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Watts_to_Horsepower_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "W"; - string targetUnitName = "hp"; - Measurement expected = new Measurement(Convert.ToDouble(0.001341022088254), "hp"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Watts_to_Megawatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "W"; - string targetUnitName = "MW"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "MW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Watts_to_Megawatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "W"; - string targetUnitName = "MW"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "MW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Watts_to_Kilowatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "W"; - string targetUnitName = "kW"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "kW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Watts_to_Kilowatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "W"; - string targetUnitName = "kW"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "kW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Watts_to_Microwatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "W"; - string targetUnitName = "µW"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "µW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Watts_to_Microwatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "W"; - string targetUnitName = "µW"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "µW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Watts_to_Nanowatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "W"; - string targetUnitName = "nW"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000L), "nW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Watts_to_Nanowatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "W"; - string targetUnitName = "nW"; - Measurement expected = new Measurement(Convert.ToDouble(999999999), "nW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Watts_to_MilliWatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "W"; - string targetUnitName = "mW"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "mW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Watts_to_MilliWatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "W"; - string targetUnitName = "mW"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "mW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Watts_to_BTUperMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "W"; - string targetUnitName = "BTU/min"; - Measurement expected = new Measurement(Convert.ToDouble(5.68690192748063), "BTU/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Watts_to_BTUperMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "W"; - string targetUnitName = "BTU/min"; - Measurement expected = new Measurement(Convert.ToDouble(0.056869019217937), "BTU/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Watts_to_FtLbPerMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "W"; - string targetUnitName = "ft lb/min"; - Measurement expected = new Measurement(Convert.ToDouble(4425.37289566359), "ft lb/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Watts_to_FtLbPerMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "W"; - string targetUnitName = "ft lb/min"; - Measurement expected = new Measurement(Convert.ToDouble(44.2537289123822), "ft lb/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Horsepower" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Horsepower_to_Watts_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "hp"; - string targetUnitName = "W"; - Measurement expected = new Measurement(Convert.ToDouble(74569.987158227), "W"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Horsepower_to_Watts_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "hp"; - string targetUnitName = "W"; - Measurement expected = new Measurement(Convert.ToDouble(745.69987083657), "W"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Horsepower_to_Megawatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "hp"; - string targetUnitName = "MW"; - Measurement expected = new Measurement(Convert.ToDouble(0.074569987158227), "MW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Horsepower_to_Megawatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "hp"; - string targetUnitName = "MW"; - Measurement expected = new Measurement(Convert.ToDouble(0.000745699870837), "MW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Horsepower_to_Kilowatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "hp"; - string targetUnitName = "kW"; - Measurement expected = new Measurement(Convert.ToDouble(74.569987158227), "kW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Horsepower_to_Kilowatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "hp"; - string targetUnitName = "kW"; - Measurement expected = new Measurement(Convert.ToDouble(0.74569987083657), "kW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Horsepower_to_Microwatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "hp"; - string targetUnitName = "µW"; - Measurement expected = new Measurement(Convert.ToDouble(74569987158.227), "µW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Horsepower_to_Microwatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "hp"; - string targetUnitName = "µW"; - Measurement expected = new Measurement(Convert.ToDouble(745699870.83657), "µW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Horsepower_to_Nanowatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "hp"; - string targetUnitName = "nW"; - Measurement expected = new Measurement(Convert.ToDouble(74569987158227.0), "nW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Horsepower_to_Nanowatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "hp"; - string targetUnitName = "nW"; - Measurement expected = new Measurement(Convert.ToDouble(745699870836.57), "nW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Horsepower_to_MilliWatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "hp"; - string targetUnitName = "mW"; - Measurement expected = new Measurement(Convert.ToDouble(74569987.158227), "mW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Horsepower_to_MilliWatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "hp"; - string targetUnitName = "mW"; - Measurement expected = new Measurement(Convert.ToDouble(745699.870836571), "mW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Horsepower_to_BTUperMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "hp"; - string targetUnitName = "BTU/min"; - Measurement expected = new Measurement(Convert.ToDouble(4240.72203702327), "BTU/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Horsepower_to_BTUperMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "hp"; - string targetUnitName = "BTU/min"; - Measurement expected = new Measurement(Convert.ToDouble(42.4072203278255), "BTU/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Horsepower_to_FtLbPerMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "hp"; - string targetUnitName = "ft lb/min"; - Measurement expected = new Measurement(Convert.ToDouble(3300000), "ft lb/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Horsepower_to_FtLbPerMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "hp"; - string targetUnitName = "ft lb/min"; - Measurement expected = new Measurement(Convert.ToDouble(32999.999967), "ft lb/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Megawatts" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megawatts_to_Watts_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "MW"; - string targetUnitName = "W"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "W"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megawatts_to_Watts_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "MW"; - string targetUnitName = "W"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "W"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megawatts_to_Horsepower_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "MW"; - string targetUnitName = "hp"; - Measurement expected = new Measurement(Convert.ToDouble(134102.208959503), "hp"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megawatts_to_Horsepower_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "MW"; - string targetUnitName = "hp"; - Measurement expected = new Measurement(Convert.ToDouble(1341.02208825401), "hp"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megawatts_to_Kilowatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "MW"; - string targetUnitName = "kW"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "kW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megawatts_to_Kilowatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "MW"; - string targetUnitName = "kW"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "kW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megawatts_to_Microwatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "MW"; - string targetUnitName = "µW"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000L), "µW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megawatts_to_Microwatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "MW"; - string targetUnitName = "µW"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000L), "µW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megawatts_to_Nanowatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "MW"; - string targetUnitName = "nW"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000000L), "nW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megawatts_to_Nanowatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "MW"; - string targetUnitName = "nW"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000000L), "nW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megawatts_to_MilliWatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "MW"; - string targetUnitName = "mW"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000L), "mW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megawatts_to_MilliWatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "MW"; - string targetUnitName = "mW"; - Measurement expected = new Measurement(Convert.ToDouble(999999999), "mW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megawatts_to_BTUperMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "MW"; - string targetUnitName = "BTU/min"; - Measurement expected = new Measurement(Convert.ToDouble(5686901.92748063), "BTU/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megawatts_to_BTUperMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "MW"; - string targetUnitName = "BTU/min"; - Measurement expected = new Measurement(Convert.ToDouble(56869.0192179373), "BTU/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megawatts_to_FtLbPerMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "MW"; - string targetUnitName = "ft lb/min"; - Measurement expected = new Measurement(Convert.ToDouble(4425372895.66359), "ft lb/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megawatts_to_FtLbPerMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "MW"; - string targetUnitName = "ft lb/min"; - Measurement expected = new Measurement(Convert.ToDouble(44253728.9123822), "ft lb/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Kilowatts" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kilowatts_to_Watts_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kW"; - string targetUnitName = "W"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "W"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kilowatts_to_Watts_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kW"; - string targetUnitName = "W"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "W"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kilowatts_to_Horsepower_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kW"; - string targetUnitName = "hp"; - Measurement expected = new Measurement(Convert.ToDouble(134.102208959503), "hp"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kilowatts_to_Horsepower_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kW"; - string targetUnitName = "hp"; - Measurement expected = new Measurement(Convert.ToDouble(1.34102208825401), "hp"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kilowatts_to_Megawatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kW"; - string targetUnitName = "MW"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "MW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kilowatts_to_Megawatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kW"; - string targetUnitName = "MW"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "MW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kilowatts_to_Microwatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kW"; - string targetUnitName = "µW"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000L), "µW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kilowatts_to_Microwatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kW"; - string targetUnitName = "µW"; - Measurement expected = new Measurement(Convert.ToDouble(999999999), "µW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kilowatts_to_Nanowatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kW"; - string targetUnitName = "nW"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000L), "nW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kilowatts_to_Nanowatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kW"; - string targetUnitName = "nW"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000L), "nW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kilowatts_to_MilliWatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kW"; - string targetUnitName = "mW"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "mW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kilowatts_to_MilliWatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kW"; - string targetUnitName = "mW"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "mW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kilowatts_to_BTUperMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kW"; - string targetUnitName = "BTU/min"; - Measurement expected = new Measurement(Convert.ToDouble(5686.90192748063), "BTU/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kilowatts_to_BTUperMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kW"; - string targetUnitName = "BTU/min"; - Measurement expected = new Measurement(Convert.ToDouble(56.8690192179373), "BTU/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kilowatts_to_FtLbPerMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kW"; - string targetUnitName = "ft lb/min"; - Measurement expected = new Measurement(Convert.ToDouble(4425372.89566359), "ft lb/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Kilowatts_to_FtLbPerMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kW"; - string targetUnitName = "ft lb/min"; - Measurement expected = new Measurement(Convert.ToDouble(44253.7289123822), "ft lb/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Microwatts" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microwatts_to_Watts_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µW"; - string targetUnitName = "W"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "W"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microwatts_to_Watts_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µW"; - string targetUnitName = "W"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "W"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microwatts_to_Horsepower_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µW"; - string targetUnitName = "hp"; - Measurement expected = new Measurement(Convert.ToDouble(1.34102209E-07), "hp"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microwatts_to_Horsepower_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µW"; - string targetUnitName = "hp"; - Measurement expected = new Measurement(Convert.ToDouble(1.341022E-09), "hp"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microwatts_to_Megawatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µW"; - string targetUnitName = "MW"; - Measurement expected = new Measurement(Convert.ToDouble(1E-10), "MW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microwatts_to_Megawatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µW"; - string targetUnitName = "MW"; - Measurement expected = new Measurement(Convert.ToDouble(1E-12), "MW"); - //should be 0.000000000000999999999, can only round to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microwatts_to_kikowatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µW"; - string targetUnitName = "kW"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "kW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microwatts_to_Kilowatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µW"; - string targetUnitName = "kW"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "kW"); - //should be 0.000000000999999999, can only round to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microwatts_to_Nanowatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µW"; - string targetUnitName = "nW"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "nW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microwatts_to_Nanowatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µW"; - string targetUnitName = "nW"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "nW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microwatts_to_Milliwatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µW"; - string targetUnitName = "mW"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "mW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microwatts_to_Milliwatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µW"; - string targetUnitName = "mW"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "mW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microwatts_to_BTUperMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µW"; - string targetUnitName = "BTU/min"; - Measurement expected = new Measurement(Convert.ToDouble(5.686901927E-06), "BTU/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microwatts_to_BTUperMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µW"; - string targetUnitName = "BTU/min"; - Measurement expected = new Measurement(Convert.ToDouble(5.6869019E-08), "BTU/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microwatts_to_FtLbPerMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µW"; - string targetUnitName = "ft lb/min"; - Measurement expected = new Measurement(Convert.ToDouble(0.004425372895664), "ft lb/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Microwatts_to_FtLbPerMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µW"; - string targetUnitName = "ft lb/min"; - Measurement expected = new Measurement(Convert.ToDouble(4.4253728912E-05), "ft lb/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Nanowatts" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Nanowatts_to_Watts_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nW"; - string targetUnitName = "W"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "W"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Nanowatts_to_Watts_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nW"; - string targetUnitName = "W"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "W"); - //should be 0.000000000999999999, can only round to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Nanowatts_to_Horsepower_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nW"; - string targetUnitName = "hp"; - Measurement expected = new Measurement(Convert.ToDouble(1.34102E-10), "hp"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Nanowatts_to_Horsepower_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nW"; - string targetUnitName = "hp"; - Measurement expected = new Measurement(Convert.ToDouble(1.341E-12), "hp"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Nanowatts_to_Megawatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nW"; - string targetUnitName = "MW"; - Measurement expected = new Measurement(Convert.ToDouble(1E-13), "MW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Nanowatts_to_Megawatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nW"; - string targetUnitName = "MW"; - Measurement expected = new Measurement(Convert.ToDouble(1E-15), "MW"); - //should be 0.000000000000000999999999, can only round to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Nanowatts_to_Kilowatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nW"; - string targetUnitName = "kW"; - Measurement expected = new Measurement(Convert.ToDouble(1E-10), "kW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Nanowatts_to_Kilowatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nW"; - string targetUnitName = "kW"; - Measurement expected = new Measurement(Convert.ToDouble(1E-12), "kW"); - //should be 0.000000000000999999999, can only round to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Nanowatts_to_Microwatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nW"; - string targetUnitName = "µW"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "µW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Nanowatts_to_Microwatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nW"; - string targetUnitName = "µW"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "µW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Nanowatts_to_Milliwatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nW"; - string targetUnitName = "mW"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "mW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Nanowatts_to_Milliwatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nW"; - string targetUnitName = "mW"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "mW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Nanowatts_to_BTUperMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nW"; - string targetUnitName = "BTU/min"; - Measurement expected = new Measurement(Convert.ToDouble(5.686902E-09), "BTU/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Nanowatts_to_BTUperMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nW"; - string targetUnitName = "BTU/min"; - Measurement expected = new Measurement(Convert.ToDouble(5.6869E-11), "BTU/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Nanowatts_to_FtLbPerMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nW"; - string targetUnitName = "ft lb/min"; - Measurement expected = new Measurement(Convert.ToDouble(4.425372896E-06), "ft lb/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Nanowatts_to_FtLbPerMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nW"; - string targetUnitName = "ft lb/min"; - Measurement expected = new Measurement(Convert.ToDouble(4.4253729E-08), "ft lb/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Milliwatts" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Milliwatts_to_Watts_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mW"; - string targetUnitName = "W"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "W"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Milliwatts_to_Watts_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mW"; - string targetUnitName = "W"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "W"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Milliwatts_to_Horsepower_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mW"; - string targetUnitName = "hp"; - Measurement expected = new Measurement(Convert.ToDouble(0.00013410220896), "hp"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Milliwatts_to_Horsepower_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mW"; - string targetUnitName = "hp"; - Measurement expected = new Measurement(Convert.ToDouble(1.341022088E-06), "hp"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Milliwatts_to_Megawatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mW"; - string targetUnitName = "MW"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "MW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Milliwatts_to_Megawatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mW"; - string targetUnitName = "MW"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "MW"); - //should be 0.000000000999999999, can only round to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Milliwatts_to_Kilowatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mW"; - string targetUnitName = "kW"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "kW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Milliwatts_to_Kilowatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mW"; - string targetUnitName = "kW"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "kW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Milliwatts_to_Microwatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mW"; - string targetUnitName = "µW"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "µW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Milliwatts_to_Microwatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mW"; - string targetUnitName = "µW"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "µW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Milliwatts_to_Nanowatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mW"; - string targetUnitName = "nW"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "nW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Milliwatts_to_Nanowatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mW"; - string targetUnitName = "nW"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "nW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Milliwatts_to_BTUperMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mW"; - string targetUnitName = "BTU/min"; - Measurement expected = new Measurement(Convert.ToDouble(0.005686901927481), "BTU/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Milliwatts_to_BTUperMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mW"; - string targetUnitName = "BTU/min"; - Measurement expected = new Measurement(Convert.ToDouble(5.6869019218E-05), "BTU/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Milliwatts_to_FtLbPerMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mW"; - string targetUnitName = "ft lb/min"; - Measurement expected = new Measurement(Convert.ToDouble(4.42537289566359), "ft lb/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Milliwatts_to_FtLbPerMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mW"; - string targetUnitName = "ft lb/min"; - Measurement expected = new Measurement(Convert.ToDouble(0.044253728912382), "ft lb/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as BTU/min" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_BTUperMin_to_Watts_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "BTU/min"; - string targetUnitName = "W"; - Measurement expected = new Measurement(Convert.ToDouble(1758.42666666667), "W"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_BTUperMin_to_Watts_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "BTU/min"; - string targetUnitName = "W"; - Measurement expected = new Measurement(Convert.ToDouble(17.5842666490824), "W"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_BTUperMin_to_Horsepower_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "BTU/min"; - string targetUnitName = "hp"; - Measurement expected = new Measurement(Convert.ToDouble(2.35808900293295), "hp"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_BTUperMin_to_Horsepower_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "BTU/min"; - string targetUnitName = "hp"; - Measurement expected = new Measurement(Convert.ToDouble(0.023580890005749), "hp"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_BTUperMin_to_Megawatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "BTU/min"; - string targetUnitName = "MW"; - Measurement expected = new Measurement(Convert.ToDouble(0.001758426666667), "MW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_BTUperMin_to_Megawatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "BTU/min"; - string targetUnitName = "MW"; - Measurement expected = new Measurement(Convert.ToDouble(1.7584266649E-05), "MW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_BTUperMin_to_Kilowatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "BTU/min"; - string targetUnitName = "kW"; - Measurement expected = new Measurement(Convert.ToDouble(1.75842666666667), "kW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_BTUperMin_to_Kilowatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "BTU/min"; - string targetUnitName = "kW"; - Measurement expected = new Measurement(Convert.ToDouble(0.017584266649082), "kW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_BTUperMin_to_Microwatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "BTU/min"; - string targetUnitName = "µW"; - Measurement expected = new Measurement(Convert.ToDouble(1758426666.66667), "µW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_BTUperMin_to_Microwatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "BTU/min"; - string targetUnitName = "µW"; - Measurement expected = new Measurement(Convert.ToDouble(17584266.6490824), "µW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_BTUperMin_to_Nanowatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "BTU/min"; - string targetUnitName = "nW"; - Measurement expected = new Measurement(Convert.ToDouble(1758426666666.67), "nW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_BTUperMin_to_Nanowatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "BTU/min"; - string targetUnitName = "nW"; - Measurement expected = new Measurement(Convert.ToDouble(17584266649.0824), "nW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_BTUperMin_to_Milliwatts_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "BTU/min"; - string targetUnitName = "mW"; - Measurement expected = new Measurement(Convert.ToDouble(1758426.66666667), "mW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_BTUperMin_to_Milliwatts_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "BTU/min"; - string targetUnitName = "mW"; - Measurement expected = new Measurement(Convert.ToDouble(17584.2666490824), "mW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_BTUperMin_to_FtLbPerMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "BTU/min"; - string targetUnitName = "ft lb/min"; - Measurement expected = new Measurement(Convert.ToDouble(77816.9370967875), "ft lb/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_BTUperMin_to_FtLbPerMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "BTU/min"; - string targetUnitName = "ft lb/min"; - Measurement expected = new Measurement(Convert.ToDouble(778.169370189705), "ft lb/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as ft lb/min" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtLbPerMin_to_Watts_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft lb/min"; - string targetUnitName = "W"; - Measurement expected = new Measurement(Convert.ToDouble(2.25969658055233), "W"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtLbPerMin_to_Watts_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft lb/min"; - string targetUnitName = "W"; - Measurement expected = new Measurement(Convert.ToDouble(0.022596965782926), "W"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtLbPerMin_to_Horsepower_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft lb/min"; - string targetUnitName = "hp"; - Measurement expected = new Measurement(Convert.ToDouble(0.003030303030303), "hp"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtLbPerMin_to_Horsepower_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft lb/min"; - string targetUnitName = "hp"; - Measurement expected = new Measurement(Convert.ToDouble(3.0303030273E-05), "hp"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtLbPerMin_to_Megawatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft lb/min"; - string targetUnitName = "MW"; - Measurement expected = new Measurement(Convert.ToDouble(2.259696581E-06), "MW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtLbPerMin_to_Megawatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft lb/min"; - string targetUnitName = "MW"; - Measurement expected = new Measurement(Convert.ToDouble(2.2596966E-08), "MW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtLbPerMin_to_Kilowatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft lb/min"; - string targetUnitName = "kW"; - Measurement expected = new Measurement(Convert.ToDouble(0.002259696580552), "kW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtLbPerMin_to_Kilowatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft lb/min"; - string targetUnitName = "kW"; - Measurement expected = new Measurement(Convert.ToDouble(2.2596965783E-05), "kW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtLbPerMin_to_Microwatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft lb/min"; - string targetUnitName = "µW"; - Measurement expected = new Measurement(Convert.ToDouble(2259696.58055233), "µW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtLbPerMin_to_Microwatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft lb/min"; - string targetUnitName = "µW"; - Measurement expected = new Measurement(Convert.ToDouble(22596.9657829264), "µW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtLbPerMin_to_Nanowatt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft lb/min"; - string targetUnitName = "nW"; - Measurement expected = new Measurement(Convert.ToDouble(2259696580.55233), "nW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtLbPerMin_to_Nanowatt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft lb/min"; - string targetUnitName = "nW"; - Measurement expected = new Measurement(Convert.ToDouble(22596965.7829264), "nW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtLbPerMin_to_Milliwatts_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft lb/min"; - string targetUnitName = "mW"; - Measurement expected = new Measurement(Convert.ToDouble(2259.69658055233), "mW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtLbPerMin_to_Milliwatts_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft lb/min"; - string targetUnitName = "mW"; - Measurement expected = new Measurement(Convert.ToDouble(22.5969657829264), "mW"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtLbPerMin_to_BTUperMin_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft lb/min"; - string targetUnitName = "BTU/min"; - Measurement expected = new Measurement(Convert.ToDouble(0.128506728394644), "BTU/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_FtLbPerMin_to_BTUperMin_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft lb/min"; - string targetUnitName = "BTU/min"; - Measurement expected = new Measurement(Convert.ToDouble(0.001285067282661), "BTU/min"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - #endregion - - #region "Energy Tests" - #region "Source as Joule" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_J_to_erg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "J"; - string targetUnitName = "erg"; - Measurement expected = new Measurement(Convert.ToDouble(1000000000), "erg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_J_to_erg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "J"; - string targetUnitName = "erg"; - Measurement expected = new Measurement(Convert.ToDouble(9999999.99), "erg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_J_to_cal_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "J"; - string targetUnitName = "cal"; - Measurement expected = new Measurement(Convert.ToDouble(23.8845896627496), "cal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_J_to_cal_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "J"; - string targetUnitName = "cal"; - Measurement expected = new Measurement(Convert.ToDouble(0.23884589638865), "cal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_J_to_Btu_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "J"; - string targetUnitName = "Btu"; - Measurement expected = new Measurement(Convert.ToDouble(0.094781712031332), "Btu"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_J_to_Btu_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "J"; - string targetUnitName = "Btu"; - Measurement expected = new Measurement(Convert.ToDouble(0.000947817119366), "Btu"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_J_to_therm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "J"; - string targetUnitName = "therm"; - Measurement expected = new Measurement(Convert.ToDouble(9.47816988E-07), "therm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_J_to_therm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "J"; - string targetUnitName = "therm"; - Measurement expected = new Measurement(Convert.ToDouble(9.47817E-09), "therm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_J_to_mJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "J"; - string targetUnitName = "mJ"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "mJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_J_to_mJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "J"; - string targetUnitName = "mJ"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "mJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_J_to_Megajoule_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "J"; - string targetUnitName = "Megajoule"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "Megajoule"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_J_to_Megajoule_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "J"; - string targetUnitName = "Megajoule"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "Megajoule"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_J_to_kJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "J"; - string targetUnitName = "kJ"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "kJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_J_to_kJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "J"; - string targetUnitName = "kJ"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "kJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_J_to_GJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "J"; - string targetUnitName = "GJ"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "GJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_J_to_GJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "J"; - string targetUnitName = "GJ"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "GJ"); - //should be 0.000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_J_to_µJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "J"; - string targetUnitName = "µJ"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "µJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_J_to_µJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "J"; - string targetUnitName = "µJ"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "µJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_J_to_nJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "J"; - string targetUnitName = "nJ"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000.0), "nJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_J_to_nJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "J"; - string targetUnitName = "nJ"; - Measurement expected = new Measurement(Convert.ToDouble(999999999), "nJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - #endregion - - #region "Source as Energy (erg)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_erg_to_J_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "erg"; - string targetUnitName = "J"; - Measurement expected = new Measurement(Convert.ToDouble(1E-05), "J"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_erg_to_J_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "erg"; - string targetUnitName = "J"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "J"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_erg_to_cal_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "erg"; - string targetUnitName = "cal"; - Measurement expected = new Measurement(Convert.ToDouble(2.388458966E-06), "cal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_erg_to_cal_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "erg"; - string targetUnitName = "cal"; - Measurement expected = new Measurement(Convert.ToDouble(2.388459E-08), "cal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_erg_to_Btu_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "erg"; - string targetUnitName = "Btu"; - Measurement expected = new Measurement(Convert.ToDouble(9.478171E-09), "Btu"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_erg_to_Btu_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "erg"; - string targetUnitName = "Btu"; - Measurement expected = new Measurement(Convert.ToDouble(9.4782E-11), "Btu"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_erg_to_therm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "erg"; - string targetUnitName = "therm"; - Measurement expected = new Measurement(Convert.ToDouble(9.5E-14), "therm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_erg_to_therm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "erg"; - string targetUnitName = "therm"; - Measurement expected = new Measurement(Convert.ToDouble(1E-15), "therm"); - //should be 0.000000000000000947816987, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_erg_to_mJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "erg"; - string targetUnitName = "mJ"; - Measurement expected = new Measurement(Convert.ToDouble(0.01), "mJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_erg_to_mJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "erg"; - string targetUnitName = "mJ"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-05), "mJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_erg_to_Megajoule_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "erg"; - string targetUnitName = "Megajoule"; - Measurement expected = new Measurement(Convert.ToDouble(1E-11), "Megajoule"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_erg_to_Megajoule_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "erg"; - string targetUnitName = "Megajoule"; - Measurement expected = new Measurement(Convert.ToDouble(1E-13), "Megajoule"); - //should be 0.0000000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_erg_to_kJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "erg"; - string targetUnitName = "kJ"; - Measurement expected = new Measurement(Convert.ToDouble(1E-08), "kJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_erg_to_kJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "erg"; - string targetUnitName = "kJ"; - Measurement expected = new Measurement(Convert.ToDouble(1E-10), "kJ"); - //should be 0.000000000099999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_erg_to_GJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "erg"; - string targetUnitName = "GJ"; - Measurement expected = new Measurement(Convert.ToDouble(1E-14), "GJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_erg_to_GJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "erg"; - string targetUnitName = "GJ"; - Measurement expected = new Measurement(Convert.ToDouble(0), "GJ"); - //should be 9.99999999E-17, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_erg_to_µJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "erg"; - string targetUnitName = "µJ"; - Measurement expected = new Measurement(Convert.ToDouble(10), "µJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_erg_to_µJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "erg"; - string targetUnitName = "µJ"; - Measurement expected = new Measurement(Convert.ToDouble(0.0999999999), "µJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_erg_to_nJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "erg"; - string targetUnitName = "nJ"; - Measurement expected = new Measurement(Convert.ToDouble(10000), "nJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_erg_to_nJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "erg"; - string targetUnitName = "nJ"; - Measurement expected = new Measurement(Convert.ToDouble(99.9999999), "nJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - #endregion - - #region "Source as Calorie (cal)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cal_to_J_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cal"; - string targetUnitName = "J"; - Measurement expected = new Measurement(Convert.ToDouble(418.68), "J"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cal_to_J_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cal"; - string targetUnitName = "J"; - Measurement expected = new Measurement(Convert.ToDouble(4.1867999958132), "J"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cal_to_erg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cal"; - string targetUnitName = "erg"; - Measurement expected = new Measurement(Convert.ToDouble(4186800000L), "erg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cal_to_erg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cal"; - string targetUnitName = "erg"; - Measurement expected = new Measurement(Convert.ToDouble(41867999.958132), "erg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cal_to_Btu_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cal"; - string targetUnitName = "Btu"; - Measurement expected = new Measurement(Convert.ToDouble(0.396832071932955), "Btu"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cal_to_Btu_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cal"; - string targetUnitName = "Btu"; - Measurement expected = new Measurement(Convert.ToDouble(0.003968320715361), "Btu"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cal_to_therm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cal"; - string targetUnitName = "therm"; - Measurement expected = new Measurement(Convert.ToDouble(3.968320165E-06), "therm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cal_to_therm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cal"; - string targetUnitName = "therm"; - Measurement expected = new Measurement(Convert.ToDouble(3.9683202E-08), "therm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cal_to_mJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cal"; - string targetUnitName = "mJ"; - Measurement expected = new Measurement(Convert.ToDouble(418680), "mJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cal_to_mJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cal"; - string targetUnitName = "mJ"; - Measurement expected = new Measurement(Convert.ToDouble(4186.7999958132), "mJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cal_to_Megajoule_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cal"; - string targetUnitName = "Megajoule"; - Measurement expected = new Measurement(Convert.ToDouble(0.00041868), "Megajoule"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cal_to_Megajoule_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cal"; - string targetUnitName = "Megajoule"; - Measurement expected = new Measurement(Convert.ToDouble(4.186799996E-06), "Megajoule"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cal_to_kJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cal"; - string targetUnitName = "kJ"; - Measurement expected = new Measurement(Convert.ToDouble(0.41868), "kJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cal_to_kJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cal"; - string targetUnitName = "kJ"; - Measurement expected = new Measurement(Convert.ToDouble(0.004186799995813), "kJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cal_to_GJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cal"; - string targetUnitName = "GJ"; - Measurement expected = new Measurement(Convert.ToDouble(4.1868E-07), "GJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cal_to_GJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cal"; - string targetUnitName = "GJ"; - Measurement expected = new Measurement(Convert.ToDouble(4.1868E-09), "GJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cal_to_µJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cal"; - string targetUnitName = "µJ"; - Measurement expected = new Measurement(Convert.ToDouble(418680000), "µJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cal_to_µJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cal"; - string targetUnitName = "µJ"; - Measurement expected = new Measurement(Convert.ToDouble(4186799.9958132), "µJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cal_to_nJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cal"; - string targetUnitName = "nJ"; - Measurement expected = new Measurement(Convert.ToDouble(418680000000.0), "nJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cal_to_nJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cal"; - string targetUnitName = "nJ"; - Measurement expected = new Measurement(Convert.ToDouble(4186799995.8132), "nJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - #endregion - - #region "Source as British thermal unit (Btu)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Btu_to_J_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Btu"; - string targetUnitName = "J"; - Measurement expected = new Measurement(Convert.ToDouble(105505.585262), "J"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Btu_to_J_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Btu"; - string targetUnitName = "J"; - Measurement expected = new Measurement(Convert.ToDouble(1055.05585156494), "J"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Btu_to_erg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Btu"; - string targetUnitName = "erg"; - Measurement expected = new Measurement(Convert.ToDouble(1055055852620.0), "erg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Btu_to_erg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Btu"; - string targetUnitName = "erg"; - Measurement expected = new Measurement(Convert.ToDouble(10550558515.6494), "erg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Btu_to_cal_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Btu"; - string targetUnitName = "cal"; - Measurement expected = new Measurement(Convert.ToDouble(25199.5761111), "cal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Btu_to_cal_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Btu"; - string targetUnitName = "cal"; - Measurement expected = new Measurement(Convert.ToDouble(251.995760859004), "cal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Btu_to_therm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Btu"; - string targetUnitName = "therm"; - Measurement expected = new Measurement(Convert.ToDouble(0.001), "therm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Btu_to_therm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Btu"; - string targetUnitName = "therm"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-06), "therm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Btu_to_mJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Btu"; - string targetUnitName = "mJ"; - Measurement expected = new Measurement(Convert.ToDouble(105505585.262), "mJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Btu_to_mJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Btu"; - string targetUnitName = "mJ"; - Measurement expected = new Measurement(Convert.ToDouble(1055055.85156494), "mJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Btu_to_Megajoule_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Btu"; - string targetUnitName = "Megajoule"; - Measurement expected = new Measurement(Convert.ToDouble(0.105505585262), "Megajoule"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Btu_to_Megajoule_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Btu"; - string targetUnitName = "Megajoule"; - Measurement expected = new Measurement(Convert.ToDouble(0.001055055851565), "Megajoule"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Btu_to_kJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Btu"; - string targetUnitName = "kJ"; - Measurement expected = new Measurement(Convert.ToDouble(105.505585262), "kJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Btu_to_kJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Btu"; - string targetUnitName = "kJ"; - Measurement expected = new Measurement(Convert.ToDouble(1.05505585156494), "kJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Btu_to_GJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Btu"; - string targetUnitName = "GJ"; - Measurement expected = new Measurement(Convert.ToDouble(0.000105505585262), "GJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Btu_to_GJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Btu"; - string targetUnitName = "GJ"; - Measurement expected = new Measurement(Convert.ToDouble(1.055055852E-06), "GJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Btu_to_µJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Btu"; - string targetUnitName = "µJ"; - Measurement expected = new Measurement(Convert.ToDouble(105505585262.0), "µJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Btu_to_µJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Btu"; - string targetUnitName = "µJ"; - Measurement expected = new Measurement(Convert.ToDouble(1055055851.56494), "µJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Btu_to_nJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Btu"; - string targetUnitName = "nJ"; - Measurement expected = new Measurement(Convert.ToDouble(105505585262000.0), "nJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Btu_to_nJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Btu"; - string targetUnitName = "nJ"; - Measurement expected = new Measurement(Convert.ToDouble(1055055851564.94), "nJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - #endregion - - #region "Source as Therm (therm)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_therm_to_J_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "therm"; - string targetUnitName = "J"; - Measurement expected = new Measurement(Convert.ToDouble(10550560000.0), "J"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_therm_to_J_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "therm"; - string targetUnitName = "J"; - Measurement expected = new Measurement(Convert.ToDouble(105505599.894494), "J"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_therm_to_erg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "therm"; - string targetUnitName = "erg"; - Measurement expected = new Measurement(Convert.ToDouble(1.055056E+17), "erg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_therm_to_erg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "therm"; - string targetUnitName = "erg"; - Measurement expected = new Measurement(Convert.ToDouble(1055055998944944L), "erg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_therm_to_cal_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "therm"; - string targetUnitName = "cal"; - Measurement expected = new Measurement(Convert.ToDouble(2519957963.1222), "cal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_therm_to_cal_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "therm"; - string targetUnitName = "cal"; - Measurement expected = new Measurement(Convert.ToDouble(25199579.6060224), "cal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_therm_to_Btu_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "therm"; - string targetUnitName = "Btu"; - Measurement expected = new Measurement(Convert.ToDouble(10000000), "Btu"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_therm_to_Btu_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "therm"; - string targetUnitName = "Btu"; - Measurement expected = new Measurement(Convert.ToDouble(99999.9999), "Btu"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_therm_to_mJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "therm"; - string targetUnitName = "mJ"; - Measurement expected = new Measurement(Convert.ToDouble(10550560000000.0), "mJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_therm_to_mJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "therm"; - string targetUnitName = "mJ"; - Measurement expected = new Measurement(Convert.ToDouble(105505599894.494), "mJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_therm_to_Megajoule_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "therm"; - string targetUnitName = "Megajoule"; - Measurement expected = new Measurement(Convert.ToDouble(10550.56), "Megajoule"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_therm_to_Megajoule_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "therm"; - string targetUnitName = "Megajoule"; - Measurement expected = new Measurement(Convert.ToDouble(105.505599894494), "Megajoule"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_therm_to_kJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "therm"; - string targetUnitName = "kJ"; - Measurement expected = new Measurement(Convert.ToDouble(10550560), "kJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_therm_to_kJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "therm"; - string targetUnitName = "kJ"; - Measurement expected = new Measurement(Convert.ToDouble(105505.599894494), "kJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_therm_to_GJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "therm"; - string targetUnitName = "GJ"; - Measurement expected = new Measurement(Convert.ToDouble(10.55056), "GJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_therm_to_GJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "therm"; - string targetUnitName = "GJ"; - Measurement expected = new Measurement(Convert.ToDouble(0.105505599894494), "GJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_therm_to_µJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "therm"; - string targetUnitName = "µJ"; - Measurement expected = new Measurement(Convert.ToDouble(1.055056E+16), "µJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_therm_to_µJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "therm"; - string targetUnitName = "µJ"; - Measurement expected = new Measurement(Convert.ToDouble(105505599894494.0), "µJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_therm_to_nJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "therm"; - string targetUnitName = "nJ"; - Measurement expected = new Measurement(Convert.ToDouble(1.055056E+19), "nJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_therm_to_nJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "therm"; - string targetUnitName = "nJ"; - Measurement expected = new Measurement(Convert.ToDouble(1.05505599894494E+17), "nJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - #endregion - - #region "Source as Millijoules (mJ)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mJ_to_J_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mJ"; - string targetUnitName = "J"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "J"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mJ_to_J_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mJ"; - string targetUnitName = "J"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "J"); - //actual value 0.001, .net bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mJ_to_erg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mJ"; - string targetUnitName = "erg"; - Measurement expected = new Measurement(Convert.ToDouble(1000000), "erg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mJ_to_erg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mJ"; - string targetUnitName = "erg"; - Measurement expected = new Measurement(Convert.ToDouble(9999.99999), "erg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mJ_to_cal_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mJ"; - string targetUnitName = "cal"; - Measurement expected = new Measurement(Convert.ToDouble(0.02388458966275), "cal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mJ_to_cal_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mJ"; - string targetUnitName = "cal"; - Measurement expected = new Measurement(Convert.ToDouble(0.000238845896389), "cal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mJ_to_Btu_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mJ"; - string targetUnitName = "Btu"; - Measurement expected = new Measurement(Convert.ToDouble(9.4781712031E-05), "Btu"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mJ_to_Btu_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mJ"; - string targetUnitName = "Btu"; - Measurement expected = new Measurement(Convert.ToDouble(9.47817119E-07), "Btu"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mJ_to_therm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mJ"; - string targetUnitName = "therm"; - Measurement expected = new Measurement(Convert.ToDouble(9.47817E-10), "therm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mJ_to_therm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mJ"; - string targetUnitName = "therm"; - Measurement expected = new Measurement(Convert.ToDouble(9.478E-12), "therm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mJ_to_Megajoule_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mJ"; - string targetUnitName = "Megajoule"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "Megajoule"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mJ_to_Megajoule_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mJ"; - string targetUnitName = "Megajoule"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "Megajoule"); - //should be 0.000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mJ_to_kJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mJ"; - string targetUnitName = "kJ"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "kJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mJ_to_kJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mJ"; - string targetUnitName = "kJ"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "kJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mJ_to_GJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mJ"; - string targetUnitName = "GJ"; - Measurement expected = new Measurement(Convert.ToDouble(1E-10), "GJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mJ_to_GJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mJ"; - string targetUnitName = "GJ"; - Measurement expected = new Measurement(Convert.ToDouble(1E-12), "GJ"); - //should be 0.000000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mJ_to_µJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mJ"; - string targetUnitName = "µJ"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "µJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mJ_to_µJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mJ"; - string targetUnitName = "µJ"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "µJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mJ_to_nJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mJ"; - string targetUnitName = "nJ"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "nJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mJ_to_nJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mJ"; - string targetUnitName = "nJ"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "nJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - #endregion - - #region "Source as Megajoules (MJ)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megajoule_to_J_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Megajoule"; - string targetUnitName = "J"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "J"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megajoule_to_J_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Megajoule"; - string targetUnitName = "J"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "J"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megajoule_to_erg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Megajoule"; - string targetUnitName = "erg"; - Measurement expected = new Measurement(Convert.ToDouble(1E+15), "erg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megajoule_to_erg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Megajoule"; - string targetUnitName = "erg"; - Measurement expected = new Measurement(Convert.ToDouble(9999999990000.0), "erg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megajoule_to_cal_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Megajoule"; - string targetUnitName = "cal"; - Measurement expected = new Measurement(Convert.ToDouble(23884589.6627496), "cal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megajoule_to_cal_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Megajoule"; - string targetUnitName = "cal"; - Measurement expected = new Measurement(Convert.ToDouble(238845.89638865), "cal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megajoule_to_Btu_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Megajoule"; - string targetUnitName = "Btu"; - Measurement expected = new Measurement(Convert.ToDouble(94781.7120313317), "Btu"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megajoule_to_Btu_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Megajoule"; - string targetUnitName = "Btu"; - Measurement expected = new Measurement(Convert.ToDouble(947.8171193655), "Btu"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megajoule_to_therm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Megajoule"; - string targetUnitName = "therm"; - Measurement expected = new Measurement(Convert.ToDouble(0.947816987913438), "therm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megajoule_to_therm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Megajoule"; - string targetUnitName = "therm"; - Measurement expected = new Measurement(Convert.ToDouble(0.009478169869656), "therm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megajoule_to_mJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Megajoule"; - string targetUnitName = "mJ"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000.0), "mJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megajoule_to_mJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Megajoule"; - string targetUnitName = "mJ"; - Measurement expected = new Measurement(Convert.ToDouble(999999999), "mJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megajoule_to_kJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Megajoule"; - string targetUnitName = "kJ"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "kJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megajoule_to_kJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Megajoule"; - string targetUnitName = "kJ"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "kJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megajoule_to_GJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Megajoule"; - string targetUnitName = "GJ"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "GJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megajoule_to_GJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Megajoule"; - string targetUnitName = "GJ"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "GJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megajoule_to_µJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Megajoule"; - string targetUnitName = "µJ"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000.0), "µJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megajoule_to_µJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Megajoule"; - string targetUnitName = "µJ"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000.0), "µJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megajoule_to_nJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Megajoule"; - string targetUnitName = "nJ"; - Measurement expected = new Measurement(Convert.ToDouble(1E+17), "nJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Megajoule_to_nJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Megajoule"; - string targetUnitName = "nJ"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000000.0), "nJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - #endregion - - #region "Source as Kilojoules (kJ)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kJ_to_J_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kJ"; - string targetUnitName = "J"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "J"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kJ_to_J_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kJ"; - string targetUnitName = "J"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "J"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kJ_to_erg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kJ"; - string targetUnitName = "erg"; - Measurement expected = new Measurement(Convert.ToDouble(1000000000000.0), "erg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kJ_to_erg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kJ"; - string targetUnitName = "erg"; - Measurement expected = new Measurement(Convert.ToDouble(9999999990L), "erg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kJ_to_cal_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kJ"; - string targetUnitName = "cal"; - Measurement expected = new Measurement(Convert.ToDouble(23884.5896627496), "cal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kJ_to_cal_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kJ"; - string targetUnitName = "cal"; - Measurement expected = new Measurement(Convert.ToDouble(238.84589638865), "cal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kJ_to_Btu_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kJ"; - string targetUnitName = "Btu"; - Measurement expected = new Measurement(Convert.ToDouble(94.7817120313317), "Btu"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kJ_to_Btu_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kJ"; - string targetUnitName = "Btu"; - Measurement expected = new Measurement(Convert.ToDouble(0.9478171193655), "Btu"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kJ_to_therm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kJ"; - string targetUnitName = "therm"; - Measurement expected = new Measurement(Convert.ToDouble(0.000947816987913), "therm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kJ_to_therm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kJ"; - string targetUnitName = "therm"; - Measurement expected = new Measurement(Convert.ToDouble(9.47816987E-06), "therm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kJ_to_mJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kJ"; - string targetUnitName = "mJ"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "mJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kJ_to_mJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kJ"; - string targetUnitName = "mJ"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "mJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kJ_to_Megajoule_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kJ"; - string targetUnitName = "Megajoule"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "Megajoule"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kJ_to_Megajoule_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kJ"; - string targetUnitName = "Megajoule"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "Megajoule"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kJ_to_GJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kJ"; - string targetUnitName = "GJ"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "GJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kJ_to_GJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kJ"; - string targetUnitName = "GJ"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "GJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kJ_to_µJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kJ"; - string targetUnitName = "µJ"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000.0), "µJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kJ_to_µJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kJ"; - string targetUnitName = "µJ"; - Measurement expected = new Measurement(Convert.ToDouble(999999999), "µJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kJ_to_nJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kJ"; - string targetUnitName = "nJ"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000.0), "nJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kJ_to_nJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kJ"; - string targetUnitName = "nJ"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000.0), "nJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - #endregion - - #region "Source as Gigajoules (GJ)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GJ_to_J_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "GJ"; - string targetUnitName = "J"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000.0), "J"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GJ_to_J_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "GJ"; - string targetUnitName = "J"; - Measurement expected = new Measurement(Convert.ToDouble(999999999), "J"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GJ_to_erg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "GJ"; - string targetUnitName = "erg"; - Measurement expected = new Measurement(Convert.ToDouble(1E+18), "erg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GJ_to_erg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "GJ"; - string targetUnitName = "erg"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E+15), "erg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GJ_to_cal_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "GJ"; - string targetUnitName = "cal"; - Measurement expected = new Measurement(Convert.ToDouble(23884589662.75), "cal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GJ_to_cal_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "GJ"; - string targetUnitName = "cal"; - Measurement expected = new Measurement(Convert.ToDouble(238845896.388654), "cal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GJ_to_Btu_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "GJ"; - string targetUnitName = "Btu"; - Measurement expected = new Measurement(Convert.ToDouble(94781712.031332), "Btu"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GJ_to_Btu_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "GJ"; - string targetUnitName = "Btu"; - Measurement expected = new Measurement(Convert.ToDouble(947817.119365503), "Btu"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GJ_to_therm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "GJ"; - string targetUnitName = "therm"; - Measurement expected = new Measurement(Convert.ToDouble(947.816987913438), "therm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GJ_to_therm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "GJ"; - string targetUnitName = "therm"; - Measurement expected = new Measurement(Convert.ToDouble(9.47816986965621), "therm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GJ_to_mJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "GJ"; - string targetUnitName = "mJ"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000000.0), "mJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GJ_to_mJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "GJ"; - string targetUnitName = "mJ"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000.0), "mJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GJ_to_Megajoule_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "GJ"; - string targetUnitName = "Megajoule"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "Megajoule"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GJ_to_Megajoule_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "GJ"; - string targetUnitName = "Megajoule"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "Megajoule"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GJ_to_kJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "GJ"; - string targetUnitName = "kJ"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "kJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GJ_to_kJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "GJ"; - string targetUnitName = "kJ"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "kJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GJ_to_µJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "GJ"; - string targetUnitName = "µJ"; - Measurement expected = new Measurement(Convert.ToDouble(1E+17), "µJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GJ_to_µJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "GJ"; - string targetUnitName = "µJ"; - Measurement expected = new Measurement(Convert.ToDouble(999999999000000.0), "µJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GJ_to_nJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "GJ"; - string targetUnitName = "nJ"; - Measurement expected = new Measurement(Convert.ToDouble(1E+20), "nJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_GJ_to_nJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "GJ"; - string targetUnitName = "nJ"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E+17), "nJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - #endregion - - #region "Source as Microjoules (µJ)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µJ_to_J_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µJ"; - string targetUnitName = "J"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "J"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µJ_to_J_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µJ"; - string targetUnitName = "J"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "J"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µJ_to_erg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µJ"; - string targetUnitName = "erg"; - Measurement expected = new Measurement(Convert.ToDouble(1000), "erg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µJ_to_erg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µJ"; - string targetUnitName = "erg"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999), "erg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µJ_to_cal_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µJ"; - string targetUnitName = "cal"; - Measurement expected = new Measurement(Convert.ToDouble(2.3884589663E-05), "cal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µJ_to_cal_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µJ"; - string targetUnitName = "cal"; - Measurement expected = new Measurement(Convert.ToDouble(2.38845896E-07), "cal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µJ_to_Btu_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µJ"; - string targetUnitName = "Btu"; - Measurement expected = new Measurement(Convert.ToDouble(9.4781712E-08), "Btu"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µJ_to_Btu_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µJ"; - string targetUnitName = "Btu"; - Measurement expected = new Measurement(Convert.ToDouble(9.47817E-10), "Btu"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µJ_to_therm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µJ"; - string targetUnitName = "therm"; - Measurement expected = new Measurement(Convert.ToDouble(9.48E-13), "therm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µJ_to_therm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µJ"; - string targetUnitName = "therm"; - Measurement expected = new Measurement(Convert.ToDouble(9E-15), "therm"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µJ_to_mJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µJ"; - string targetUnitName = "mJ"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "mJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µJ_to_mJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µJ"; - string targetUnitName = "mJ"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "mJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µJ_to_Megajoule_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µJ"; - string targetUnitName = "Megajoule"; - Measurement expected = new Measurement(Convert.ToDouble(1E-10), "Megajoule"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µJ_to_Megajoule_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µJ"; - string targetUnitName = "Megajoule"; - Measurement expected = new Measurement(Convert.ToDouble(1E-12), "Megajoule"); - //should be 0.000000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µJ_to_kJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µJ"; - string targetUnitName = "kJ"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "kJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µJ_to_kJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µJ"; - string targetUnitName = "kJ"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "kJ"); - //should be 0.000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µJ_to_GJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µJ"; - string targetUnitName = "GJ"; - Measurement expected = new Measurement(Convert.ToDouble(1E-13), "GJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µJ_to_GJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µJ"; - string targetUnitName = "GJ"; - Measurement expected = new Measurement(Convert.ToDouble(1E-15), "GJ"); - //should be 0.000000000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µJ_to_nJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µJ"; - string targetUnitName = "nJ"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "nJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µJ_to_nJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µJ"; - string targetUnitName = "nJ"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "nJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - #endregion - - #region "Source as Nanojoules (nJ)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nJ_to_J_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nJ"; - string targetUnitName = "J"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "J"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nJ_to_J_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nJ"; - string targetUnitName = "J"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "J"); - //should be 0.000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nJ_to_erg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nJ"; - string targetUnitName = "erg"; - Measurement expected = new Measurement(Convert.ToDouble(1), "erg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nJ_to_erg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nJ"; - string targetUnitName = "erg"; - Measurement expected = new Measurement(Convert.ToDouble(0.00999999999), "erg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nJ_to_cal_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nJ"; - string targetUnitName = "cal"; - Measurement expected = new Measurement(Convert.ToDouble(2.388459E-08), "cal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nJ_to_cal_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nJ"; - string targetUnitName = "cal"; - Measurement expected = new Measurement(Convert.ToDouble(2.38846E-10), "cal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nJ_to_Btu_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nJ"; - string targetUnitName = "Btu"; - Measurement expected = new Measurement(Convert.ToDouble(9.4782E-11), "Btu"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nJ_to_Btu_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nJ"; - string targetUnitName = "Btu"; - Measurement expected = new Measurement(Convert.ToDouble(9.48E-13), "Btu"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nJ_to_therm_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nJ"; - string targetUnitName = "therm"; - Measurement expected = new Measurement(Convert.ToDouble(1E-15), "therm"); - //should be 0.0000000000000009478169879, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nJ_to_therm_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nJ"; - string targetUnitName = "therm"; - Measurement expected = new Measurement(Convert.ToDouble(0), "therm"); - //should be 9.47816987E-18, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nJ_to_mJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nJ"; - string targetUnitName = "mJ"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "mJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nJ_to_mJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nJ"; - string targetUnitName = "mJ"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "mJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nJ_to_Megajoule_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nJ"; - string targetUnitName = "Megajoule"; - Measurement expected = new Measurement(Convert.ToDouble(1E-13), "Megajoule"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nJ_to_Megajoule_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nJ"; - string targetUnitName = "Megajoule"; - Measurement expected = new Measurement(Convert.ToDouble(1E-15), "Megajoule"); - //should be 0.000000000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nJ_to_kJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nJ"; - string targetUnitName = "kJ"; - Measurement expected = new Measurement(Convert.ToDouble(1E-10), "kJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nJ_to_kJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nJ"; - string targetUnitName = "kJ"; - Measurement expected = new Measurement(Convert.ToDouble(1E-12), "kJ"); - //should be 0.000000000000999999999, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nJ_to_GJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nJ"; - string targetUnitName = "GJ"; - Measurement expected = new Measurement(Convert.ToDouble(0), "GJ"); - //should be 0.0000000000000001, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nJ_to_GJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nJ"; - string targetUnitName = "GJ"; - Measurement expected = new Measurement(Convert.ToDouble(0), "GJ"); - //should be 9.99999999E-19, .net rounds to 15 places - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nJ_to_µJ_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "nJ"; - string targetUnitName = "µJ"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "µJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nJ_to_µJ_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "nJ"; - string targetUnitName = "µJ"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "µJ"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - #endregion - #endregion - - #region "Plane Angle Tests" - - #region "Source as Radians" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_rad_to_deg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "rad"; - string targetUnitName = "deg"; - Measurement expected = new Measurement(Convert.ToDouble(5729.57795130823), "deg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_rad_to_deg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "rad"; - string targetUnitName = "deg"; - Measurement expected = new Measurement(Convert.ToDouble(57.2957794557866), "deg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_rad_to_grad_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "rad"; - string targetUnitName = "grad"; - Measurement expected = new Measurement(Convert.ToDouble(6366.19772367581), "grad"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_rad_to_grad_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "rad"; - string targetUnitName = "grad"; - Measurement expected = new Measurement(Convert.ToDouble(63.6619771730962), "grad"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_rad_to_rev_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "rad"; - string targetUnitName = "rev"; - Measurement expected = new Measurement(Convert.ToDouble(15.915494309), "rev"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_rad_to_rev_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "rad"; - string targetUnitName = "rev"; - Measurement expected = new Measurement(Convert.ToDouble(0.159154942930845), "rev"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Degrees" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_deg_to_rad_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "deg"; - string targetUnitName = "rad"; - Measurement expected = new Measurement(Convert.ToDouble(1.74532925199433), "rad"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_deg_to_rad_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "deg"; - string targetUnitName = "rad"; - Measurement expected = new Measurement(Convert.ToDouble(0.01745329250249), "rad"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_deg_to_grad_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "deg"; - string targetUnitName = "grad"; - Measurement expected = new Measurement(Convert.ToDouble(111.111111111111), "grad"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_deg_to_grad_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "deg"; - string targetUnitName = "grad"; - Measurement expected = new Measurement(Convert.ToDouble(1.11111111), "grad"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_deg_to_rev_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "deg"; - string targetUnitName = "rev"; - Measurement expected = new Measurement(Convert.ToDouble(0.277777777777778), "rev"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_deg_to_rev_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "deg"; - string targetUnitName = "rev"; - Measurement expected = new Measurement(Convert.ToDouble(0.002777777775), "rev"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Gradians" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_grad_to_rad_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "grad"; - string targetUnitName = "rad"; - Measurement expected = new Measurement(Convert.ToDouble(1.5707963267949), "rad"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_grad_to_rad_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "grad"; - string targetUnitName = "rad"; - Measurement expected = new Measurement(Convert.ToDouble(0.015707963252241), "rad"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_grad_to_deg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "grad"; - string targetUnitName = "deg"; - Measurement expected = new Measurement(Convert.ToDouble(90), "deg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_grad_to_deg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "grad"; - string targetUnitName = "deg"; - Measurement expected = new Measurement(Convert.ToDouble(0.8999999991), "deg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_grad_to_rev_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "grad"; - string targetUnitName = "rev"; - Measurement expected = new Measurement(Convert.ToDouble(0.25), "rev"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_grad_to_rev_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "grad"; - string targetUnitName = "rev"; - Measurement expected = new Measurement(Convert.ToDouble(0.0024999999975), "rev"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Revolutions" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_rev_to_rad_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "rev"; - string targetUnitName = "rad"; - Measurement expected = new Measurement(Convert.ToDouble(628.318530725441), "rad"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_rev_to_rad_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "rev"; - string targetUnitName = "rad"; - Measurement expected = new Measurement(Convert.ToDouble(6.28318530097123), "rad"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_rev_to_deg_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "rev"; - string targetUnitName = "deg"; - Measurement expected = new Measurement(Convert.ToDouble(36000), "deg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_rev_to_deg_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "rev"; - string targetUnitName = "deg"; - Measurement expected = new Measurement(Convert.ToDouble(359.99999964), "deg"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_rev_to_grad_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "rev"; - string targetUnitName = "grad"; - Measurement expected = new Measurement(Convert.ToDouble(40000), "grad"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_rev_to_grad_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "rev"; - string targetUnitName = "grad"; - Measurement expected = new Measurement(Convert.ToDouble(399.9999996), "grad"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #endregion - - #region "Volume Tests" - #region "Source as Cubic Inches" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in3_to_ft3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in3"; - string targetUnitName = "ft3"; - Measurement expected = new Measurement(Convert.ToDouble(0.05787037037037), "ft3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in3_to_ft3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in3"; - string targetUnitName = "ft3"; - Measurement expected = new Measurement(Convert.ToDouble(0.000578703703125), "ft3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in3_to_yd3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in3"; - string targetUnitName = "yd3"; - Measurement expected = new Measurement(Convert.ToDouble(0.002143347050754), "yd3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in3_to_yd3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in3"; - string targetUnitName = "yd3"; - Measurement expected = new Measurement(Convert.ToDouble(2.1433470486E-05), "yd3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in3_to_m3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in3"; - string targetUnitName = "m3"; - Measurement expected = new Measurement(Convert.ToDouble(0.0016387064), "m3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in3_to_m3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in3"; - string targetUnitName = "m3"; - Measurement expected = new Measurement(Convert.ToDouble(1.6387063984E-05), "m3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in3_to_cc_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in3"; - string targetUnitName = "cc"; - Measurement expected = new Measurement(Convert.ToDouble(1638.7064), "cc"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in3_to_cc_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in3"; - string targetUnitName = "cc"; - Measurement expected = new Measurement(Convert.ToDouble(16.387063983613), "cc"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in3_to_L_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in3"; - string targetUnitName = "L"; - Measurement expected = new Measurement(Convert.ToDouble(1.6387064), "L"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in3_to_L_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in3"; - string targetUnitName = "L"; - Measurement expected = new Measurement(Convert.ToDouble(0.016387063983613), "L"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in3_to_floz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in3"; - string targetUnitName = "fl oz"; - Measurement expected = new Measurement(Convert.ToDouble(55.4112554112554), "fl oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in3_to_floz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in3"; - string targetUnitName = "fl oz"; - Measurement expected = new Measurement(Convert.ToDouble(0.554112553558442), "fl oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in3_to_gal_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in3"; - string targetUnitName = "gal"; - Measurement expected = new Measurement(Convert.ToDouble(0.432900432900433), "gal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in3_to_gal_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in3"; - string targetUnitName = "gal"; - Measurement expected = new Measurement(Convert.ToDouble(0.004329004324675), "gal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in3_to_pt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in3"; - string targetUnitName = "pt"; - Measurement expected = new Measurement(Convert.ToDouble(3.46320346320346), "pt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in3_to_pt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in3"; - string targetUnitName = "pt"; - Measurement expected = new Measurement(Convert.ToDouble(0.034632034597403), "pt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in3_to_qt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in3"; - string targetUnitName = "qt"; - Measurement expected = new Measurement(Convert.ToDouble(1.73160173160173), "qt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in3_to_qt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in3"; - string targetUnitName = "qt"; - Measurement expected = new Measurement(Convert.ToDouble(0.017316017298701), "qt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Cubic Feet" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft3_to_in3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft3"; - string targetUnitName = "in3"; - Measurement expected = new Measurement(Convert.ToDouble(172800), "in3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft3_to_in3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft3"; - string targetUnitName = "in3"; - Measurement expected = new Measurement(Convert.ToDouble(1727.999998272), "in3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft3_to_yd3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft3"; - string targetUnitName = "yd3"; - Measurement expected = new Measurement(Convert.ToDouble(3.7037037037037), "yd3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft3_to_yd3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft3"; - string targetUnitName = "yd3"; - Measurement expected = new Measurement(Convert.ToDouble(0.037037037), "yd3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft3_to_m3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft3"; - string targetUnitName = "m3"; - Measurement expected = new Measurement(Convert.ToDouble(2.8316846592), "m3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft3_to_m3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft3"; - string targetUnitName = "m3"; - Measurement expected = new Measurement(Convert.ToDouble(0.028316846563683), "m3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft3_to_cc_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft3"; - string targetUnitName = "cc"; - Measurement expected = new Measurement(Convert.ToDouble(2831684.6592), "cc"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft3_to_cc_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft3"; - string targetUnitName = "cc"; - Measurement expected = new Measurement(Convert.ToDouble(28316.8465636832), "cc"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft3_to_L_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft3"; - string targetUnitName = "L"; - Measurement expected = new Measurement(Convert.ToDouble(2831.6846592), "L"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft3_to_L_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft3"; - string targetUnitName = "L"; - Measurement expected = new Measurement(Convert.ToDouble(28.3168465636832), "L"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft3_to_floz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft3"; - string targetUnitName = "fl oz"; - Measurement expected = new Measurement(Convert.ToDouble(95750.6493506493), "fl oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft3_to_floz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft3"; - string targetUnitName = "fl oz"; - Measurement expected = new Measurement(Convert.ToDouble(957.506492548987), "fl oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft3_to_gal_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft3"; - string targetUnitName = "gal"; - Measurement expected = new Measurement(Convert.ToDouble(748.051948051948), "gal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft3_to_gal_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft3"; - string targetUnitName = "gal"; - Measurement expected = new Measurement(Convert.ToDouble(7.48051947303896), "gal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft3_to_pt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft3"; - string targetUnitName = "pt"; - Measurement expected = new Measurement(Convert.ToDouble(5984.41558441558), "pt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft3_to_pt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft3"; - string targetUnitName = "pt"; - Measurement expected = new Measurement(Convert.ToDouble(59.8441557843117), "pt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft3_to_qt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft3"; - string targetUnitName = "qt"; - Measurement expected = new Measurement(Convert.ToDouble(2992.20779220779), "qt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft3_to_qt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft3"; - string targetUnitName = "qt"; - Measurement expected = new Measurement(Convert.ToDouble(29.9220778921558), "qt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Cubic Yards" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd3_to_in3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd3"; - string targetUnitName = "in3"; - Measurement expected = new Measurement(Convert.ToDouble(4665600), "in3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd3_to_in3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd3"; - string targetUnitName = "in3"; - Measurement expected = new Measurement(Convert.ToDouble(46655.999953344), "in3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd3_to_ft3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd3"; - string targetUnitName = "ft3"; - Measurement expected = new Measurement(Convert.ToDouble(2700), "ft3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd3_to_ft3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd3"; - string targetUnitName = "ft3"; - Measurement expected = new Measurement(Convert.ToDouble(26.999999973), "ft3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd3_to_m3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd3"; - string targetUnitName = "m3"; - Measurement expected = new Measurement(Convert.ToDouble(76.4554857984), "m3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd3_to_m3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd3"; - string targetUnitName = "m3"; - Measurement expected = new Measurement(Convert.ToDouble(0.764554857219445), "m3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd3_to_cc_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd3"; - string targetUnitName = "cc"; - Measurement expected = new Measurement(Convert.ToDouble(76455485.7984), "cc"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd3_to_cc_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd3"; - string targetUnitName = "cc"; - Measurement expected = new Measurement(Convert.ToDouble(764554.857219445), "cc"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd3_to_L_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd3"; - string targetUnitName = "L"; - Measurement expected = new Measurement(Convert.ToDouble(76455.4857984), "L"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd3_to_L_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd3"; - string targetUnitName = "L"; - Measurement expected = new Measurement(Convert.ToDouble(764.554857219445), "L"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd3_to_floz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd3"; - string targetUnitName = "fl oz"; - Measurement expected = new Measurement(Convert.ToDouble(2585267.53246753), "fl oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd3_to_floz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd3"; - string targetUnitName = "fl oz"; - Measurement expected = new Measurement(Convert.ToDouble(25852.6752988226), "fl oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd3_to_gal_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd3"; - string targetUnitName = "gal"; - Measurement expected = new Measurement(Convert.ToDouble(20197.4025974026), "gal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd3_to_gal_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd3"; - string targetUnitName = "gal"; - Measurement expected = new Measurement(Convert.ToDouble(201.974025772052), "gal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd3_to_pt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd3"; - string targetUnitName = "pt"; - Measurement expected = new Measurement(Convert.ToDouble(161579.220779221), "pt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd3_to_pt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd3"; - string targetUnitName = "pt"; - Measurement expected = new Measurement(Convert.ToDouble(1615.79220617642), "pt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd3_to_qt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd3"; - string targetUnitName = "qt"; - Measurement expected = new Measurement(Convert.ToDouble(80789.6103896104), "qt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd3_to_qt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd3"; - string targetUnitName = "qt"; - Measurement expected = new Measurement(Convert.ToDouble(807.896103088208), "qt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Cubic Meters" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m3_to_in3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m3"; - string targetUnitName = "in3"; - Measurement expected = new Measurement(Convert.ToDouble(6102374.40947323), "in3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m3_to_in3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m3"; - string targetUnitName = "in3"; - Measurement expected = new Measurement(Convert.ToDouble(61023.7440337085), "in3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m3_to_ft3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m3"; - string targetUnitName = "ft3"; - Measurement expected = new Measurement(Convert.ToDouble(3531.46667214886), "ft3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m3_to_ft3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m3"; - string targetUnitName = "ft3"; - Measurement expected = new Measurement(Convert.ToDouble(35.3146666861739), "ft3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m3_to_yd3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m3"; - string targetUnitName = "yd3"; - Measurement expected = new Measurement(Convert.ToDouble(130.795061931439), "yd3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m3_to_yd3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m3"; - string targetUnitName = "yd3"; - Measurement expected = new Measurement(Convert.ToDouble(1.30795061800644), "yd3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m3_to_cc_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m3"; - string targetUnitName = "cc"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "cc"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m3_to_cc_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m3"; - string targetUnitName = "cc"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "cc"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m3_to_L_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m3"; - string targetUnitName = "L"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "L"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m3_to_L_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m3"; - string targetUnitName = "L"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "L"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m3_to_floz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m3"; - string targetUnitName = "fl oz"; - Measurement expected = new Measurement(Convert.ToDouble(3381402.2701843), "fl oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m3_to_floz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m3"; - string targetUnitName = "fl oz"; - Measurement expected = new Measurement(Convert.ToDouble(33814.022668029), "fl oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m3_to_gal_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m3"; - string targetUnitName = "gal"; - Measurement expected = new Measurement(Convert.ToDouble(26417.2052358148), "gal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m3_to_gal_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m3"; - string targetUnitName = "gal"; - Measurement expected = new Measurement(Convert.ToDouble(264.172052093976), "gal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m3_to_pt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m3"; - string targetUnitName = "pt"; - Measurement expected = new Measurement(Convert.ToDouble(211337.641886519), "pt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m3_to_pt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m3"; - string targetUnitName = "pt"; - Measurement expected = new Measurement(Convert.ToDouble(2113.37641675181), "pt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m3_to_qt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m3"; - string targetUnitName = "qt"; - Measurement expected = new Measurement(Convert.ToDouble(105668.820943259), "qt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m3_to_qt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m3"; - string targetUnitName = "qt"; - Measurement expected = new Measurement(Convert.ToDouble(1056.68820837591), "qt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Cubic Centimeters" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cc_to_in3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cc"; - string targetUnitName = "in3"; - Measurement expected = new Measurement(Convert.ToDouble(6.10237440947323), "in3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cc_to_in3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cc"; - string targetUnitName = "in3"; - Measurement expected = new Measurement(Convert.ToDouble(0.061023744033709), "in3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cc_to_ft3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cc"; - string targetUnitName = "ft3"; - Measurement expected = new Measurement(Convert.ToDouble(0.003531466672149), "ft3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cc_to_ft3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cc"; - string targetUnitName = "ft3"; - Measurement expected = new Measurement(Convert.ToDouble(3.5314666686E-05), "ft3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cc_to_yd3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cc"; - string targetUnitName = "yd3"; - Measurement expected = new Measurement(Convert.ToDouble(0.000130795061931), "yd3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cc_to_yd3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cc"; - string targetUnitName = "yd3"; - Measurement expected = new Measurement(Convert.ToDouble(1.307950618E-06), "yd3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cc_to_m3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cc"; - string targetUnitName = "m3"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "m3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cc_to_m3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cc"; - string targetUnitName = "m3"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "m3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cc_to_L_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cc"; - string targetUnitName = "L"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "L"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cc_to_L_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cc"; - string targetUnitName = "L"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "L"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cc_to_floz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cc"; - string targetUnitName = "fl oz"; - Measurement expected = new Measurement(Convert.ToDouble(3.3814022701843), "fl oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cc_to_floz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cc"; - string targetUnitName = "fl oz"; - Measurement expected = new Measurement(Convert.ToDouble(0.033814022668029), "fl oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cc_to_gal_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cc"; - string targetUnitName = "gal"; - Measurement expected = new Measurement(Convert.ToDouble(0.026417205235815), "gal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cc_to_gal_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cc"; - string targetUnitName = "gal"; - Measurement expected = new Measurement(Convert.ToDouble(0.000264172052094), "gal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cc_to_pt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cc"; - string targetUnitName = "pt"; - Measurement expected = new Measurement(Convert.ToDouble(0.211337641886519), "pt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cc_to_pt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cc"; - string targetUnitName = "pt"; - Measurement expected = new Measurement(Convert.ToDouble(0.002113376416752), "pt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cc_to_qt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cc"; - string targetUnitName = "qt"; - Measurement expected = new Measurement(Convert.ToDouble(0.105668820943259), "qt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cc_to_qt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cc"; - string targetUnitName = "qt"; - Measurement expected = new Measurement(Convert.ToDouble(0.001056688208376), "qt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Liters" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_L_to_in3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "L"; - string targetUnitName = "in3"; - Measurement expected = new Measurement(Convert.ToDouble(6102.37440947323), "in3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_L_to_in3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "L"; - string targetUnitName = "in3"; - Measurement expected = new Measurement(Convert.ToDouble(61.0237440337085), "in3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_L_to_ft3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "L"; - string targetUnitName = "ft3"; - Measurement expected = new Measurement(Convert.ToDouble(3.53146667214886), "ft3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_L_to_ft3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "L"; - string targetUnitName = "ft3"; - Measurement expected = new Measurement(Convert.ToDouble(0.035314666686174), "ft3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_L_to_yd3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "L"; - string targetUnitName = "yd3"; - Measurement expected = new Measurement(Convert.ToDouble(0.130795061931439), "yd3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_L_to_yd3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "L"; - string targetUnitName = "yd3"; - Measurement expected = new Measurement(Convert.ToDouble(0.001307950618006), "yd3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_L_to_m3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "L"; - string targetUnitName = "m3"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "m3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_L_to_m3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "L"; - string targetUnitName = "m3"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "m3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_L_to_cc_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "L"; - string targetUnitName = "cc"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "cc"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_L_to_cc_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "L"; - string targetUnitName = "cc"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "cc"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_L_to_floz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "L"; - string targetUnitName = "fl oz"; - Measurement expected = new Measurement(Convert.ToDouble(3381.4022701843), "fl oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_L_to_floz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "L"; - string targetUnitName = "fl oz"; - Measurement expected = new Measurement(Convert.ToDouble(33.814022668029), "fl oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_L_to_gal_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "L"; - string targetUnitName = "gal"; - Measurement expected = new Measurement(Convert.ToDouble(26.4172052358148), "gal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_L_to_gal_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "L"; - string targetUnitName = "gal"; - Measurement expected = new Measurement(Convert.ToDouble(0.264172052093976), "gal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_L_to_pt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "L"; - string targetUnitName = "pt"; - Measurement expected = new Measurement(Convert.ToDouble(211.337641886519), "pt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_L_to_pt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "L"; - string targetUnitName = "pt"; - Measurement expected = new Measurement(Convert.ToDouble(2.11337641675181), "pt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_L_to_qt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "L"; - string targetUnitName = "qt"; - Measurement expected = new Measurement(Convert.ToDouble(105.668820943259), "qt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_L_to_qt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "L"; - string targetUnitName = "qt"; - Measurement expected = new Measurement(Convert.ToDouble(1.05668820837591), "qt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Fluid Ounces" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_floz_to_in3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "fl oz"; - string targetUnitName = "in3"; - Measurement expected = new Measurement(Convert.ToDouble(180.46875), "in3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_floz_to_in3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "fl oz"; - string targetUnitName = "in3"; - Measurement expected = new Measurement(Convert.ToDouble(1.80468749819531), "in3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_floz_to_ft3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "fl oz"; - string targetUnitName = "ft3"; - Measurement expected = new Measurement(Convert.ToDouble(0.104437934027778), "ft3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_floz_to_ft3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "fl oz"; - string targetUnitName = "ft3"; - Measurement expected = new Measurement(Convert.ToDouble(0.001044379339233), "ft3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_floz_to_yd3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "fl oz"; - string targetUnitName = "yd3"; - Measurement expected = new Measurement(Convert.ToDouble(0.003868071630658), "yd3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_floz_to_yd3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "fl oz"; - string targetUnitName = "yd3"; - Measurement expected = new Measurement(Convert.ToDouble(3.8680716268E-05), "yd3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_floz_to_m3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "fl oz"; - string targetUnitName = "m3"; - Measurement expected = new Measurement(Convert.ToDouble(0.00295735295625), "m3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_floz_to_m3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "fl oz"; - string targetUnitName = "m3"; - Measurement expected = new Measurement(Convert.ToDouble(2.9573529533E-05), "m3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_floz_to_cc_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "fl oz"; - string targetUnitName = "cc"; - Measurement expected = new Measurement(Convert.ToDouble(2957.35295625), "cc"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_floz_to_cc_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "fl oz"; - string targetUnitName = "cc"; - Measurement expected = new Measurement(Convert.ToDouble(29.5735295329265), "cc"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_floz_to_L_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "fl oz"; - string targetUnitName = "L"; - Measurement expected = new Measurement(Convert.ToDouble(2.95735295625), "L"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_floz_to_L_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "fl oz"; - string targetUnitName = "L"; - Measurement expected = new Measurement(Convert.ToDouble(0.029573529532926), "L"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_floz_to_gal_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "fl oz"; - string targetUnitName = "gal"; - Measurement expected = new Measurement(Convert.ToDouble(0.78125), "gal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_floz_to_gal_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "fl oz"; - string targetUnitName = "gal"; - Measurement expected = new Measurement(Convert.ToDouble(0.007812499992188), "gal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_floz_to_pt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "fl oz"; - string targetUnitName = "pt"; - Measurement expected = new Measurement(Convert.ToDouble(6.25), "pt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_floz_to_pt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "fl oz"; - string targetUnitName = "pt"; - Measurement expected = new Measurement(Convert.ToDouble(0.0624999999375), "pt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_floz_to_qt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "fl oz"; - string targetUnitName = "qt"; - Measurement expected = new Measurement(Convert.ToDouble(3.125), "qt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_floz_to_qt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "fl oz"; - string targetUnitName = "qt"; - Measurement expected = new Measurement(Convert.ToDouble(0.03124999996875), "qt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Gallons" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_gal_to_in3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "gal"; - string targetUnitName = "in3"; - Measurement expected = new Measurement(Convert.ToDouble(23100), "in3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_gal_to_in3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "gal"; - string targetUnitName = "in3"; - Measurement expected = new Measurement(Convert.ToDouble(230.999999769), "in3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_gal_to_ft3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "gal"; - string targetUnitName = "ft3"; - Measurement expected = new Measurement(Convert.ToDouble(13.3680555555556), "ft3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_gal_to_ft3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "gal"; - string targetUnitName = "ft3"; - Measurement expected = new Measurement(Convert.ToDouble(0.133680555421875), "ft3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_gal_to_yd3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "gal"; - string targetUnitName = "yd3"; - Measurement expected = new Measurement(Convert.ToDouble(0.49511316872428), "yd3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_gal_to_yd3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "gal"; - string targetUnitName = "yd3"; - Measurement expected = new Measurement(Convert.ToDouble(0.004951131682292), "yd3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_gal_to_m3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "gal"; - string targetUnitName = "m3"; - Measurement expected = new Measurement(Convert.ToDouble(0.3785411784), "m3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_gal_to_m3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "gal"; - string targetUnitName = "m3"; - Measurement expected = new Measurement(Convert.ToDouble(0.003785411780215), "m3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_gal_to_cc_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "gal"; - string targetUnitName = "cc"; - Measurement expected = new Measurement(Convert.ToDouble(378541.1784), "cc"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_gal_to_cc_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "gal"; - string targetUnitName = "cc"; - Measurement expected = new Measurement(Convert.ToDouble(3785.41178021459), "cc"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_gal_to_L_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "gal"; - string targetUnitName = "L"; - Measurement expected = new Measurement(Convert.ToDouble(378.5411784), "L"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_gal_to_L_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "gal"; - string targetUnitName = "L"; - Measurement expected = new Measurement(Convert.ToDouble(3.78541178021459), "L"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_gal_to_floz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "gal"; - string targetUnitName = "fl oz"; - Measurement expected = new Measurement(Convert.ToDouble(12800), "fl oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_gal_to_floz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "gal"; - string targetUnitName = "fl oz"; - Measurement expected = new Measurement(Convert.ToDouble(127.999999872), "fl oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_gal_to_pt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "gal"; - string targetUnitName = "pt"; - Measurement expected = new Measurement(Convert.ToDouble(800), "pt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_gal_to_pt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "gal"; - string targetUnitName = "pt"; - Measurement expected = new Measurement(Convert.ToDouble(7.999999992), "pt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_gal_to_qt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "gal"; - string targetUnitName = "qt"; - Measurement expected = new Measurement(Convert.ToDouble(400), "qt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_gal_to_qt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "gal"; - string targetUnitName = "qt"; - Measurement expected = new Measurement(Convert.ToDouble(3.999999996), "qt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Pints" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_pt_to_in3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "pt"; - string targetUnitName = "in3"; - Measurement expected = new Measurement(Convert.ToDouble(2887.5), "in3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_pt_to_in3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "pt"; - string targetUnitName = "in3"; - Measurement expected = new Measurement(Convert.ToDouble(28.874999971125), "in3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_pt_to_ft3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "pt"; - string targetUnitName = "ft3"; - Measurement expected = new Measurement(Convert.ToDouble(1.67100694444444), "ft3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_pt_to_ft3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "pt"; - string targetUnitName = "ft3"; - Measurement expected = new Measurement(Convert.ToDouble(0.016710069427734), "ft3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_pt_to_yd3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "pt"; - string targetUnitName = "yd3"; - Measurement expected = new Measurement(Convert.ToDouble(0.061889146090535), "yd3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_pt_to_yd3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "pt"; - string targetUnitName = "yd3"; - Measurement expected = new Measurement(Convert.ToDouble(0.000618891460286), "yd3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_pt_to_m3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "pt"; - string targetUnitName = "m3"; - Measurement expected = new Measurement(Convert.ToDouble(0.0473176473), "m3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_pt_to_m3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "pt"; - string targetUnitName = "m3"; - Measurement expected = new Measurement(Convert.ToDouble(0.000473176472527), "m3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_pt_to_cc_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "pt"; - string targetUnitName = "cc"; - Measurement expected = new Measurement(Convert.ToDouble(47317.6473), "cc"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_pt_to_cc_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "pt"; - string targetUnitName = "cc"; - Measurement expected = new Measurement(Convert.ToDouble(473.176472526824), "cc"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_pt_to_L_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "pt"; - string targetUnitName = "L"; - Measurement expected = new Measurement(Convert.ToDouble(47.3176473), "L"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_pt_to_L_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "pt"; - string targetUnitName = "L"; - Measurement expected = new Measurement(Convert.ToDouble(0.473176472526824), "L"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_pt_to_floz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "pt"; - string targetUnitName = "fl oz"; - Measurement expected = new Measurement(Convert.ToDouble(1600), "fl oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_pt_to_floz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "pt"; - string targetUnitName = "fl oz"; - Measurement expected = new Measurement(Convert.ToDouble(15.999999984), "fl oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_pt_to_gal_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "pt"; - string targetUnitName = "gal"; - Measurement expected = new Measurement(Convert.ToDouble(12.5), "gal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_pt_to_gal_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "pt"; - string targetUnitName = "gal"; - Measurement expected = new Measurement(Convert.ToDouble(0.124999999875), "gal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_pt_to_qt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "pt"; - string targetUnitName = "qt"; - Measurement expected = new Measurement(Convert.ToDouble(50), "qt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_pt_to_qt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "pt"; - string targetUnitName = "qt"; - Measurement expected = new Measurement(Convert.ToDouble(0.4999999995), "qt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Quarts" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_qt_to_in3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "qt"; - string targetUnitName = "in3"; - Measurement expected = new Measurement(Convert.ToDouble(5775), "in3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_qt_to_in3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "qt"; - string targetUnitName = "in3"; - Measurement expected = new Measurement(Convert.ToDouble(57.74999994225), "in3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_qt_to_ft3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "qt"; - string targetUnitName = "ft3"; - Measurement expected = new Measurement(Convert.ToDouble(3.34201388888889), "ft3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_qt_to_ft3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "qt"; - string targetUnitName = "ft3"; - Measurement expected = new Measurement(Convert.ToDouble(0.033420138855469), "ft3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_qt_to_yd3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "qt"; - string targetUnitName = "yd3"; - Measurement expected = new Measurement(Convert.ToDouble(0.12377829218107), "yd3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_qt_to_yd3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "qt"; - string targetUnitName = "yd3"; - Measurement expected = new Measurement(Convert.ToDouble(0.001237782920573), "yd3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_qt_to_m3_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "qt"; - string targetUnitName = "m3"; - Measurement expected = new Measurement(Convert.ToDouble(0.0946352946), "m3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_qt_to_m3_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "qt"; - string targetUnitName = "m3"; - Measurement expected = new Measurement(Convert.ToDouble(0.000946352945054), "m3"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_qt_to_cc_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "qt"; - string targetUnitName = "cc"; - Measurement expected = new Measurement(Convert.ToDouble(94635.2946), "cc"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_qt_to_cc_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "qt"; - string targetUnitName = "cc"; - Measurement expected = new Measurement(Convert.ToDouble(946.352945053647), "cc"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_qt_to_L_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "qt"; - string targetUnitName = "L"; - Measurement expected = new Measurement(Convert.ToDouble(94.6352946), "L"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_qt_to_L_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "qt"; - string targetUnitName = "L"; - Measurement expected = new Measurement(Convert.ToDouble(0.946352945053647), "L"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_qt_to_floz_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "qt"; - string targetUnitName = "fl oz"; - Measurement expected = new Measurement(Convert.ToDouble(3200), "fl oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_qt_to_floz_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "qt"; - string targetUnitName = "fl oz"; - Measurement expected = new Measurement(Convert.ToDouble(31.999999968), "fl oz"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_qt_to_gal_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "qt"; - string targetUnitName = "gal"; - Measurement expected = new Measurement(Convert.ToDouble(25), "gal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_qt_to_gal_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "qt"; - string targetUnitName = "gal"; - Measurement expected = new Measurement(Convert.ToDouble(0.24999999975), "gal"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_qt_to_pt_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "qt"; - string targetUnitName = "pt"; - Measurement expected = new Measurement(Convert.ToDouble(200), "pt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_qt_to_pt_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "qt"; - string targetUnitName = "pt"; - Measurement expected = new Measurement(Convert.ToDouble(1.999999998), "pt"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - #endregion - #endregion - } -} diff --git a/Units.Test/UnitConverterTest4.cs b/Units.Test/UnitConverterTest4.cs deleted file mode 100644 index 5e18554..0000000 --- a/Units.Test/UnitConverterTest4.cs +++ /dev/null @@ -1,2967 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Units; - -namespace Units.Test -{ - [TestClass()] - public class UnitConverterTest4 - { - private TestContext testContextInstance; - - private UnitProvider unitPro = new UnitProvider(); - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get { return testContextInstance; } - set { testContextInstance = value; } - } - - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ _ - //Public Sub MyTestCleanup() - //End Sub - // - - #endregion - - #region "UnitConverter.ConvertUnits" - - #region "Area Tests" - #region "Source as Square Meters" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m2_to_ft2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m2"; - string targetUnitName = "ft2"; - Measurement expected = new Measurement(Convert.ToDouble(1076.39104167097), "ft2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m2_to_ft2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m2"; - string targetUnitName = "ft2"; - Measurement expected = new Measurement(Convert.ToDouble(10.7639104059458), "ft2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m2_to_mi2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m2"; - string targetUnitName = "mi2"; - Measurement expected = new Measurement(Convert.ToDouble(3.8610215854E-05), "mi2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m2_to_mi2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m2"; - string targetUnitName = "mi2"; - Measurement expected = new Measurement(Convert.ToDouble(3.86102158E-07), "mi2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m2_to_acre_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m2"; - string targetUnitName = "acre"; - Measurement expected = new Measurement(Convert.ToDouble(0.024710538146717), "acre"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m2_to_acre_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m2"; - string targetUnitName = "acre"; - Measurement expected = new Measurement(Convert.ToDouble(0.00024710538122), "acre"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m2_to_in2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m2"; - string targetUnitName = "in2"; - Measurement expected = new Measurement(Convert.ToDouble(155000.31000062), "in2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m2_to_in2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m2"; - string targetUnitName = "in2"; - Measurement expected = new Measurement(Convert.ToDouble(1550.0030984562), "in2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m2_to_cm2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m2"; - string targetUnitName = "cm2"; - Measurement expected = new Measurement(Convert.ToDouble(1000000), "cm2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m2_to_cm2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m2"; - string targetUnitName = "cm2"; - Measurement expected = new Measurement(Convert.ToDouble(9999.99999), "cm2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m2_to_yd2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m2"; - string targetUnitName = "yd2"; - Measurement expected = new Measurement(Convert.ToDouble(119.599004630108), "yd2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m2_to_yd2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m2"; - string targetUnitName = "yd2"; - Measurement expected = new Measurement(Convert.ToDouble(1.19599004510509), "yd2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m2_to_km2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m2"; - string targetUnitName = "km2"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "km2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m2_to_km2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m2"; - string targetUnitName = "km2"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "km2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m2_to_ha_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "m2"; - string targetUnitName = "ha"; - Measurement expected = new Measurement(Convert.ToDouble(0.01), "ha"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_m2_to_ha_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "m2"; - string targetUnitName = "ha"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-05), "ha"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Square Feet" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft2_to_m2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft2"; - string targetUnitName = "m2"; - Measurement expected = new Measurement(Convert.ToDouble(9.290304), "m2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft2_to_m2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft2"; - string targetUnitName = "m2"; - Measurement expected = new Measurement(Convert.ToDouble(0.092903039907097), "m2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft2_to_mi2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft2"; - string targetUnitName = "mi2"; - Measurement expected = new Measurement(Convert.ToDouble(3.587006428E-06), "mi2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft2_to_mi2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft2"; - string targetUnitName = "mi2"; - Measurement expected = new Measurement(Convert.ToDouble(3.5870064E-08), "mi2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft2_to_acre_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft2"; - string targetUnitName = "acre"; - Measurement expected = new Measurement(Convert.ToDouble(0.002295684113866), "acre"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft2_to_acre_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft2"; - string targetUnitName = "acre"; - Measurement expected = new Measurement(Convert.ToDouble(2.2956841116E-05), "acre"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft2_to_in2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft2"; - string targetUnitName = "in2"; - Measurement expected = new Measurement(Convert.ToDouble(14400), "in2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft2_to_in2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft2"; - string targetUnitName = "in2"; - Measurement expected = new Measurement(Convert.ToDouble(143.999999856), "in2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft2_to_cm2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft2"; - string targetUnitName = "cm2"; - Measurement expected = new Measurement(Convert.ToDouble(92903.04), "cm2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft2_to_cm2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft2"; - string targetUnitName = "cm2"; - Measurement expected = new Measurement(Convert.ToDouble(929.03039907097), "cm2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft2_to_yd2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft2"; - string targetUnitName = "yd2"; - Measurement expected = new Measurement(Convert.ToDouble(11.1111111111111), "yd2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft2_to_yd2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft2"; - string targetUnitName = "yd2"; - Measurement expected = new Measurement(Convert.ToDouble(0.111111111), "yd2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft2_to_km2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft2"; - string targetUnitName = "km2"; - Measurement expected = new Measurement(Convert.ToDouble(9.290304E-06), "km2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft2_to_km2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft2"; - string targetUnitName = "km2"; - Measurement expected = new Measurement(Convert.ToDouble(9.290304E-08), "km2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft2_to_ha_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ft2"; - string targetUnitName = "ha"; - Measurement expected = new Measurement(Convert.ToDouble(0.0009290304), "ha"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ft2_to_ha_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ft2"; - string targetUnitName = "ha"; - Measurement expected = new Measurement(Convert.ToDouble(9.290303991E-06), "ha"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Square Miles" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mi2_to_m2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi2"; - string targetUnitName = "m2"; - Measurement expected = new Measurement(Convert.ToDouble(258998811.0336), "m2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mi2_to_m2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi2"; - string targetUnitName = "m2"; - Measurement expected = new Measurement(Convert.ToDouble(2589988.10774601), "m2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mi2_to_ft2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi2"; - string targetUnitName = "ft2"; - Measurement expected = new Measurement(Convert.ToDouble(2787840000L), "ft2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mi2_to_ft2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi2"; - string targetUnitName = "ft2"; - Measurement expected = new Measurement(Convert.ToDouble(27878399.9721216), "ft2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mi2_to_acre_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi2"; - string targetUnitName = "acre"; - Measurement expected = new Measurement(Convert.ToDouble(64000), "acre"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mi2_to_acre_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi2"; - string targetUnitName = "acre"; - Measurement expected = new Measurement(Convert.ToDouble(639.99999936), "acre"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mi2_to_in2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi2"; - string targetUnitName = "in2"; - Measurement expected = new Measurement(Convert.ToDouble(401448960000L), "in2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mi2_to_in2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi2"; - string targetUnitName = "in2"; - Measurement expected = new Measurement(Convert.ToDouble(4014489595.98551), "in2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mi2_to_cm2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi2"; - string targetUnitName = "cm2"; - Measurement expected = new Measurement(Convert.ToDouble(2589988110336L), "cm2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mi2_to_cm2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi2"; - string targetUnitName = "cm2"; - Measurement expected = new Measurement(Convert.ToDouble(25899881077.46), "cm2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mi2_to_yd2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi2"; - string targetUnitName = "yd2"; - Measurement expected = new Measurement(Convert.ToDouble(309760000), "yd2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mi2_to_yd2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi2"; - string targetUnitName = "yd2"; - Measurement expected = new Measurement(Convert.ToDouble(3097599.9969024), "yd2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mi2_to_km2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi2"; - string targetUnitName = "km2"; - Measurement expected = new Measurement(Convert.ToDouble(258.9988110336), "km2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mi2_to_km2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi2"; - string targetUnitName = "km2"; - Measurement expected = new Measurement(Convert.ToDouble(2.589988107746), "km2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mi2_to_ha_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mi2"; - string targetUnitName = "ha"; - Measurement expected = new Measurement(Convert.ToDouble(25899.88110336), "ha"); - //should be 25899.88110336, .net conversion bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mi2_to_ha_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mi2"; - string targetUnitName = "ha"; - Measurement expected = new Measurement(Convert.ToDouble(258.998810774601), "ha"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Acres" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_acre_to_m2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "acre"; - string targetUnitName = "m2"; - Measurement expected = new Measurement(Convert.ToDouble(404685.64224), "m2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_acre_to_m2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "acre"; - string targetUnitName = "m2"; - Measurement expected = new Measurement(Convert.ToDouble(4046.85641835314), "m2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_acre_to_ft2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "acre"; - string targetUnitName = "ft2"; - Measurement expected = new Measurement(Convert.ToDouble(4356000), "ft2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_acre_to_ft2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "acre"; - string targetUnitName = "ft2"; - Measurement expected = new Measurement(Convert.ToDouble(43559.99995644), "ft2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_acre_to_mi2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "acre"; - string targetUnitName = "mi2"; - Measurement expected = new Measurement(Convert.ToDouble(0.15625), "mi2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_acre_to_mi2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "acre"; - string targetUnitName = "mi2"; - Measurement expected = new Measurement(Convert.ToDouble(0.001562499998438), "mi2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_acre_to_in2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "acre"; - string targetUnitName = "in2"; - Measurement expected = new Measurement(Convert.ToDouble(627264000), "in2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_acre_to_in2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "acre"; - string targetUnitName = "in2"; - Measurement expected = new Measurement(Convert.ToDouble(6272639.99372736), "in2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_acre_to_cm2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "acre"; - string targetUnitName = "cm2"; - Measurement expected = new Measurement(Convert.ToDouble(4046856422.4), "cm2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_acre_to_cm2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "acre"; - string targetUnitName = "cm2"; - Measurement expected = new Measurement(Convert.ToDouble(40468564.1835314), "cm2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_acre_to_yd2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "acre"; - string targetUnitName = "yd2"; - Measurement expected = new Measurement(Convert.ToDouble(484000), "yd2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_acre_to_yd2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "acre"; - string targetUnitName = "yd2"; - Measurement expected = new Measurement(Convert.ToDouble(4839.99999516), "yd2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_acre_to_km2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "acre"; - string targetUnitName = "km2"; - Measurement expected = new Measurement(Convert.ToDouble(0.40468564224), "km2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_acre_to_km2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "acre"; - string targetUnitName = "km2"; - Measurement expected = new Measurement(Convert.ToDouble(0.004046856418353), "km2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_acre_to_ha_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "acre"; - string targetUnitName = "ha"; - Measurement expected = new Measurement(Convert.ToDouble(40.468564224), "ha"); - //should be 40.468564224, .net conversion bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_acre_to_ha_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "acre"; - string targetUnitName = "ha"; - Measurement expected = new Measurement(Convert.ToDouble(0.404685641835314), "ha"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Square Inches" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in2_to_m2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in2"; - string targetUnitName = "m2"; - Measurement expected = new Measurement(Convert.ToDouble(0.064516), "m2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in2_to_m2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in2"; - string targetUnitName = "m2"; - Measurement expected = new Measurement(Convert.ToDouble(0.000645159999355), "m2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in2_to_ft2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in2"; - string targetUnitName = "ft2"; - Measurement expected = new Measurement(Convert.ToDouble(0.694444444444444), "ft2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in2_to_ft2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in2"; - string targetUnitName = "ft2"; - Measurement expected = new Measurement(Convert.ToDouble(0.0069444444375), "ft2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in2_to_mi2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in2"; - string targetUnitName = "mi2"; - Measurement expected = new Measurement(Convert.ToDouble(2.4909767E-08), "mi2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in2_to_mi2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in2"; - string targetUnitName = "mi2"; - Measurement expected = new Measurement(Convert.ToDouble(2.49098E-10), "mi2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in2_to_acre_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in2"; - string targetUnitName = "acre"; - Measurement expected = new Measurement(Convert.ToDouble(1.5942250791E-05), "acre"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in2_to_acre_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in2"; - string targetUnitName = "acre"; - Measurement expected = new Measurement(Convert.ToDouble(1.59422508E-07), "acre"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in2_to_cm2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in2"; - string targetUnitName = "cm2"; - Measurement expected = new Measurement(Convert.ToDouble(645.16), "cm2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in2_to_cm2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in2"; - string targetUnitName = "cm2"; - Measurement expected = new Measurement(Convert.ToDouble(6.4515999935484), "cm2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in2_to_yd2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in2"; - string targetUnitName = "yd2"; - Measurement expected = new Measurement(Convert.ToDouble(0.07716049382716), "yd2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in2_to_yd2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in2"; - string targetUnitName = "yd2"; - Measurement expected = new Measurement(Convert.ToDouble(0.0007716049375), "yd2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in2_to_km2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in2"; - string targetUnitName = "km2"; - Measurement expected = new Measurement(Convert.ToDouble(6.4516E-08), "km2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in2_to_km2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in2"; - string targetUnitName = "km2"; - Measurement expected = new Measurement(Convert.ToDouble(6.4516E-10), "km2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in2_to_ha_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "in2"; - string targetUnitName = "ha"; - Measurement expected = new Measurement(Convert.ToDouble(6.4516E-06), "ha"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_in2_to_ha_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "in2"; - string targetUnitName = "ha"; - Measurement expected = new Measurement(Convert.ToDouble(6.4516E-08), "ha"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Square Centimeters" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm2_to_ft2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm2"; - string targetUnitName = "ft2"; - Measurement expected = new Measurement(Convert.ToDouble(0.107639104167097), "ft2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm2_to_ft2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm2"; - string targetUnitName = "ft2"; - Measurement expected = new Measurement(Convert.ToDouble(0.001076391040595), "ft2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm2_to_mi2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm2"; - string targetUnitName = "mi2"; - Measurement expected = new Measurement(Convert.ToDouble(3.861022E-09), "mi2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm2_to_mi2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm2"; - string targetUnitName = "mi2"; - Measurement expected = new Measurement(Convert.ToDouble(3.861E-11), "mi2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm2_to_acre_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm2"; - string targetUnitName = "acre"; - Measurement expected = new Measurement(Convert.ToDouble(2.471053815E-06), "acre"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm2_to_acre_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm2"; - string targetUnitName = "acre"; - Measurement expected = new Measurement(Convert.ToDouble(2.4710538E-08), "acre"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm2_to_in2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm2"; - string targetUnitName = "in2"; - Measurement expected = new Measurement(Convert.ToDouble(15.500031000062), "in2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm2_to_in2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm2"; - string targetUnitName = "in2"; - Measurement expected = new Measurement(Convert.ToDouble(0.15500030984562), "in2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm2_to_m2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm2"; - string targetUnitName = "m2"; - Measurement expected = new Measurement(Convert.ToDouble(0.01), "m2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm2_to_m2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm2"; - string targetUnitName = "m2"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-05), "m2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm2_to_yd2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm2"; - string targetUnitName = "yd2"; - Measurement expected = new Measurement(Convert.ToDouble(0.011959900463011), "yd2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm2_to_yd2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm2"; - string targetUnitName = "yd2"; - Measurement expected = new Measurement(Convert.ToDouble(0.000119599004511), "yd2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm2_to_km2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm2"; - string targetUnitName = "km2"; - Measurement expected = new Measurement(Convert.ToDouble(1E-08), "km2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm2_to_km2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm2"; - string targetUnitName = "km2"; - Measurement expected = new Measurement(Convert.ToDouble(1E-10), "km2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm2_to_ha_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cm2"; - string targetUnitName = "ha"; - Measurement expected = new Measurement(Convert.ToDouble(1E-06), "ha"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cm2_to_ha_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cm2"; - string targetUnitName = "ha"; - Measurement expected = new Measurement(Convert.ToDouble(1E-08), "ha"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Square Yards" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd2_to_m2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd2"; - string targetUnitName = "m2"; - Measurement expected = new Measurement(Convert.ToDouble(83.612736), "m2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd2_to_m2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd2"; - string targetUnitName = "m2"; - Measurement expected = new Measurement(Convert.ToDouble(0.836127359163873), "m2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd2_to_ft2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd2"; - string targetUnitName = "ft2"; - Measurement expected = new Measurement(Convert.ToDouble(900), "ft2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd2_to_ft2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd2"; - string targetUnitName = "ft2"; - Measurement expected = new Measurement(Convert.ToDouble(8.999999991), "ft2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd2_to_mi2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd2"; - string targetUnitName = "mi2"; - Measurement expected = new Measurement(Convert.ToDouble(3.2283057851E-05), "mi2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd2_to_mi2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd2"; - string targetUnitName = "mi2"; - Measurement expected = new Measurement(Convert.ToDouble(3.22830578E-07), "mi2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd2_to_acre_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd2"; - string targetUnitName = "acre"; - Measurement expected = new Measurement(Convert.ToDouble(0.020661157024793), "acre"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd2_to_acre_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd2"; - string targetUnitName = "acre"; - Measurement expected = new Measurement(Convert.ToDouble(0.000206611570041), "acre"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd2_to_in2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd2"; - string targetUnitName = "in2"; - Measurement expected = new Measurement(Convert.ToDouble(129600), "in2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd2_to_in2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd2"; - string targetUnitName = "in2"; - Measurement expected = new Measurement(Convert.ToDouble(1295.999998704), "in2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd2_to_cm2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd2"; - string targetUnitName = "cm2"; - Measurement expected = new Measurement(Convert.ToDouble(836127.36), "cm2"); - //should be 836127.36, .net conversion bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd2_to_cm2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd2"; - string targetUnitName = "cm2"; - Measurement expected = new Measurement(Convert.ToDouble(8361.27359163873), "cm2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd2_to_km2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd2"; - string targetUnitName = "km2"; - Measurement expected = new Measurement(Convert.ToDouble(8.3612736E-05), "km2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd2_to_km2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd2"; - string targetUnitName = "km2"; - Measurement expected = new Measurement(Convert.ToDouble(8.36127359E-07), "km2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd2_to_ha_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "yd2"; - string targetUnitName = "ha"; - Measurement expected = new Measurement(Convert.ToDouble(0.0083612736), "ha"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_yd2_to_ha_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "yd2"; - string targetUnitName = "ha"; - Measurement expected = new Measurement(Convert.ToDouble(8.3612735916E-05), "ha"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Square Kilometers" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km2_to_m2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km2"; - string targetUnitName = "m2"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "m2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km2_to_m2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km2"; - string targetUnitName = "m2"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "m2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km2_to_ft2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km2"; - string targetUnitName = "ft2"; - Measurement expected = new Measurement(Convert.ToDouble(1076391041.67097), "ft2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km2_to_ft2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km2"; - string targetUnitName = "ft2"; - Measurement expected = new Measurement(Convert.ToDouble(10763910.4059458), "ft2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km2_to_mi2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km2"; - string targetUnitName = "mi2"; - Measurement expected = new Measurement(Convert.ToDouble(38.6102158542446), "mi2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km2_to_mi2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km2"; - string targetUnitName = "mi2"; - Measurement expected = new Measurement(Convert.ToDouble(0.386102158156344), "mi2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km2_to_acre_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km2"; - string targetUnitName = "acre"; - Measurement expected = new Measurement(Convert.ToDouble(24710.5381467165), "acre"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km2_to_acre_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km2"; - string targetUnitName = "acre"; - Measurement expected = new Measurement(Convert.ToDouble(247.10538122006), "acre"); - //should be 247.10538122006, .net conversion bug - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km2_to_in2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km2"; - string targetUnitName = "in2"; - Measurement expected = new Measurement(Convert.ToDouble(155000310000.62), "in2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km2_to_in2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km2"; - string targetUnitName = "in2"; - Measurement expected = new Measurement(Convert.ToDouble(1550003098.4562), "in2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km2_to_cm2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km2"; - string targetUnitName = "cm2"; - Measurement expected = new Measurement(Convert.ToDouble(1000000000000L), "cm2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km2_to_cm2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km2"; - string targetUnitName = "cm2"; - Measurement expected = new Measurement(Convert.ToDouble(9999999990L), "cm2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km2_to_yd2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km2"; - string targetUnitName = "yd2"; - Measurement expected = new Measurement(Convert.ToDouble(119599004.630108), "yd2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km2_to_yd2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km2"; - string targetUnitName = "yd2"; - Measurement expected = new Measurement(Convert.ToDouble(1195990.04510509), "yd2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km2_to_ha_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "km2"; - string targetUnitName = "ha"; - Measurement expected = new Measurement(Convert.ToDouble(10000), "ha"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_km2_to_ha_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "km2"; - string targetUnitName = "ha"; - Measurement expected = new Measurement(Convert.ToDouble(99.9999999), "ha"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Hectares" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ha_to_m2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ha"; - string targetUnitName = "m2"; - Measurement expected = new Measurement(Convert.ToDouble(1000000.0), "m2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ha_to_m2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ha"; - string targetUnitName = "m2"; - Measurement expected = new Measurement(Convert.ToDouble(9999.99999), "m2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ha_to_ft2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ha"; - string targetUnitName = "ft2"; - Measurement expected = new Measurement(Convert.ToDouble(10763910.4167097), "ft2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ha_to_ft2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ha"; - string targetUnitName = "ft2"; - Measurement expected = new Measurement(Convert.ToDouble(107639.104059458), "ft2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ha_to_mi2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ha"; - string targetUnitName = "mi2"; - Measurement expected = new Measurement(Convert.ToDouble(0.386102158542446), "mi2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ha_to_mi2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ha"; - string targetUnitName = "mi2"; - Measurement expected = new Measurement(Convert.ToDouble(0.003861021581563), "mi2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ha_to_acre_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ha"; - string targetUnitName = "acre"; - Measurement expected = new Measurement(Convert.ToDouble(247.105381467165), "acre"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ha_to_acre_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ha"; - string targetUnitName = "acre"; - Measurement expected = new Measurement(Convert.ToDouble(2.4710538122006), "acre"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ha_to_in2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ha"; - string targetUnitName = "in2"; - Measurement expected = new Measurement(Convert.ToDouble(1550003100.0062), "in2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ha_to_in2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ha"; - string targetUnitName = "in2"; - Measurement expected = new Measurement(Convert.ToDouble(15500030.984562), "in2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ha_to_cm2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ha"; - string targetUnitName = "cm2"; - Measurement expected = new Measurement(Convert.ToDouble(10000000000L), "cm2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ha_to_cm2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ha"; - string targetUnitName = "cm2"; - Measurement expected = new Measurement(Convert.ToDouble(99999999.9), "cm2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ha_to_yd2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ha"; - string targetUnitName = "yd2"; - Measurement expected = new Measurement(Convert.ToDouble(1195990.04630108), "yd2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ha_to_yd2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ha"; - string targetUnitName = "yd2"; - Measurement expected = new Measurement(Convert.ToDouble(11959.9004510509), "yd2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ha_to_km2_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "ha"; - string targetUnitName = "km2"; - Measurement expected = new Measurement(Convert.ToDouble(1), "km2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_ha_to_km2_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "ha"; - string targetUnitName = "km2"; - Measurement expected = new Measurement(Convert.ToDouble(0.00999999999), "km2"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - #endregion - - #region "Absorbed Radiation Dose Tests" - #region "Source as Gray" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gy_to_cGy_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gy"; - string targetUnitName = "cGy"; - Measurement expected = new Measurement(Convert.ToDouble(10000), "cGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gy_to_cGy_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gy"; - string targetUnitName = "cGy"; - Measurement expected = new Measurement(Convert.ToDouble(99.9999999), "cGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gy_to_mGy_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gy"; - string targetUnitName = "mGy"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "mGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gy_to_mGy_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gy"; - string targetUnitName = "mGy"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "mGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gy_to_µGy_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gy"; - string targetUnitName = "µGy"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "µGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gy_to_µGy_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gy"; - string targetUnitName = "µGy"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "µGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gy_to_kGy_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "Gy"; - string targetUnitName = "kGy"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "kGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_Gy_to_kGy_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "Gy"; - string targetUnitName = "kGy"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "kGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Centigray" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cGy_to_Gy_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cGy"; - string targetUnitName = "Gy"; - Measurement expected = new Measurement(Convert.ToDouble(1), "Gy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cGy_to_Gy_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cGy"; - string targetUnitName = "Gy"; - Measurement expected = new Measurement(Convert.ToDouble(0.00999999999), "Gy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cGy_to_mGy_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cGy"; - string targetUnitName = "mGy"; - Measurement expected = new Measurement(Convert.ToDouble(1000), "mGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cGy_to_mGy_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cGy"; - string targetUnitName = "mGy"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999), "mGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cGy_to_µGy_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cGy"; - string targetUnitName = "µGy"; - Measurement expected = new Measurement(Convert.ToDouble(1000000), "µGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cGy_to_µGy_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cGy"; - string targetUnitName = "µGy"; - Measurement expected = new Measurement(Convert.ToDouble(9999.99999), "µGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cGy_to_kGy_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "cGy"; - string targetUnitName = "kGy"; - Measurement expected = new Measurement(Convert.ToDouble(0.001), "kGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_cGy_to_kGy_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "cGy"; - string targetUnitName = "kGy"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-06), "kGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Milligray" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mGy_to_Gy_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mGy"; - string targetUnitName = "Gy"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "Gy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mGy_to_Gy_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mGy"; - string targetUnitName = "Gy"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "Gy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mGy_to_cGy_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mGy"; - string targetUnitName = "cGy"; - Measurement expected = new Measurement(Convert.ToDouble(10), "cGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mGy_to_cGy_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mGy"; - string targetUnitName = "cGy"; - Measurement expected = new Measurement(Convert.ToDouble(0.0999999999), "cGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mGy_to_µGy_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mGy"; - string targetUnitName = "µGy"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "µGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mGy_to_µGy_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mGy"; - string targetUnitName = "µGy"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "µGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mGy_to_kGy_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "mGy"; - string targetUnitName = "kGy"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "kGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_mGy_to_kGy_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "mGy"; - string targetUnitName = "kGy"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "kGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Microgray" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µGy_to_Gy_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µGy"; - string targetUnitName = "Gy"; - Measurement expected = new Measurement(Convert.ToDouble(0.0001), "Gy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µGy_to_Gy_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µGy"; - string targetUnitName = "Gy"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-07), "Gy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µGy_to_cGy_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µGy"; - string targetUnitName = "cGy"; - Measurement expected = new Measurement(Convert.ToDouble(0.01), "cGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µGy_to_cGy_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µGy"; - string targetUnitName = "cGy"; - Measurement expected = new Measurement(Convert.ToDouble(9.99999999E-05), "cGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µGy_to_mGy_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µGy"; - string targetUnitName = "mGy"; - Measurement expected = new Measurement(Convert.ToDouble(0.1), "mGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µGy_to_mGy_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µGy"; - string targetUnitName = "mGy"; - Measurement expected = new Measurement(Convert.ToDouble(0.000999999999), "mGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µGy_to_kGy_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "µGy"; - string targetUnitName = "kGy"; - Measurement expected = new Measurement(Convert.ToDouble(1E-07), "kGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_µGy_to_kGy_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "µGy"; - string targetUnitName = "kGy"; - Measurement expected = new Measurement(Convert.ToDouble(1E-09), "kGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - - #region "Source as Kilogray" - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kGy_to_Gy_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kGy"; - string targetUnitName = "Gy"; - Measurement expected = new Measurement(Convert.ToDouble(100000), "Gy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kGy_to_Gy_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kGy"; - string targetUnitName = "Gy"; - Measurement expected = new Measurement(Convert.ToDouble(999.999999), "Gy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kGy_to_cGy_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kGy"; - string targetUnitName = "cGy"; - Measurement expected = new Measurement(Convert.ToDouble(10000000), "cGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kGy_to_cGy_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kGy"; - string targetUnitName = "cGy"; - Measurement expected = new Measurement(Convert.ToDouble(99999.9999), "cGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kGy_to_mGy_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kGy"; - string targetUnitName = "mGy"; - Measurement expected = new Measurement(Convert.ToDouble(100000000), "mGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kGy_to_mGy_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kGy"; - string targetUnitName = "mGy"; - Measurement expected = new Measurement(Convert.ToDouble(999999.999), "mGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kGy_to_µGy_Test() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(100); - string currentUnitName = "kGy"; - string targetUnitName = "µGy"; - Measurement expected = new Measurement(Convert.ToDouble(100000000000L), "µGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_kGy_to_µGy_Test2() - { - UnitConverter target = new UnitConverter(); - double value = Convert.ToDouble(0.999999999); - string currentUnitName = "kGy"; - string targetUnitName = "µGy"; - Measurement expected = new Measurement(Convert.ToDouble(999999999), "µGy"); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(value, currentUnitName, targetUnitName); - Assert.AreEqual(expected.Value, actual.Value); - } - - #endregion - #endregion - - #endregion - - #region "UnitConverter.UnitConverter()" - /// - ///A test for UnitConverter Constructor - /// - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverterConstructorTest() - { - UnitConverter target = new UnitConverter(); - Assert.IsNotNull(target); - } - #endregion - - #region "Empty and Null Tests" - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverter_ConvertUnitsNullTest() - { - UnitConverter target = new UnitConverter(); - Measurement expected = new Measurement(0, Result.BadUnit); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(0, null, null); - Assert.AreNotEqual(expected, actual); - Assert.AreEqual(expected.ConversionResult, actual.ConversionResult); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverter_ConvertUnitsNullTest2() - { - UnitConverter target = new UnitConverter(); - Measurement expected = new Measurement(0, Result.BadUnit); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(0, "ft", null); - Assert.AreNotEqual(expected, actual); - Assert.AreEqual(expected.ConversionResult, actual.ConversionResult); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverter_ConvertUnitsNullTest3() - { - UnitConverter target = new UnitConverter(); - Measurement expected = new Measurement(0, Result.BadUnit); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(0, null, "m"); - Assert.AreNotEqual(expected, actual); - Assert.AreEqual(expected.ConversionResult, actual.ConversionResult); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverter_ConvertUnitsEmptyTest() - { - UnitConverter target = new UnitConverter(); - Measurement expected = new Measurement(0, Result.BadUnit); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(0, string.Empty, string.Empty); - Assert.AreNotEqual(expected, actual); - Assert.AreEqual(expected.ConversionResult, actual.ConversionResult); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverter_ConvertUnitsEmptyTest2() - { - UnitConverter target = new UnitConverter(); - Measurement expected = new Measurement(0, Result.BadUnit); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(0, "ft", string.Empty); - Assert.AreNotEqual(expected, actual); - Assert.AreEqual(expected.ConversionResult, actual.ConversionResult); - } - - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] - public void UnitConverter_ConvertUnitsEmptyTest3() - { - UnitConverter target = new UnitConverter(); - Measurement expected = new Measurement(0, Result.BadUnit); - Measurement actual = default(Measurement); - actual = target.ConvertUnits(0, string.Empty, "m"); - Assert.AreNotEqual(expected, actual); - Assert.AreEqual(expected.ConversionResult, actual.ConversionResult); - } - - #endregion - } -} diff --git a/Units.Test/UnitTest.cs b/Units.Test/UnitTest.cs deleted file mode 100644 index c937c5f..0000000 --- a/Units.Test/UnitTest.cs +++ /dev/null @@ -1,427 +0,0 @@ -using System; -using System.Diagnostics.Contracts; -using Units; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System.Collections.ObjectModel; - -/// -///This is a test class for UnitTest and is intended -///to contain all UnitTest Unit Tests -/// -[TestClass()] -public class UnitTest -{ - - private TestContext testContextInstance; - - private UnitProvider unitPro = new UnitProvider(); - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get { return testContextInstance; } - set { testContextInstance = value; } - } - - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ - //Public Sub MyTestCleanup() - //End Sub - // - #endregion - - #region "Unit.Unit()" - [TestMethod()] - public void UnitNewTest() - { - Unit testObj = new Unit(); - - Assert.IsNotNull(testObj); - Assert.IsTrue(testObj.ID == 0); - Assert.IsTrue(string.IsNullOrEmpty(testObj.DefaultSymbol)); - Assert.IsNull(testObj.UnitType); - Assert.IsNotNull(testObj.Symbols); - Assert.IsTrue(testObj.Symbols.Count == 0); - Assert.IsNotNull(testObj.Modifiers); - Assert.IsTrue(testObj.Modifiers.Count == 0); - Assert.IsTrue(string.IsNullOrEmpty(testObj.Name)); - } - #endregion - - #region "Unit.Unit(UnitType)" - [TestMethod()] - [ExpectedException(typeof(ArgumentNullException))] - public void UnitNewEfUnitUnitTypeNullTest() - { - Unit testObj = new Unit(null); - - Assert.Fail("Constructor should cause a ContractException. Nulls are not allowed"); - } - - [TestMethod()] - public void UnitNewEfUnitUnitTypeTest() - { - UnitType testunittype = new UnitType - { - ID = 99, - Name = "Name" - }; - Unit testObj = new Unit(testunittype); - - Assert.IsNotNull(testObj); - Assert.IsNotNull(testObj.UnitType); - Assert.IsTrue(testObj.UnitTypeID == 99); - Assert.AreEqual(testunittype.Name, testObj.UnitType.Name); - - Assert.IsNotNull(testObj.Symbols); - Assert.IsTrue(testObj.Symbols.Count == 0); - - Assert.IsNotNull(testObj.Modifiers); - Assert.IsTrue(testObj.Modifiers.Count == 0); - // Assert.IsTrue(testUnit.UnitModifiers(0).Value = testObj.Modifiers(0).Value) - } - #endregion - - #region "Unit.ParentType" - [TestMethod()] - public void UnitParentTypeTest() - { - UnitType testUnitType = new UnitType - { - ID = 99, - Name = "Name" - }; - - Unit testObj = new Unit(); - - testObj.UnitType = testUnitType; - - Assert.IsNotNull(testObj.UnitType); - Assert.AreEqual(testUnitType.ID, testObj.UnitType.ID); - Assert.AreEqual(testUnitType.Name, testObj.UnitType.Name); - } - - [TestMethod()] - public void UnitParentTypeNullTest() - { - Unit testObj = new Unit(); - - testObj.UnitType = null; - - Assert.IsNull(testObj.UnitType); - } - #endregion - - #region "Unit.ID" - [TestMethod()] - public void UnitIDTest() - { - Unit testObj = new Unit(); - - testObj.ID = 99; - - Assert.AreEqual(99, testObj.ID); - } - - //[TestMethod()] - //public void UnitIDNullTest() - //{ - // Unit testObj = new Unit(); - - // testObj.ID = null; - - // Assert.AreEqual(null, testObj.ID); - //} - - //[TestMethod()] - //public void UnitIDNegativeTest() - //{ - // Unit testObj = new Unit(); - - // testObj.ID = -1; - - // Assert.IsTrue(testObj.ID == -1); - - // List data = Validation.DataAnnotationValidator.GetErrors(testObj).ToList; - - // Assert.IsNotNull(data); - // Assert.IsTrue(data.Count > 0); - // Assert.IsTrue(data(0).PropertyName == "ID"); - //} - #endregion - - #region "Unit.Name" - [TestMethod()] - public void UnitNameTest() - { - Unit testObj = new Unit(); - - testObj.Name = "Test Name"; - - Assert.AreEqual("Test Name", testObj.Name); - } - - //[TestMethod()] - //public void UnitNameNullTest() - //{ - // Unit testObj = new Unit(); - - // testObj.Name = null; - - // Assert.IsTrue(string.IsNullOrWhiteSpace(testObj.Name)); - - // List data = Validation.DataAnnotationValidator.GetErrors(testObj).ToList; - - // Assert.IsNotNull(data); - // Assert.IsTrue(data.Count > 0); - // Assert.IsTrue(data(0).PropertyName == "Name"); - //} - #endregion - - #region "IEquatable" - [TestMethod()] - public void Unit_EqualityTest() - { - Unit expected = unitPro.Units["Feet"]; - Unit target = unitPro.Units["Feet"]; - - Assert.IsTrue(expected == target); - } - - [TestMethod()] - public void Unit_EqualityTest2() - { - Unit expected = unitPro.Units["Feet"]; - Unit target = unitPro.Units["Inch"]; - - Assert.IsFalse(expected == target); - } - - [TestMethod()] - public void Unit_EqualityTest3() - { - Unit expected = null; - Unit target = unitPro.Units["Inch"]; - - Assert.IsFalse(expected == target); - } - - [TestMethod()] - public void Unit_EqualityTest4() - { - Unit expected = unitPro.Units["Inch"]; - Unit target = null; - - Assert.IsFalse(expected == target); - } - - [TestMethod()] - public void Unit_EqualityTest5() - { - Unit expected = null; - Unit target = null; - - Assert.IsTrue(expected == target); - } - - [TestMethod()] - public void Unit_EqualityTest6() - { - Unit expected = unitPro.Units["Feet"]; - Unit target = unitPro.Units["Inch"]; - - Assert.IsTrue(expected != target); - } - - [TestMethod()] - public void Unit_EqualityTest7() - { - Unit expected = unitPro.Units["Feet"]; - Unit target = null; - - Assert.IsTrue(expected != target); - } - - [TestMethod()] - public void Unit_EqualityTest8() - { - Unit expected = null; - Unit target = unitPro.Units["Feet"]; - - Assert.IsTrue(expected != target); - } - - [TestMethod()] - public void Unit_EqualityTest8_1() - { - Unit expected = null; - Unit target = null; - - Assert.IsFalse(expected != target); - } - - [TestMethod()] - public void Unit_EqualityTest9() - { - Unit expected = unitPro.Units["Inch"]; - Unit target = unitPro.Units["Feet"]; - - Assert.IsFalse(expected.Equals(target)); - } - - [TestMethod()] - public void Unit_EqualityTest10() - { - Unit expected = unitPro.Units["Feet"]; - Unit target = unitPro.Units["Feet"]; - - Assert.IsTrue(expected.Equals(target)); - } - - [TestMethod()] - public void Unit_EqualityTest11() - { - Unit expected = unitPro.Units["Feet"]; - Unit target = unitPro.Units["Inch"]; - - Assert.IsFalse(expected.Equals(target)); - } - - [TestMethod()] - public void Unit_EqualityTest12() - { - Unit expected = unitPro.Units["Feet"]; - Unit target = null; - - Assert.IsFalse(expected.Equals(target)); - } - - [TestMethod()] - public void Unit_EqualityTest13() - { - Unit expected = unitPro.Units["Feet"]; - Unit target = unitPro.Units["Feet"]; - - Assert.IsTrue(expected.Equals((object)target)); - } - - [TestMethod()] - public void Unit_EqualityTest14() - { - Unit expected = unitPro.Units["Feet"]; - Unit target = unitPro.Units["Inch"]; - - Assert.IsFalse(expected.Equals((object)target)); - } - - [TestMethod()] - public void Unit_EqualityTest154() - { - Unit expected = unitPro.Units["Feet"]; - Unit target = null; - - Assert.IsFalse(expected.Equals((object)target)); - } - - [TestMethod()] - public void Unit_EqualityTest15() - { - Unit expected = unitPro.Units["Feet"]; - - Assert.IsTrue(expected.GetHashCode() == expected.Name.GetHashCode()); - } - #endregion - - //#region "Serialization" - //[TestMethod()] - //public void Unit_BinarySerializationTest() - //{ - // Unit expected = unitPro.Units["Feet"]; - // Unit actual = default(Unit); - - // byte[] data = Utility.BinarySerialize(expected); - // actual = (Unit)Utility.BinaryDeserialize(data); - - // Assert.IsNotNull(actual); - // Assert.AreEqual(expected.ID, actual.ID); - // Assert.AreEqual(expected.Name, actual.Name); - // Assert.AreEqual(expected.DefaultSymbol, actual.DefaultSymbol); - // Assert.AreEqual(expected.IsDefault, actual.IsDefault); - // Assert.AreEqual(expected.Modifiers.Count, actual.Modifiers.Count); - // Assert.AreEqual(expected.Symbols.Count, actual.Symbols.Count); - // Assert.AreEqual(expected.UnitTypeID, actual.UnitTypeID); - //} - - //[TestMethod()] - //public void Unit_DataContractSerializationTest() - //{ - // Unit expected = unitPro.Units["Feet"]; - // Unit actual = default(Unit); - - // string data = Utility.DataContractSerialize(expected); - // actual = (Unit)Utility.DataContractDeserialize(data, typeof(Unit)); - - // Assert.IsNotNull(actual); - // Assert.AreEqual(expected.ID, actual.ID); - // Assert.AreEqual(expected.Name, actual.Name); - // Assert.AreEqual(expected.DefaultSymbol, actual.DefaultSymbol); - // Assert.AreEqual(expected.IsDefault, actual.IsDefault); - // Assert.AreEqual(expected.Modifiers.Count, actual.Modifiers.Count); - // Assert.AreEqual(expected.Symbols.Count, actual.Symbols.Count); - // Assert.AreEqual(expected.UnitTypeID, actual.UnitTypeID); - //} - //#endregion - - //Private Function InitEfObjects() As EFUnitType - //Dim efUnitTypeObj As New EFUnitType - //efUnitTypeObj.ID = 10 - //efUnitTypeObj.Name = "Test Type" - //efUnitTypeObj.Description = "Test Desc" - - //Dim efUnitObj As New EFUnit - //efUnitObj.ID = 2 - //efUnitObj.Name = "Test Unit" - //efUnitObj.UnitType = efUnitTypeObj - - //Dim efUnitModifierObj As New EFUnitModifier - //efUnitModifierObj.ID = 2 - //efUnitModifierObj.ModifierID = 2 - //efUnitModifierObj.Order = 1 - //efUnitModifierObj.Value = 0.5 - - //Dim efUnitSymbolObj As New EFUnitSymbol - //efUnitSymbolObj.ID = 3 - //efUnitSymbolObj.IsDefault = True - //efUnitSymbolObj.Symbol = "Tst" - - //efUnitModifierObj.Unit = efUnitObj - //efUnitSymbolObj.Unit = efUnitObj - - //efUnitTypeObj.Unit.Add(efUnitObj) - //efUnitObj.UnitModifiers.Add(efUnitModifierObj) - //efUnitObj.UnitSymbol.Add(efUnitSymbolObj) - - //Return efUnitTypeObj - //End Function -} diff --git a/Units.Test/UnitTypeTest.cs b/Units.Test/UnitTypeTest.cs deleted file mode 100644 index 2bf4332..0000000 --- a/Units.Test/UnitTypeTest.cs +++ /dev/null @@ -1,321 +0,0 @@ -using System; -using System.Diagnostics.Contracts; -using Units; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -/// -///This is a test class for UnitTest and is intended -///to contain all UnitTest Unit Tests -/// -[TestClass()] -public class UnitTypeTest -{ - - private TestContext testContextInstance; - - private UnitProvider unitPro = new UnitProvider(); - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get { return testContextInstance; } - set { testContextInstance = value; } - } - - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ - //Public Sub MyTestCleanup() - //End Sub - // - #endregion - - #region "UnitType.UnitType()" - [TestMethod()] - public void UnitTypeNewTest() - { - UnitType testObj = new UnitType(); - - Assert.IsNotNull(testObj); - Assert.IsTrue(testObj.ID == 0); - Assert.IsNotNull(testObj.Units); - Assert.IsTrue(testObj.Units.Count == 0); - Assert.IsTrue(string.IsNullOrEmpty(testObj.Name)); - } - #endregion - - #region "UnitType.ID" - [TestMethod()] - public void UnitTypeIDTest() - { - UnitType testObj = new UnitType(); - - testObj.ID = 99; - - Assert.AreEqual(99, testObj.ID); - } - - //[TestMethod()] - //public void UnitTypeIDNullTest() - //{ - // UnitType testObj = new UnitType(); - - // testObj.ID = null; - - // Assert.AreEqual(null, testObj.ID); - //} - - //[TestMethod()] - //public void UnitTypeIDNegativeTest() - //{ - // UnitType testObj = new UnitType(); - - // testObj.ID = -1; - - // Assert.IsTrue(testObj.ID == -1); - - // List data = Validation.DataAnnotationValidator.GetErrors(testObj).ToList; - - // Assert.IsNotNull(data); - // Assert.IsTrue(data.Count > 0); - // Assert.IsTrue(data(0).PropertyName == "ID"); - //} - #endregion - - #region "UnitType.Name" - [TestMethod()] - public void UnitTypeNameTest() - { - UnitType testObj = new UnitType(); - - testObj.Name = "Test Name"; - - Assert.AreEqual("Test Name", testObj.Name); - } - - //[TestMethod()] - //public void UnitTypeNameNullTest() - //{ - // UnitType testObj = new UnitType(); - - // testObj.Name = null; - - // Assert.IsTrue(string.IsNullOrWhiteSpace(testObj.Name)); - - // List data = Validation.DataAnnotationValidator.GetErrors(testObj).ToList; - - // Assert.IsNotNull(data); - // Assert.IsTrue(data.Count > 0); - // Assert.IsTrue(data(0).PropertyName == "Name"); - //} - #endregion - - #region "IEquatable" - [TestMethod()] - public void UnitType_EqualityTest() - { - UnitType expected = unitPro.UnitTypes["Length"]; - UnitType target = unitPro.UnitTypes["Length"]; - - Assert.IsTrue(expected == target); - } - - [TestMethod()] - public void UnitType_EqualityTest2() - { - UnitType expected = unitPro.UnitTypes["Length"]; - UnitType target = unitPro.UnitTypes["Mass"]; - - Assert.IsFalse(expected == target); - } - - [TestMethod()] - public void UnitType_EqualityTest3() - { - UnitType expected = null; - UnitType target = unitPro.UnitTypes["Mass"]; - - Assert.IsFalse(expected == target); - } - - [TestMethod()] - public void UnitType_EqualityTest4() - { - UnitType expected = unitPro.UnitTypes["Mass"]; - UnitType target = null; - - Assert.IsFalse(expected == target); - } - - [TestMethod()] - public void UnitType_EqualityTest5() - { - UnitType expected = null; - UnitType target = null; - - Assert.IsTrue(expected == target); - } - - [TestMethod()] - public void UnitType_EqualityTest6() - { - UnitType expected = unitPro.UnitTypes["Length"]; - UnitType target = unitPro.UnitTypes["Mass"]; - - Assert.IsTrue(expected != target); - } - - [TestMethod()] - public void UnitType_EqualityTest7() - { - UnitType expected = unitPro.UnitTypes["Length"]; - UnitType target = null; - - Assert.IsTrue(expected != target); - } - - [TestMethod()] - public void UnitType_EqualityTest8() - { - UnitType expected = null; - UnitType target = unitPro.UnitTypes["Length"]; - - Assert.IsTrue(expected != target); - } - - [TestMethod()] - public void UnitType_EqualityTest8_1() - { - UnitType expected = null; - UnitType target = null; - - Assert.IsFalse(expected != target); - } - - [TestMethod()] - public void UnitType_EqualityTest9() - { - UnitType expected = unitPro.UnitTypes["Mass"]; - UnitType target = unitPro.UnitTypes["Length"]; - - Assert.IsFalse(expected.Equals(target)); - } - - [TestMethod()] - public void UnitType_EqualityTest10() - { - UnitType expected = unitPro.UnitTypes["Length"]; - UnitType target = unitPro.UnitTypes["Length"]; - - Assert.IsTrue(expected.Equals(target)); - } - - [TestMethod()] - public void UnitType_EqualityTest11() - { - UnitType expected = unitPro.UnitTypes["Length"]; - UnitType target = unitPro.UnitTypes["Mass"]; - - Assert.IsFalse(expected.Equals(target)); - } - - [TestMethod()] - public void UnitType_EqualityTest12() - { - UnitType expected = unitPro.UnitTypes["Length"]; - UnitType target = null; - - Assert.IsFalse(expected.Equals(target)); - } - - [TestMethod()] - public void UnitType_EqualityTest13() - { - UnitType expected = unitPro.UnitTypes["Length"]; - UnitType target = unitPro.UnitTypes["Length"]; - - Assert.IsTrue(expected.Equals((object)target)); - } - - [TestMethod()] - public void UnitType_EqualityTest14() - { - UnitType expected = unitPro.UnitTypes["Length"]; - UnitType target = unitPro.UnitTypes["Mass"]; - - Assert.IsFalse(expected.Equals((object)target)); - } - - [TestMethod()] - public void UnitType_EqualityTest154() - { - UnitType expected = unitPro.UnitTypes["Length"]; - UnitType target = null; - - Assert.IsFalse(expected.Equals((object)target)); - } - - [TestMethod()] - public void UnitType_EqualityTest15() - { - UnitType expected = unitPro.UnitTypes["Length"]; - - Assert.IsTrue(expected.GetHashCode() == expected.Name.GetHashCode()); - } - #endregion - - #region "Serialization" - //[TestMethod()] - //public void UnitType_BinarySerializationTest() - //{ - // UnitType expected = unitPro.UnitTypes["Length"]; - // UnitType actual = default(UnitType); - - // byte[] data = Utility.BinarySerialize(expected); - // actual = (UnitType)Utility.BinaryDeserialize(data); - - // Assert.IsNotNull(actual); - // Assert.AreEqual(expected.ID, actual.ID); - // Assert.AreEqual(expected.Name, actual.Name); - // Assert.AreEqual(expected.Description, actual.Description); - // Assert.AreEqual(expected.Units.Count, actual.Units.Count); - //} - - //[TestMethod()] - //public void UnitType_DataContractSerializationTest() - //{ - // UnitType expected = unitPro.UnitTypes["Length"]; - // UnitType actual = default(UnitType); - - // string data = Utility.DataContractSerialize(expected); - // actual = (UnitType)Utility.DataContractDeserialize(data, typeof(UnitType)); - - // Assert.IsNotNull(actual); - // Assert.AreEqual(expected.ID, actual.ID); - // Assert.AreEqual(expected.Name, actual.Name); - // Assert.AreEqual(expected.Description, actual.Description); - // Assert.AreEqual(expected.Units.Count, actual.Units.Count); - //} - #endregion -} - diff --git a/Units.sln b/Units.sln deleted file mode 100644 index 2575708..0000000 --- a/Units.sln +++ /dev/null @@ -1,26 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cubico", "Units\Cubico.csproj", "{5C21F8E4-02C4-4614-97C7-1899F4E6E634}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cubico.Test", "Units.Test\Cubico.Test.csproj", "{720BF499-D91E-4A86-82C0-D072C8EE00E1}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5C21F8E4-02C4-4614-97C7-1899F4E6E634}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5C21F8E4-02C4-4614-97C7-1899F4E6E634}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5C21F8E4-02C4-4614-97C7-1899F4E6E634}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5C21F8E4-02C4-4614-97C7-1899F4E6E634}.Release|Any CPU.Build.0 = Release|Any CPU - {720BF499-D91E-4A86-82C0-D072C8EE00E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {720BF499-D91E-4A86-82C0-D072C8EE00E1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {720BF499-D91E-4A86-82C0-D072C8EE00E1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {720BF499-D91E-4A86-82C0-D072C8EE00E1}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Units/ConversionResult.cs b/Units/ConversionResult.cs deleted file mode 100644 index 25c0502..0000000 --- a/Units/ConversionResult.cs +++ /dev/null @@ -1,134 +0,0 @@ -using System; -using System.Runtime.Serialization; -using System.Diagnostics.Contracts; - -namespace Units -{ - - [Serializable()] - [DataContract()] - public class ConversionResult : IEquatable - { - - #region "Constructors" - public ConversionResult() - { - _result = Units.Result.NoError; - _value = 0; - } - - public ConversionResult(double value) - { - _result = Units.Result.NoError; - _value = value; - } - - public ConversionResult(double value, string symbol) - { - _result = Units.Result.NoError; - _value = value; - _symbol = symbol; - } - - public ConversionResult(double value, Result result) - { - _result = result; - _value = value; - } - - public ConversionResult(Result result) - { - _result = result; - } - #endregion - - #region "Properties" - - private Result _result; - [DataMember()] - public Result Result - { - get { return _result; } - set { _result = value; } - } - - - private double _value; - [DataMember()] - public double Value - { - get { return _value; } - set { _value = value; } - } - - private string _symbol; - [DataMember()] - public string Symbol - { - get { return _symbol; } - set { _symbol = value; } - } - #endregion - - #region "IEquatable" - public override int GetHashCode() - { - return (this.Value.ToString() + this.Symbol.ToString() + this.Result.ToString()).GetHashCode(); - } - - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - else if (!object.ReferenceEquals(obj.GetType(), typeof(ConversionResult))) - { - return false; - } - - ConversionResult CrObj = (ConversionResult)obj; - - return this.Equals(CrObj); - } - - public bool Equals(ConversionResult other) - { - if (other == null) - { - return false; - } - - if (other.Value != this.Value) - { - return false; - } - else if (other.Symbol != this.Symbol) - { - return false; - } - else if (other.Result != this.Result) - { - return false; - } - else - { - return true; - } - } - - - public static bool operator !=(ConversionResult left, ConversionResult right) - { - return !left.Equals(right); - } - - public static bool operator ==(ConversionResult left, ConversionResult right) - { - return left.Equals(right); - } - - #endregion - } -} - diff --git a/Units/Measurement.cs b/Units/Measurement.cs deleted file mode 100644 index 4bab9c5..0000000 --- a/Units/Measurement.cs +++ /dev/null @@ -1,746 +0,0 @@ -using System; -using System.Runtime.Serialization; -using System.Diagnostics.Contracts; -using System.Linq; - -namespace Units -{ - /// - /// A structure that defines a measurement with a numeric value and a unit of measure. - /// - [Serializable()] - [DataContract()] - [KnownType(typeof(Unit))] - [KnownType(typeof(UnitType))] - [KnownType(typeof(Symbol))] - [KnownType(typeof(Modifier))] - [KnownType(typeof(ConversionResult))] - public struct Measurement : IEquatable, IComparable - { - - #region "Private Fields" - private MeasurementFlags _flags; - - private UnitConverter _uc; - private double _maxbound; - - private double _minbound; - private double _standardValue; - //private Unit _standardUnit; - private double _value; - private Unit _unit; - - private string _symbol; - - private Result _conversionResult; - public event EventHandler OnValueChanged; - public event EventHandler OnUnitChanged; - #endregion - - #region "Constructors" - internal Measurement(string unitSymbol) - { - //Reference the unit converter that created us. - _uc = new UnitConverter(); - - _flags = MeasurementFlags.None; - _maxbound = 0; - _minbound = 0; - _standardValue = 0; - //_standardUnit = null; - _symbol = null; - OnValueChanged = null; - OnUnitChanged = null; - - if (string.IsNullOrWhiteSpace(unitSymbol)) - { - //System.Diagnostics.Debug.Print("First IF Statement") - _unit = null; - _conversionResult = Result.BadUnit; - } - else - { - //System.Diagnostics.Debug.Print("First ELSE Statement") - _unit = _uc.GetUnitBySymbol(unitSymbol); - _conversionResult = Result.NoError; - - if (_unit.Symbols.Contains(new Symbol { Value = unitSymbol })) - { - _symbol = unitSymbol; - } - else - { - _symbol = _unit.DefaultSymbol; - } - } - - _value = 0; - } - - public Measurement(double value, string unitSymbol) - : this(unitSymbol) - { - - if (!string.IsNullOrWhiteSpace(unitSymbol)) - { - _unit = _uc.GetUnitBySymbol(unitSymbol); - } - - _value = value; - } - - internal Measurement(double value, string unitSymbol, Result conversionResult) - : this(unitSymbol) - { - - _value = value; - - _conversionResult = conversionResult; - } - - internal Measurement(double value, Result conversionResult) - : this(null) - { - - _value = value; - - _conversionResult = conversionResult; - } - - internal Measurement(double value, Unit unit, Result conversionResult = Result.NoError) - { - //Reference the unit converter that created us. - _uc = new UnitConverter(); - _flags = MeasurementFlags.None; - _unit = unit; - _conversionResult = Result.NoError; - _value = value; - _conversionResult = conversionResult; - - _maxbound = 0; - _minbound = 0; - _standardValue = 0; - //_standardUnit = null; - _symbol = null; - OnValueChanged = null; - OnUnitChanged = null; - } - #endregion - - #region "measurement flags and properties methods" - - - /// - /// Gets a reference to the current unit of the measurement. - /// - public Unit Unit - { - get { return _unit; } - } - - /// - /// Gets or sets the flags on this measurement. - /// - public MeasurementFlags Flags - { - get { return _flags; } - set { _flags = value; } - } - - /// - /// Gets the unit converter associated with this measurement. - /// - public UnitConverter Converter - { - get { return _uc; } - } - - /// - /// Displays the result of a conversion - /// - /// - /// - /// This property will default to NoError unless after a conversion there were problems. - public Result ConversionResult - { - get { return _conversionResult; } - set { _conversionResult = value; } - } - - public double Value - { - get { return _value; } - } - - public string Symbol - { - get - { - if (_unit == null) - { - return null; - } - else - { - return _symbol; - } - } - } - - /// - /// Gets the current value of the measurement in string form. - /// - /// Unit result value. - public string FullValue - { - get - { - string str = _value.ToString(); - - if (_unit != null) - { - if (!string.IsNullOrEmpty(_unit.DefaultSymbol)) - { - str += _unit.DefaultSymbol; - } - else - { - str += _unit.Name; - } - } - - return str; - } - } - - public bool IsValid - { - get - { - if (_conversionResult != Result.NoError && _conversionResult != Result.UnitExists) - { - return false; - } - else if (_uc == null) - { - return false; - } - else if (_unit == null) - { - return false; - } - else - { - return true; - } - } - } - #endregion - - #region "Value getting and setting methods" - /// - /// Sets the unit of the measurement. - /// - /// Symbol of unit to set the measurement to. - /// Unit result value. - internal Result SetUnit(string unitSymbol) - { - Unit unit = _uc.GetUnitBySymbol(unitSymbol); - - if (unit == null) - { - return Result.BadUnit; - } - else - { - //If its the same don't touch it. - if (unit.DefaultSymbol == _unit.DefaultSymbol) - { - return Result.NoError; - } - - _unit = unit; - - //If OnUnitChanged <> Nothing Then - if (OnUnitChanged != null) - { - OnUnitChanged(this, EventArgs.Empty); - } - //End If - - return Result.NoError; - } - } - - /// - /// Given a string in the format "[value] [unit]" parses and applies the value and unit. - /// - /// Formatted string containing value and unit. - /// Unit result code. - internal Result SetValue(string measurement) - { - if (string.IsNullOrEmpty(measurement)) - { - throw new ArgumentNullException("measurement"); - } - Contract.EndContractBlock(); - - double d = 0; - string symbol = null; - Result res = default(Result); - - res = ValidateEntry(measurement); - if (res != Result.NoError) - { - return res; - } - - Measurement newRes = _uc.ParseUnitString(measurement); - - d = newRes.Value; - symbol = newRes.Symbol; - - //Can we change the unit? - if ((_flags & MeasurementFlags.ForceUnit) > 0) - { - //Cant change the unit, so turn the given units into the unit we want - Measurement convRes = _uc.ConvertUnits(d, symbol, _unit.Name); - d = convRes.Value; - } - else - { - //Change the measurement unit to the given unit. - SetUnit(symbol); - } - - SetValue(d); - return res; - } - - /// - /// Sets a value in the currently set unit format. - /// - /// Value to set the measurement to. - /// Unit result code. - internal Result SetValue(double value) - { - Measurement res = default(Measurement); - Unit standardUnit = default(Unit); - UnitType tp = _unit.UnitType; - standardUnit = (from un in tp.Units where un.IsDefault == true select un).FirstOrDefault(); - res = _uc.ConvertUnits(value, _unit.Name, standardUnit.Name); - - _value = value; - _standardValue = res.Value; - - if (res.ConversionResult != Result.NoError) { - return res.ConversionResult; - } - - if (OnValueChanged != null) { - OnValueChanged(this, EventArgs.Empty); - } - - return res.ConversionResult; - } - - /// - /// Gets the value of the measurement in the specified units. - /// - /// Symbol of the unit to retrieve the data in. - /// Unit result value. - public Measurement GetValueAs(string unitSymbol) - { - return _uc.ConvertUnits(_value, _unit.Name, unitSymbol); - } - - public string GetStringValueAs(string unitSymbol) - { - Measurement res = default(Measurement); - res = _uc.ConvertUnits(_value, _unit.Name, unitSymbol); - - if (res.ConversionResult != Result.NoError) - { - return "Conversion Error"; - } - else - { - return res.FullValue; - } - } - #endregion - - #region "Validation methods" - /// - /// Validates input to the measurement. - /// - /// String to validate (in the form "[value] [unit]"). - /// Unit result value. - public Result ValidateEntry(string entry) - { - string unit = null; - double d = 0; - Measurement res = default(Measurement); - - //Parse the entry - res = _uc.ParseUnitString(entry); - if (res.ConversionResult != Result.NoError) - { - return res.ConversionResult; - } - - unit = res.Symbol; - d = res.Value; - - return ValidateEntryUnitData(unit, d); - } - - public Result ValidateEntry(double value, string symbol) - { - return ValidateEntryUnitData(symbol, value); - } - - private Result ValidateEntryUnitData(string unit, double x) - { - - //Make sure the units are compatible - if (!_uc.IsCompatible(unit, this._unit.DefaultSymbol)) - { - return Result.UnitMismatch; - } - - Measurement newRes = _uc.ConvertUnits(x, unit, this.Unit.Name); - x = newRes.Value; - - if ((this._flags & MeasurementFlags.UseMaxBound) > 0) - { - if (x > this._maxbound) - { - return Result.ValueTooHigh; - } - } - - if ((this._flags & MeasurementFlags.UseMinBound) > 0) - { - if (x < this._minbound) - { - return Result.ValueTooLow; - } - } - - return Result.NoError; - } - - #endregion - - #region "Bounds setting methods" - /// - /// Sets the maximum bound of the measurement. - /// - /// Value of the maximum bound. - /// The units the maximum bound is given in. - /// Unit result value. - public Result SetMaxBound(double maxbound, string unitSymbol) - { - if (string.IsNullOrEmpty(unitSymbol)) - { - throw new ArgumentNullException("unitSymbol"); - } - - if (!_uc.IsCompatible(unitSymbol, this._unit.DefaultSymbol)) - { - return Result.UnitMismatch; - } - - Measurement res = _uc.ConvertUnits(maxbound, unitSymbol, _unit.Name); - - this._maxbound = res.Value; - - return Result.NoError; - } - - /// - /// Sets the minimum bound of the measurement. - /// - /// Value of the minimum bound. - /// The units the minimum bound is given in. - /// Unit result value. - public Result SetMinBound(double minbound, string unitSymbol) - { - if (string.IsNullOrEmpty(unitSymbol)) - { - throw new ArgumentNullException("unitSymbol"); - } - - if (!_uc.IsCompatible(unitSymbol, this._unit.DefaultSymbol)) - { - return Result.UnitMismatch; - } - - Measurement res = _uc.ConvertUnits(minbound, unitSymbol, _unit.Name); - - this._minbound = res.Value; - - return Result.NoError; - } - #endregion - - #region "Operator overloads" - /// - /// Gets a string representation of the measurement. - /// - /// The string representation of the measurement. - public override string ToString() - { - return this.FullValue; - } - - /// - /// Adds two measurements together. - /// - public static Measurement operator +(Measurement d1, Measurement d2) - { - double x = 0; - double y = 0; - - x = d1.Value; - - if (d2.Unit.ID == d1.Unit.ID) - { - y = d2.Value; - } - else - { - y = d2.Value; - Measurement res2 = d2.Converter.ConvertUnits(y, d2.Unit.DefaultSymbol, d1.Unit.DefaultSymbol); - y = res2.Value; - } - - var result = new Measurement(x + y, d1.Unit); - return result; - } - - /// - /// Subtracts two measurements. - /// - public static Measurement operator -(Measurement d1, Measurement d2) - { - double x = 0; - double y = 0; - - x = d1.Value; - - if (d2.Unit.ID == d1.Unit.ID) - { - y = d2.Value; - } - else - { - y = d2.Value; - Measurement res2 = d2.Converter.ConvertUnits(y, d2.Unit.DefaultSymbol, d1.Unit.DefaultSymbol); - y = res2.Value; - } - - var result = new Measurement(x - y, d1.Unit); - return result; - } - - /// - /// Multiplies two measurements. - /// - public static Measurement operator *(Measurement d1, Measurement d2) - { - double x = 0; - double y = 0; - - x = d1.Value; - - if (d2.Unit.ID == d1.Unit.ID) - { - y = d2.Value; - } - else - { - y = d2.Value; - Measurement res2 = d2.Converter.ConvertUnits(y, d2.Unit.DefaultSymbol, d1.Unit.DefaultSymbol); - y = res2.Value; - } - - var result = new Measurement(x * y, d1.Unit); - return result; - } - - /// - /// Divides two measurements. - /// - public static Measurement operator /(Measurement d1, Measurement d2) - { - double x = 0; - double y = 0; - - x = d1.Value; - - if (d2.Unit.ID == d1.Unit.ID) - { - y = d2.Value; - } - else - { - y = d2.Value; - Measurement res2 = d2.Converter.ConvertUnits(y, d2.Unit.DefaultSymbol, d1.Unit.DefaultSymbol); - y = res2.Value; - } - - Measurement result = new Measurement(x / y, d1.Unit); - return result; - } - - public static bool operator !=(Measurement left, Measurement right) - { - return !left.Equals(right); - } - - public static bool operator ==(Measurement left, Measurement right) - { - return left.Equals(right); - } - - public static bool operator <(Measurement left, Measurement right) - { - return (left.CompareTo(right) < 0); - } - - public static bool operator >(Measurement left, Measurement right) - { - return (left.CompareTo(right) > 0); - } - - public static bool operator <=(Measurement left, Measurement right) - { - return (left.CompareTo(right) <= 0); - } - - public static bool operator >=(Measurement left, Measurement right) - { - return (left.CompareTo(right) >= 0); - } - #endregion - - #region "IEquatable(Of Measurement)" - public override int GetHashCode() - { - Measurement MeRes = default(Measurement); - string str = string.Empty; - if (this.ConversionResult != Result.NoError) { - str = this.Value.ToString() + "|" + this.ConversionResult.ToString(); - } else { - Unit standardUnit = default(Unit); - UnitType tp = this.Unit.UnitType; - standardUnit = (from un in tp.Units where un.IsDefault == true select un).FirstOrDefault(); - - MeRes = this.Converter.ConvertUnits(this._value, this.Unit.DefaultSymbol, standardUnit.DefaultSymbol); - str = MeRes.Value.ToString() + "|" + MeRes.Symbol; - } - - return str.GetHashCode(); - } - - public override bool Equals(object obj) - { - if (obj == null || !object.ReferenceEquals(obj.GetType(), typeof(Measurement))) - { - return false; - } - - Measurement Mobj = (Measurement)obj; - return this.Equals(Mobj); - } - - public bool Equals(Measurement other) - { - if (other.ConversionResult != Result.NoError) - { - return false; - } - - if (this.ConversionResult != Result.NoError) - { - return false; - } - - if (object.ReferenceEquals(this.Unit, null) && object.ReferenceEquals(other.Unit, null)) - { - return true; - } - - if (object.ReferenceEquals(this.Unit, null) ^ object.ReferenceEquals(other.Unit, null)) - { - return false; - } - - //Dim standardUnit As Unit - //Dim tp As UnitType = Me.Unit.UnitType - //standardUnit = (From un In tp.Units _ - // Where un.IsDefault = True).FirstOrDefault - - if (this.Unit.Name == other.Unit.Name && this.Value == other.Value) - { - return true; - } - else - { - Measurement OtherRes = other.Converter.ConvertUnits(other._value, other.Unit.Name, this.Unit.Name); - - if (OtherRes.ConversionResult != Result.NoError) - { - return false; - } - else if (this.Unit.Name != OtherRes.Unit.Name) - { - return false; - } - else if (this.Value != OtherRes.Value) - { - return false; - } - else - { - return true; - } - } - - } - #endregion - - #region "ICompareTo(Of Measurement)" - public int CompareTo(Measurement other) - { - if (other.ConversionResult != Result.NoError) { - throw new ArgumentException("other", "the 'other' parameter must have a valid value"); - } - - if (this.ConversionResult != Result.NoError) { - throw new ArgumentException("this", "object must have a valid value"); - } - - Unit standardUnit = default(Unit); - UnitType tp = this.Unit.UnitType; - standardUnit = (from un in tp.Units where un.IsDefault == true select un).FirstOrDefault(); - - Unit otherStandardUnit = default(Unit); - tp = this.Unit.UnitType; - otherStandardUnit = (from un in tp.Units where un.IsDefault == true select un).FirstOrDefault(); - - Measurement meRes = this.Converter.ConvertUnits(this._value, this.Unit.DefaultSymbol, standardUnit.DefaultSymbol); - Measurement otherRes = other.Converter.ConvertUnits(other._value, other.Unit.DefaultSymbol, otherStandardUnit.DefaultSymbol); - - if (meRes.Symbol != otherRes.Symbol) { - throw new ArgumentException("The parameter must be of the same unit type as this object. " + this.Unit.DefaultSymbol, "other"); - } - - return meRes.Value.CompareTo(otherRes.Value); - } - #endregion - } -} - diff --git a/Units/MeasurementFlags.cs b/Units/MeasurementFlags.cs deleted file mode 100644 index 326ad55..0000000 --- a/Units/MeasurementFlags.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; - -namespace Units -{ - - [Flags()] - public enum MeasurementFlags : int - { - None = 0, - - /// - /// Stops the data string unit being changed by reading user input. - /// - ForceUnit = 1, - - /// - /// Enforces a maximum value on the data string. - /// - UseMaxBound = 2, - - /// - /// Enforces a minimum value on the data string. - /// - UseMinBound = 4 - } -} \ No newline at end of file diff --git a/Units/Modifier.cs b/Units/Modifier.cs deleted file mode 100644 index 4bcd2df..0000000 --- a/Units/Modifier.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Runtime.Serialization; - -namespace Units -{ - [DataContract(IsReference = true)] - [Serializable()] - public partial class Modifier - { - #region "Contructors" - public Modifier() : base() - { - - } - #endregion - - #region "Primitive Properties" - - [DataMember()] - public int ID {get;set;} - - [DataMember()] - public decimal Value {get;set;} - - [DataMember()] - public int Order {get;set;} - - [DataMember()] - public int UnitSourceID {get;set;} - - [DataMember()] - public int UnitTargetID {get;set;} - - [DataMember()] - public Nullable Precision {get;set;} - - #endregion - - #region "ChangeTracking" - - private bool _isDeserializing; - protected bool IsDeserializing { - get { return _isDeserializing; } - private set { _isDeserializing = value; } - } - - [OnDeserializing()] - public void OnDeserializingMethod(StreamingContext context) - { - IsDeserializing = true; - } - - [OnDeserialized()] - public void OnDeserializedMethod(StreamingContext context) - { - IsDeserializing = false; - } - - private bool _isSerializing = false; - protected bool IsSerializing { - get { return _isSerializing; } - private set { _isSerializing = value; } - } - - [OnSerializing()] - public void OnSerializingMethod(StreamingContext context) - { - IsSerializing = true; - } - - [OnSerialized()] - public void OnSerializedMethod(StreamingContext context) - { - IsSerializing = false; - } - - protected virtual void ClearNavigationProperties() - { - } - - #endregion - - #region "Properties" - [DataMember()] - public Unit ParentUnit {get;set;} - - public ModifierType ModifierType {get;set;} - #endregion - } - -} - - - - - - - - diff --git a/Units/ModifierType.cs b/Units/ModifierType.cs deleted file mode 100644 index 6d4a5a5..0000000 --- a/Units/ModifierType.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Units -{ - public enum ModifierType - { - None = 0, - PreAdd = 1, - Add = 2, - Multiply = 3, - Subtract = 4, - Divide = 5 - } -} \ No newline at end of file diff --git a/Units/Result.cs b/Units/Result.cs deleted file mode 100644 index f2d2c16..0000000 --- a/Units/Result.cs +++ /dev/null @@ -1,56 +0,0 @@ -namespace Units -{ - public enum Result : int - { - /// - /// No error occured. - /// - NoError = 0, - - /// - /// A general error occured. - /// - GenericError, - - /// - /// Specified unit was not found. - /// - UnitNotFound, - - /// - /// Specified unit group was not found. - /// - GroupNotFound, - - /// - /// Unit exists. - /// - UnitExists, - - /// - /// Specified unit was invalid. - /// - BadUnit, - - /// - /// Specified value was invalid. - /// - BadValue, - - /// - /// Two units were used that are not in the same group. - /// - UnitMismatch, - - /// - /// An input value was too high. - /// - ValueTooHigh, - - /// - /// An input value was too low. - /// - ValueTooLow - } -} - diff --git a/Units/Symbol.cs b/Units/Symbol.cs deleted file mode 100644 index ffa2321..0000000 --- a/Units/Symbol.cs +++ /dev/null @@ -1,206 +0,0 @@ -using System; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Runtime.Serialization; - - -namespace Units -{ - /// - /// Represents a unit of measure's symbol, or alternate methods to identify a unit of measure. - /// - /// Inch = ", inches, in, in. etc. - [DataContract(IsReference = true)] - [KnownType(typeof(Unit))] - [Serializable()] - public partial class Symbol - { - #region "Constructors" - public Symbol() - { - } - - public Symbol(Unit unit) - { - if (unit == null) - { - throw new ArgumentNullException("unit"); - } - //Contract.EndContractBlock() - - this.Unit = unit; - } - #endregion - - #region "Primitive Properties" - - [DataMember()] - public int Id {get;set;} - - [DataMember()] - public string Value {get;set;} - - [DataMember()] - public bool IsDefault {get;set;} - - [DataMember()] - public int UnitId {get;set;} - #endregion - - #region "Navigation Properties" - - [DataMember()] - public Unit Unit { - get { return _unit; } - set { - if (!object.ReferenceEquals(_unit, value)) { - Unit previousValue = _unit; - _unit = value; - FixupUnit(previousValue); - } - } - } - - private Unit _unit; - - - #endregion - - #region "ChangeTracking" - - private bool _isDeserializing; - protected bool IsDeserializing { - get { return _isDeserializing; } - private set { _isDeserializing = value; } - } - - - [OnDeserializing()] - public void OnDeserializingMethod(StreamingContext context) - { - IsDeserializing = true; - } - - - [OnDeserialized()] - public void OnDeserializedMethod(StreamingContext context) - { - IsDeserializing = false; - } - - private bool _isSerializing = false; - protected bool IsSerializing { - get { return _isSerializing; } - private set { _isSerializing = value; } - } - - [OnSerializing()] - public void OnSerializingMethod(StreamingContext context) - { - IsSerializing = true; - } - - [OnSerialized()] - public void OnSerializedMethod(StreamingContext context) - { - IsSerializing = false; - } - #endregion - - #region "Association Fixup" - - private void FixupUnit(Unit previousValue) - { - if (IsDeserializing) { - return; - } - - if (previousValue != null && previousValue.Symbols.Contains(this)) { - previousValue.Symbols.Remove(this); - } - - if (Unit != null) { - if (!Unit.Symbols.Contains(this)) { - Unit.Symbols.Add(this); - } - - UnitId = Unit.ID; - } - - } - - #endregion - - #region "IEquatable" - public override int GetHashCode() - { - return this.Value.GetHashCode(); - } - - public override bool Equals(object obj) - { - if ((object)obj == null) - { - return false; - } - else if (!object.ReferenceEquals(obj.GetType(), this.GetType())) - { - return false; - } - else - { - return this.Equals((Symbol)obj); - } - } - - public bool Equals(Symbol other) - { - if ((object)other == null) - { - return false; - } - else - { - if (this.Value != other.Value) - { - return false; - } - else - { - return true; - } - } - } - - - public static bool operator !=(Symbol left, Symbol right) - { - return !(left == right); - } - - public static bool operator ==(Symbol left, Symbol right) - { - if (object.ReferenceEquals(left, right)) - { - return true; - } - else if ((object)left == null || (object)right == null) - { - return false; - } - else - { - return left.Equals(right); - } - } - - #endregion - - public override string ToString() - { - return this.Value; - } - } - -} - diff --git a/Units/Unit.cs b/Units/Unit.cs deleted file mode 100644 index 90faf4e..0000000 --- a/Units/Unit.cs +++ /dev/null @@ -1,288 +0,0 @@ -using System; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Runtime.Serialization; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; - -namespace Units -{ - [DataContract(IsReference = true)] - [KnownType(typeof(UnitType))] - [KnownType(typeof(Symbol))] - [KnownType(typeof(Modifier))] - [Serializable()] - public partial class Unit : IEquatable - { - #region "Constructors" - public Unit() : base() - { - } - - internal Unit(UnitType unitType) - { - if (unitType == null) { - throw new ArgumentNullException("unitType"); - } - - this.UnitType = unitType; - } - - public bool IsDefault { - get { - foreach (Modifier mod in this.Modifiers) { - if (mod.UnitSourceID == mod.UnitTargetID && mod.UnitSourceID == this.ID) { - return true; - } - } - - return false; - - //If Me.Modifiers.Count > 1 Then - // Return False - //Else - // If Me.Modifiers(0).Value = 1 AndAlso Me.Modifiers(0).ModifierType = ModifierType.Multiply 'Then - // Return True - // Else - // Return False - // End If - //End If - } - } - #endregion - - #region "Primitive Properties" - - [DataMember()] - public int ID { get; set; } - - [DataMember()] - public string Name { get; set; } - - [DataMember()] - public int UnitTypeID { get; set; } - - #endregion - - #region "Navigation Properties" - - [DataMember()] - public UnitType UnitType { get; set; } - - private List _symbols; - - [DataMember()] - public List Symbols - { - get - { - if (_symbols == null && IsSerializing == false) - { - _symbols = new List(); - } - return _symbols; - } - set - { - if (!object.ReferenceEquals(_symbols, value)) - { - _symbols = value; - } - } - } - - private List _sources; - - [DataMember()] - public List Sources - { - get - { - if (_sources == null && IsSerializing == false) - { - _sources = new List(); - } - return _sources; - } - set - { - if (!object.ReferenceEquals(_sources, value)) - { - _sources = value; - } - } - } - - private List _modifiers; - - [DataMember()] - public List Modifiers - { - get - { - if (_modifiers == null && IsSerializing == false) - { - _modifiers = new List(); - } - return _modifiers; - } - set - { - if (!object.ReferenceEquals(_modifiers, value)) - { - _modifiers = value; - } - } - } - - #endregion - - #region "ChangeTracking" - - private bool _isDeserializing; - protected bool IsDeserializing - { - get { return _isDeserializing; } - private set { _isDeserializing = value; } - } - - [OnDeserializing()] - public void OnDeserializingMethod(StreamingContext context) - { - IsDeserializing = true; - } - - [OnDeserialized()] - public void OnDeserializedMethod(StreamingContext context) - { - IsDeserializing = false; - } - - private bool _isSerializing = false; - protected bool IsSerializing - { - get { return _isSerializing; } - private set { _isSerializing = value; } - } - - [OnSerializing()] - public void OnSerializingMethod(StreamingContext context) - { - IsSerializing = true; - } - - [OnSerialized()] - public void OnSerializedMethod(StreamingContext context) - { - IsSerializing = false; - } - - protected virtual void ClearNavigationProperties() - { - UnitType = null; - Symbols.Clear(); - Sources.Clear(); - Modifiers.Clear(); - } - - #endregion - - #region "Properties" - public string DefaultSymbol { - get { - Symbol symbol = (from s in this.Symbols - where s.IsDefault = true - select s).FirstOrDefault(); - - if (symbol == null) { - return string.Empty; - } else { - return symbol.Value; - } - } - } - #endregion - - #region "IEquatable" - public override int GetHashCode() - { - return this.Name.GetHashCode(); - } - - public override bool Equals(object obj) - { - if ((object)obj == null) - { - return false; - } - else if (!object.ReferenceEquals(obj.GetType(), this.GetType())) - { - return false; - } - else - { - return this.Equals((Unit)obj); - } - } - - public bool Equals(Unit other) - { - if (object.ReferenceEquals(other, null)) - { - return false; - } - else - { - if (this.Name != other.Name) - { - return false; - } - else - { - return true; - } - } - } - - - public static bool operator !=(Unit left, Unit right) - { - return !(left == right); - } - - public static bool operator ==(Unit left, Unit right) - { - if (object.ReferenceEquals(left, right)) - { - return true; - } - else if ((object)left == null || (object)right == null) - { - return false; - } - else - { - return left.Equals(right); - } - } - - #endregion - - public override string ToString() - { - return this.Name; - } - } - -} - - - - - - - - - - \ No newline at end of file diff --git a/Units/UnitConverter.cs b/Units/UnitConverter.cs deleted file mode 100644 index 30da74b..0000000 --- a/Units/UnitConverter.cs +++ /dev/null @@ -1,419 +0,0 @@ -using System; -using System.Diagnostics.Contracts; -using System.Collections.Generic; -using System.Linq; - -namespace Units -{ - - public class UnitConverter - { - - //TODO: Fix this; was Previously NaN - private const double _failsafeValue = 0; - - private Dictionary _SymbolDictionary; - private Dictionary _IndividualSymbolDictionary; - private Dictionary _UnitDictionary; - - private Dictionary _UnitTypeDictionary; - - /// - /// Constructor, sets up the unit converter. - /// - public UnitConverter() - { - //Set up the tables we need - var unitPro = new UnitProvider(); - _SymbolDictionary = unitPro.Symbols; - _IndividualSymbolDictionary = unitPro.IndividualSymbols; - _UnitDictionary = unitPro.Units; - _UnitTypeDictionary = unitPro.UnitTypes; - - } - - #region "Unit related methods" - /// - /// Given the full name of the unit, returns the unit entry. - /// - /// Name of the unit. - /// Reference to the unit entry, or null if not found. - public Unit GetUnitByName(string unitName) - { - if (string.IsNullOrEmpty(unitName)) - { - throw new ArgumentException("unitName must have a value."); - } - - if (this._UnitDictionary.ContainsKey(unitName)) - { - return this._UnitDictionary[unitName]; - } - else - { - throw new ArgumentException("The unit '" + unitName + "' was not found in the UnitConverter. Add this unit to the database for compatability."); - } - } - - /// - /// Given a unit symbol, gets the unit entry. - /// - /// Symbol of the unit. - /// Reference to the unit entry, or null if symbol does not exist. - public Unit GetUnitBySymbol(string unitSymbol) - { - if (string.IsNullOrWhiteSpace(unitSymbol)) { - throw new ArgumentNullException("unitSymbol must have a value"); - } - - //First check to see if they used the actual name of a unit then look at the symbol table. - Unit unitFound = (from val in this._UnitDictionary.Values where val.Name.ToUpper() == unitSymbol.Trim().ToUpper() select val).FirstOrDefault(); - - if (unitFound != null) { - return unitFound; - } - - Symbol symFound = (from val in this._IndividualSymbolDictionary.Values where val.Value == unitSymbol.Trim() select val).FirstOrDefault(); - - if (symFound != null) { - return symFound.Unit; - } - - throw new ArgumentException("The unit/symbol '" + unitSymbol + "' was not found in the UnitConverter. Add this unit to the database for compatability."); - - } - #endregion - - #region "Group related methods" - /// - /// Gets a value that determines whether the given units are compatible or not. - /// - /// Symbol for the first unit. - /// Symbol for the second unit. - /// True if units are compatible, else false. - public bool IsCompatible(string leftSymbol, string rightSymbol) - { - if (string.IsNullOrEmpty(leftSymbol) || string.IsNullOrEmpty(rightSymbol)) - { - throw new ArgumentException("The left and right symbol values cannot be empty or null."); - } - Contract.EndContractBlock(); - - Unit leftUnit = this.GetUnitBySymbol(leftSymbol); - Unit rightUnit = this.GetUnitBySymbol(rightSymbol); - - if ((leftUnit == null) || (rightUnit == null)) - { - return false; - } - - return (this.GetUnitType(leftUnit.Name) == this.GetUnitType(rightUnit.Name)); - } - - /// - /// Creates a new unit group and adds it to the group table. - /// - /// Name of the new group. - /// Unit result value. - private Result CreateNewGroup(string groupName) - { - //Create the new group - var newType = new UnitType {Name = groupName}; - - //Add it to the group table - this._UnitTypeDictionary.Add(groupName, newType); - - return Result.NoError; - } - - /// - /// Adds the named unit to the specified group. - /// - /// Name of the unit. - /// Name of the group to add the unit to. - /// Unit result value. - private Result AddUnitToGroup(string unitName, string unitTypeName) - { - Unit unit = this._UnitDictionary[unitName]; - UnitType group = this._UnitTypeDictionary[unitTypeName]; - - //Make sure the unit exists. - if (unit == null) - { - return Result.UnitNotFound; - } - - //Make sure the group exists. - if (group == null) - { - return Result.GroupNotFound; - } - - //Add the unit. - group.Units.Add(unit); - - return Result.NoError; - } - - /// - /// Given the name of a unit, searches for the unit group it belongs to. - /// - /// Name of the unit. - /// The group the unit is in, or null if the unit is not valid. - private UnitType GetUnitType(string unitName) - { - if (string.IsNullOrEmpty(unitName)) { - throw new ArgumentException("unitName must have a value"); - } - Contract.EndContractBlock(); - - //Does the unit even exist? - if (this._UnitDictionary.ContainsKey(unitName) == false) { - return null; - } else { - //Iterate through every group - var unitPro = new UnitProvider(); - foreach (var ut in unitPro.UnitTypes) { - if (ut.Value.Units.Contains(new Unit { Name = unitName })) { - return ut.Value; - } - } - return null; - } - } - #endregion - - #region "Conversion methods" - - /// - /// Performs a unit conversion between two units, given a value to convert. - /// - /// The value to convert. - /// The name of the unit the value is currently in. - /// The name of the unit that the value is to be converted to. - /// Unit result value. - public Measurement ConvertUnits(double value, string currentUnitName, string targetUnitName) - { - double x = value; - - //Default to the fail safe value. - double output = 0; - output = _failsafeValue; - - if (string.IsNullOrEmpty(currentUnitName) || string.IsNullOrEmpty(targetUnitName)) - { - return new Measurement(0, Result.BadUnit); - } - - Unit currentUnit = GetUnitBySymbol(currentUnitName); - Unit targetUnit = GetUnitBySymbol(targetUnitName); - - //Make sure both units are real units. - if ((currentUnit == null) || (targetUnit == null)) - { - return new Measurement(output, Result.BadUnit); - } - - //Make sure the units are of the same group - if (!this.IsCompatible(currentUnit.Name, targetUnit.Name)) - { - return new Measurement(output, Result.UnitMismatch); - } - - return ConvertCurrentToTarget(x, currentUnit.Name, targetUnit.Name); - } - - /// - /// Performs a unit conversion from the standard value into the specified unit. - /// - /// The value to convert. - /// - /// The name of the unit that the value is to be converted to. - /// Unit result value. - public Measurement ConvertCurrentToTarget(double value, string currentUnitName, string targetUnitName) - { - double x = value; - - //Default to the fail safe value. - double output = 0; - output = _failsafeValue; - - if (string.IsNullOrEmpty(targetUnitName)) { - return new Measurement(0, Result.BadUnit); - } - - Unit currentUnit = GetUnitBySymbol(currentUnitName); - Unit targetUnit = GetUnitBySymbol(targetUnitName); - - //Make sure both units are real units. - if (targetUnit == null) { - return new Measurement(output, Result.BadUnit); - } - - try { - var moders = from m in targetUnit.Modifiers - where m.UnitSourceID == currentUnit.ID && m.UnitTargetID == targetUnit.ID - orderby m.Order - select m; - - foreach (var moder in moders) - { - int m_intPrecision = 15; - - if (moder.Precision != null) { - m_intPrecision = Convert.ToInt32(moder.Precision); - } - - switch (moder.ModifierType) { - case ModifierType.PreAdd: - x = x - (double)moder.Value; - break; - case ModifierType.Multiply: - if (moder.Value > 0) { - x = System.Math.Round(x * (double)moder.Value, m_intPrecision); - } - break; - case ModifierType.Divide: - if (moder.Value > 0) { - x = System.Math.Round(x / (double)moder.Value, m_intPrecision); - } - break; - case ModifierType.Add: - x = System.Math.Round(x + (double)moder.Value, m_intPrecision); - break; - case ModifierType.Subtract: - x = System.Math.Round(x - (double)moder.Value, m_intPrecision); - break; - } - } - - output = x; - } catch { - //Probably overflowed or something. - return new Measurement(output, Result.BadValue); - } - - return new Measurement(output, targetUnit); - } - - #endregion - - #region "Parsing routines" - - // TO DO: Implement ParseNumberString. - - // ''' - // ''' Parses a number string with operators. - // ''' - // ''' String containing numbers and operators. - // ''' Unit result code. - //Private Function ParseNumberString(ByVal input As String) As ConversionResult - // If String.IsNullOrEmpty(input) Then - // Throw New ArgumentException("input must have a value") - // End If - - // 'Default value - // Dim value As Double - // value = 0 - - // 'Split the numbers on the ^ operator - // Dim numbers As String() - // numbers = input.Split(New Char() {"^"c}) - - // If numbers.Length = 1 Then - // 'Only one value, so there was no ^ operator present - // 'so just return the one number. - // Try - // value = Convert.ToDouble(numbers(0)) - // Catch - // Return New ConversionResult(0, Result.BadValue) - // End Try - // Else - // 'There is a ^ operator, so try to use it. - // Try - // value = Convert.ToDouble(numbers(0)) - // value = CDbl(System.Math.Pow(value, Convert.ToDouble(numbers(1)))) - // Catch - // Return New ConversionResult(0, Result.BadValue) - // End Try - // End If - - // Return New ConversionResult(value) - //End Function - - - /// - /// Given a string in the format "[value] [unit]", splits and returns the parts. - /// - /// Input string in the format "[value] [unit]" to be parsed. - /// Unit result code. - public Measurement ParseUnitString(string input) - { - //Defaults - double value = 0; - string symbol = null; - value = 0; - symbol = ""; - - if (string.IsNullOrEmpty(input)) - { - return new Measurement(0, Result.BadValue); - } - - int i = 0; - - string s1 = ""; - string s2 = ""; - - //Look for the first letter or punctuation character. - i = 0; - while (i < input.Length) - { - if (Char.IsLetter(input, i) || char.IsPunctuation(input, i) || char.IsSymbol(input, i)) - { - if (input[i] != Convert.ToChar(".") && input[i] != Convert.ToChar("-")) - { - break; // TODO: might not be correct. Was : Exit While - } - } - System.Math.Max(System.Threading.Interlocked.Increment(ref i), i - 1); - } - - s1 = input.Substring(0, i); - s1 = s1.Trim(); - s2 = input.Substring(i); - s2 = s2.Trim(); - - //No value? default to 0 - if (string.IsNullOrEmpty(s1)) - { - s1 = "0"; - } - - try - { - value = Convert.ToDouble(s1); - } - catch - { - return new Measurement(0, Result.BadValue); - } - - try - { - this.GetUnitBySymbol(s2); - } - catch (Exception) - { - return new Measurement(0, Result.BadUnit); - } - - symbol = s2; - - return new Measurement(value, symbol); - } - #endregion - - } -} - diff --git a/Units/UnitProvider.cs b/Units/UnitProvider.cs deleted file mode 100644 index d2de7ee..0000000 --- a/Units/UnitProvider.cs +++ /dev/null @@ -1,466 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Xml; - -namespace Units -{ - /// - /// Facilitates the loading and caching of the unit of measure data. - /// - public class UnitProvider - { - - #region "Constructors" - public UnitProvider() - { - if (_dataFile == null) - { - this.LoadDataFile(); - } - } - #endregion - - #region "Properties" - static private XmlDocument _dataFile; - protected XmlDocument DataFile - { - get{return _dataFile;} - set{ _dataFile = value;} - } - - //Singleton - private static Dictionary _unitTypes; - public Dictionary UnitTypes - { - get - { - if (_unitTypes == null) - { - GetAllUnitTypes(); - } - return _unitTypes; - } - } - - private Dictionary _units; - public Dictionary Units - { - get - { - if (_units == null) - { - _units = GetAllUnits(); - } - return _units; - } - } - - private static Dictionary> _individualModifiers; - private static Dictionary _symbols; - - private static Dictionary _individualSymbols; - private static Dictionary> _symbolLookUp; - public Dictionary Symbols - { - get - { - if (_symbols == null) - { - _symbols = GetAllSymbols(); - } - return _symbols; - } - } - #endregion - - #region "Methods" - #region "File Load Methods" - - private void LoadDataFile() - { - const string fileName = "Cubico.UnitData.xml"; - var assembly = Assembly.GetExecutingAssembly(); - var stream = assembly.GetManifestResourceStream(fileName); - - if (stream == null) - { - throw new FileNotFoundException("Cannot find unit data file", fileName); - } - - _dataFile = new XmlDocument(); - _dataFile.Load(stream); - - this.ProcessUnitConverterData(); - } - - private void ProcessUnitConverterData() - { - foreach (XmlNode node in this.DataFile.ChildNodes) - { - if (node.Name == "UnitConverterData") - { - ProcessDataTypes(node); - } - } - } - - private void ProcessDataTypes(XmlNode parentNode) - { - foreach (XmlNode node in parentNode.ChildNodes) - { - switch (node.Name) - { - case "UnitTypes": - ProcessUnitTypes(node); - break; - case "Units": - ProcessUnits(node); - break; - case "Symbols": - ProcessUnitSymbols(node); - break; - case "UnitModifiers": - ProcessUnitModifiers(node); - break; - } - } - } - - private void ProcessUnitModifiers(XmlNode parentNode) - { - _individualModifiers = new Dictionary>(); - - foreach (XmlNode node in parentNode.ChildNodes) - { - if (node.Name == "UnitModifier") - { - var mod = new Modifier(); - - foreach (XmlAttribute attrib in node.Attributes) - { - switch (attrib.Name) - { - case "ID": - mod.ID = Convert.ToInt32(attrib.Value); - break; - case "Value": - mod.Value = Convert.ToDecimal(attrib.Value); - break; - case "Order": - mod.Order = Convert.ToInt32(attrib.Value); - break; - case "ModifierID": - mod.ModifierType = (ModifierType)Convert.ToInt32(attrib.Value); - break; - case "UnitSourceID": - mod.UnitSourceID = Convert.ToInt32(attrib.Value); - break; - case "UnitTargetID": - mod.UnitTargetID = Convert.ToInt32(attrib.Value); - break; - case "Precision": - mod.Precision = Convert.ToInt32(attrib.Value); - break; - } - - } - - if (_individualModifiers.ContainsKey(mod.UnitTargetID)) - { - var data = _individualModifiers[mod.UnitTargetID]; - data.Add(mod); - } - else - { - var data = new List {mod}; - _individualModifiers.Add(mod.UnitTargetID, data); - } - - } - } - } - - private void ProcessUnitSymbols(XmlNode parentNode) - { - _symbolLookUp = new Dictionary>(); - foreach (XmlNode node in parentNode.ChildNodes) - { - if (node.Name == "UnitSymbol") - { - var sym = new Units.Symbol(); - - foreach (XmlAttribute attrib in node.Attributes) - { - switch (attrib.Name) - { - case "ID": - sym.Id = Convert.ToInt32(attrib.Value); - break; - case "Symbol": - sym.Value = attrib.Value; - break; - case "UnitID": - sym.UnitId = Convert.ToInt32(attrib.Value); - break; - case "IsDefault": - int value = Convert.ToInt32(attrib.Value); - if (value == 1) - sym.IsDefault = true; - else - sym.IsDefault = false; - - break; - } - - } - - if (_symbolLookUp.ContainsKey(sym.UnitId)) - { - var data = _symbolLookUp[sym.UnitId]; - data.Add(sym); - } - else - { - var data = new List {sym}; - _symbolLookUp.Add(sym.UnitId, data); - } - } - } - } - - private void ProcessUnits(XmlNode parentNode) - { - _units = new Dictionary(); - foreach (XmlNode node in parentNode.ChildNodes) - { - - if (node.Name == "Unit") - { - var unit = new Unit(); - - foreach (XmlAttribute attrib in node.Attributes) - { - switch (attrib.Name) - { - case "ID": - unit.ID = Convert.ToInt32(attrib.Value); - break; - case "Name": - unit.Name = attrib.Value; - break; - case "UnitTypeID": - unit.UnitTypeID = Convert.ToInt32(attrib.Value); - break; - } - - } - - if (_symbolLookUp.ContainsKey(unit.ID)) - { - unit.Symbols = _symbolLookUp[unit.ID]; - - foreach (Symbol sym in unit.Symbols) - { - sym.Unit = unit; - } - } - if (_individualModifiers.ContainsKey(unit.ID)) - { - unit.Modifiers = _individualModifiers[unit.ID]; - - foreach (Modifier mod in unit.Modifiers) - { - mod.ParentUnit = unit; - } - } - _units.Add(unit.Name, unit); - - } - } - } - - private void ProcessUnitTypes(XmlNode parentNode) - { - _unitTypes = new Dictionary(); - foreach (XmlNode node in parentNode.ChildNodes) - { - if(node.Name == "UnitType") - { - var ut = new UnitType(); - - foreach (XmlAttribute attrib in node.Attributes) - { - switch (attrib.Name) - { - case "ID": - ut.ID = Convert.ToInt32(attrib.Value); - break; - case "Name": - ut.Name = attrib.Value; - break; - case "Description": - ut.Description = attrib.Value; - break; - } - - } - - //Make this a for loop for speed reasons or use a multikey dictionary. - var unitData = (from unit in _units.Values - where unit.UnitTypeID == ut.ID - select unit).ToList(); - ut.Units = unitData; - - foreach (Unit unitItem in ut.Units) - { - unitItem.UnitType = ut; - } - - _unitTypes.Add(ut.Name, ut); - - } - } - } - #endregion - - #region "UnitTypes" - //TODO: Change to ReadOnlyDictionary when .Net 4.0 is available - private void GetAllUnitTypes() - { - - - } - #endregion - - #region "Units" - //TODO: Change to ReadOnlyDictionary when .Net 4.0 is available - private Dictionary GetAllUnits() - { - var unitDict = new Dictionary(); - var unitPro = new UnitProvider(); - var query = from s in unitPro.UnitTypes select s; - - - foreach (var itm in query) - { - UnitType ut = itm.Value; - - foreach (var un in ut.Units) - { - if (!unitDict.ContainsKey(un.Name)) - { - unitDict.Add(un.Name, un); - } - } - //Units "Celsius" - } - //UnitTypes "Temperature" - - return unitDict; - } - #endregion - - #region "Symbols" - - - public Dictionary IndividualSymbols - { - get - { - if (_individualSymbols == null) - { - _individualSymbols = GetAllIndividualSymbols(); - } - return _individualSymbols; - } - } - - //TODO: Change to ReadOnlyDictionary when .Net 4.0 is available - private Dictionary GetAllSymbols() - { - var unitDict = new Dictionary(); - var query = from s in this.UnitTypes select s; - - foreach (var itm in query) - { - UnitType ut = itm.Value; - - foreach (var un in ut.Units) - { - Unit unit = un; - - if (unit.Symbols == null || unit.Symbols.Count == 0) - { - //No symbols. Add name of unit as symbol. - if (!unitDict.ContainsKey(unit.Name)) - { - unitDict.Add(unit.Name, unit); - } - } - else - { - foreach (var sy in unit.Symbols) - { - if (!unitDict.ContainsKey(sy.Value)) - { - unitDict.Add(sy.Value, unit); - } - } - //Symbols "C" - - if (!unitDict.ContainsKey(unit.Name)) - { - unitDict.Add(unit.Name, unit); - //Add name as symbol just in case - } - } - } - //Units "Celsius" - } - //UnitTypes "Temperature" - - return unitDict; - } - - //TODO: Change to ReadOnlyDictionary when .Net 4.0 is available - private Dictionary GetAllIndividualSymbols() - { - var unitDict = new Dictionary(); - var unitPro = new UnitProvider(); - - var query = from s in unitPro.UnitTypes select s; - - - foreach (var itm in query) - { - UnitType ut = itm.Value; - - - foreach (var un in ut.Units) - { - Unit unit = un; - - foreach (var us in unit.Symbols) - { - if (!unitDict.ContainsKey(us.Value)) - { - unitDict.Add(us.Value, us); - } - } - - } - - } - - return unitDict; - } - - #endregion - #endregion - } - -} \ No newline at end of file From cdb82a499f79ade8122a7b8e17fd729a571cde04 Mon Sep 17 00:00:00 2001 From: Taylor Shuler Date: Wed, 19 Jun 2013 11:59:52 -0700 Subject: [PATCH 2/3] Completed test conversion - Now uses NUnit's framework --- Cubico.Tests/ConversionResultTest.cs | 124 +- Cubico.Tests/Cubico.Tests.csproj | 1 - Cubico.Tests/MeasurementTests.cs | 579 ++-- Cubico.Tests/ModifierTest.cs | 120 +- Cubico.Tests/SymbolTest.cs | 228 +- Cubico.Tests/UnitConverterTest.cs | 2477 ++++++++-------- Cubico.Tests/UnitConverterTest2.cs | 4032 +++++++++++++------------- Cubico.Tests/UnitConverterTest3.cs | 3449 +++++++++++----------- Cubico.Tests/UnitConverterTest4.cs | 1188 ++++---- Cubico.Tests/UnitProviderTest.cs | 126 +- Cubico.Tests/UnitTest.cs | 225 +- Cubico.Tests/UnitTest1.cs | 53 - Cubico.Tests/UnitTypeTest.cs | 167 +- Cubico.userprefs | 16 +- 14 files changed, 6006 insertions(+), 6779 deletions(-) delete mode 100644 Cubico.Tests/UnitTest1.cs diff --git a/Cubico.Tests/ConversionResultTest.cs b/Cubico.Tests/ConversionResultTest.cs index 3f002d2..0143e54 100644 --- a/Cubico.Tests/ConversionResultTest.cs +++ b/Cubico.Tests/ConversionResultTest.cs @@ -7,64 +7,39 @@ namespace Cubico.Tests [TestFixture] public class ConversionResultTest { - private TestContext testContextInstance; - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// + TestContext testContextInstance; + + // Gets or sets the test context which provides information about and functionality for the current test run. public TestContext TestContext { get { return testContextInstance; } set { testContextInstance = value; } } - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ - //Public Sub MyTestCleanup() - //End Sub - // - #endregion #region "ConversionResult.ConversionResult()" + [Test] public void ConversionResultConstructorTest () { ConversionResult res = new ConversionResult (); Assert.IsNotNull (res); - Assert.AreEqual (0, res.Value); + Assert.AreEqual (0, res.Value); Assert.AreEqual (Result.NoError, res.Result); - Assert.AreEqual (null, res.Symbol); + Assert.AreEqual (null, res.Symbol); } - #endregion + #endregion #region "ConversionResult.ConversionResult(Double)" + [Test] public void ConversionResultConstructorDoubleTest () { ConversionResult res = new ConversionResult (10.5); Assert.IsNotNull (res); - Assert.AreEqual (10.5, res.Value); + Assert.AreEqual (10.5, res.Value); Assert.AreEqual (Result.NoError, res.Result); - Assert.AreEqual (null, res.Symbol); + Assert.AreEqual (null, res.Symbol); } [Test] @@ -73,22 +48,23 @@ public void ConversionResultConstructorDoubleZeroTest () ConversionResult res = new ConversionResult ((double)0); Assert.IsNotNull (res); - Assert.AreEqual (0, res.Value); + Assert.AreEqual (0, res.Value); Assert.AreEqual (Result.NoError, res.Result); - Assert.AreEqual (null, res.Symbol); + Assert.AreEqual (null, res.Symbol); } - #endregion + #endregion #region "ConversionResult.ConversionResult(Double, String)" + [Test] public void ConversionResultConstructorDoubleStringTest () { ConversionResult res = new ConversionResult (10.5, "lb"); Assert.IsNotNull (res); - Assert.AreEqual (10.5, res.Value); + Assert.AreEqual (10.5, res.Value); Assert.AreEqual (Result.NoError, res.Result); - Assert.AreEqual ("lb", res.Symbol); + Assert.AreEqual ("lb", res.Symbol); } [Test] @@ -97,9 +73,9 @@ public void ConversionResultConstructorDoubleStringNullTest () ConversionResult res = new ConversionResult (0, Convert.ToString (null)); Assert.IsNotNull (res); - Assert.AreEqual (0, res.Value); + Assert.AreEqual (0, res.Value); Assert.AreEqual (Result.NoError, res.Result); - Assert.AreEqual (null, res.Symbol); + Assert.AreEqual (null, res.Symbol); } [Test] @@ -108,9 +84,9 @@ public void ConversionResultConstructorDoubleStringNullTest2 () ConversionResult res = new ConversionResult (10.5, Convert.ToString (null)); Assert.IsNotNull (res); - Assert.AreEqual (10.5, res.Value); + Assert.AreEqual (10.5, res.Value); Assert.AreEqual (Result.NoError, res.Result); - Assert.AreEqual (null, res.Symbol); + Assert.AreEqual (null, res.Symbol); } [Test] @@ -119,22 +95,23 @@ public void ConversionResultConstructorDoubleStringZeroTest3 () ConversionResult res = new ConversionResult (0, "lb"); Assert.IsNotNull (res); - Assert.AreEqual (0, res.Value); + Assert.AreEqual (0, res.Value); Assert.AreEqual (Result.NoError, res.Result); - Assert.AreEqual ("lb", res.Symbol); + Assert.AreEqual ("lb", res.Symbol); } - #endregion + #endregion #region "ConversionResult.ConversionResult(Double, Result)" + [Test] public void ConversionResultConstructorDoubleResultTest () { ConversionResult res = new ConversionResult (10.5, Result.GenericError); Assert.IsNotNull (res); - Assert.AreEqual (10.5, res.Value); + Assert.AreEqual (10.5, res.Value); Assert.AreEqual (Result.GenericError, res.Result); - Assert.AreEqual (null, res.Symbol); + Assert.AreEqual (null, res.Symbol); } [Test] @@ -143,9 +120,9 @@ public void ConversionResultConstructorDoubleResultNullTest () ConversionResult res = new ConversionResult (0, (Result)0); Assert.IsNotNull (res); - Assert.AreEqual (0, res.Value); + Assert.AreEqual (0, res.Value); Assert.AreEqual (Result.NoError, res.Result); - Assert.AreEqual (null, res.Symbol); + Assert.AreEqual (null, res.Symbol); } [Test] @@ -154,9 +131,9 @@ public void ConversionResultConstructorDoubleResultNullTest2 () ConversionResult res = new ConversionResult (10.5, (Result)0); Assert.IsNotNull (res); - Assert.AreEqual (10.5, res.Value); + Assert.AreEqual (10.5, res.Value); Assert.AreEqual (Result.NoError, res.Result); - Assert.AreEqual (null, res.Symbol); + Assert.AreEqual (null, res.Symbol); } [Test] @@ -165,22 +142,23 @@ public void ConversionResultConstructorDoubleResultNullTest3 () ConversionResult res = new ConversionResult (0, Result.GenericError); Assert.IsNotNull (res); - Assert.AreEqual (0, res.Value); + Assert.AreEqual (0, res.Value); Assert.AreEqual (Result.GenericError, res.Result); - Assert.AreEqual (null, res.Symbol); + Assert.AreEqual (null, res.Symbol); } - #endregion + #endregion #region "ConversionResult.ConversionResult(Result)" + [Test] public void ConversionResultConstructorResultTest () { ConversionResult res = new ConversionResult (Result.GenericError); Assert.IsNotNull (res); - Assert.AreEqual (0, res.Value); + Assert.AreEqual (0, res.Value); Assert.AreEqual (Result.GenericError, res.Result); - Assert.AreEqual (null, res.Symbol); + Assert.AreEqual (null, res.Symbol); } [Test] @@ -189,13 +167,14 @@ public void ConversionResultConstructorResultNullTest () ConversionResult res = new ConversionResult (0.0); Assert.IsNotNull (res); - Assert.AreEqual (0, res.Value); + Assert.AreEqual (0, res.Value); Assert.AreEqual (Result.NoError, res.Result); - Assert.AreEqual (null, res.Symbol); + Assert.AreEqual (null, res.Symbol); } - #endregion + #endregion #region "ConversionResult.Result" + [Test] public void ConversionResultResultTest () { @@ -221,20 +200,21 @@ public void ConversionResultResultNullTest () Assert.AreEqual (Result.NoError, res.Result); } - #endregion + #endregion #region "ConversionResult.Value" + [Test] public void ConversionResultValueTest () { ConversionResult res = new ConversionResult (12.1); Assert.IsNotNull (res); - Assert.AreEqual (12.1, res.Value); + Assert.AreEqual (12.1, res.Value); res.Value = 0.33; - Assert.AreEqual (0.33, res.Value); + Assert.AreEqual (0.33, res.Value); } [Test] @@ -243,26 +223,27 @@ public void ConversionResultValueNullTest () ConversionResult res = new ConversionResult (12.1); Assert.IsNotNull (res); - Assert.AreEqual (12.1, res.Value); + Assert.AreEqual (12.1, res.Value); res.Value = 0.0; - Assert.AreEqual (0, res.Value); + Assert.AreEqual (0, res.Value); } - #endregion + #endregion #region "ConversionResult.Symbol" + [Test] public void ConversionResultSymbolTest () { ConversionResult res = new ConversionResult (12.1, "ft"); Assert.IsNotNull (res); - Assert.AreEqual ("ft", res.Symbol); + Assert.AreEqual ("ft", res.Symbol); res.Symbol = "C"; - Assert.AreEqual ("C", res.Symbol); + Assert.AreEqual ("C", res.Symbol); } [Test] @@ -271,12 +252,13 @@ public void ConversionResultSymbolNullTest () ConversionResult res = new ConversionResult (12.1, "ft"); Assert.IsNotNull (res); - Assert.AreEqual ("ft", res.Symbol); + Assert.AreEqual ("ft", res.Symbol); res.Symbol = null; - Assert.AreEqual (null, res.Symbol); + Assert.AreEqual (null, res.Symbol); } + #endregion } } \ No newline at end of file diff --git a/Cubico.Tests/Cubico.Tests.csproj b/Cubico.Tests/Cubico.Tests.csproj index db7cfb6..fb8b468 100644 --- a/Cubico.Tests/Cubico.Tests.csproj +++ b/Cubico.Tests/Cubico.Tests.csproj @@ -38,7 +38,6 @@ - diff --git a/Cubico.Tests/MeasurementTests.cs b/Cubico.Tests/MeasurementTests.cs index 94a9fcb..01e7773 100644 --- a/Cubico.Tests/MeasurementTests.cs +++ b/Cubico.Tests/MeasurementTests.cs @@ -4,51 +4,21 @@ namespace Cubico.Tests { - ///This is a test class for MeasurementTest and is intended to contain all MeasurementTest Unit Tests [TestFixture] public class MeasurementTests { - private TestContext testContextInstance; - private UnitProvider unitPro = new UnitProvider (); - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// + TestContext testContextInstance; + UnitProvider unitPro = new UnitProvider (); + + // Gets or sets the test context which provides information about and functionality for the current test run. public TestContext TestContext { get { return testContextInstance; } set { testContextInstance = value; } } - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ - //Public Sub MyTestCleanup() - //End Sub - // - #endregion #region "Measurement.Value" - /// - ///A test for Value - /// - [TestMethod()] + + [Test] public void MeasurementValueTest () { double expected = 10; @@ -56,15 +26,13 @@ public void MeasurementValueTest () double actual = 0; actual = target.Value; - Assert.AreEqual (expected, actual); + Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.Unit" - /// - ///A test for Unit - /// - [TestMethod()] + + [Test] public void MeasurementUnitTest () { Unit expected = unitPro.Units ["Feet"]; @@ -72,15 +40,13 @@ public void MeasurementUnitTest () Unit actual = default(Unit); actual = target.Unit; - Assert.AreEqual (expected.Name, actual.Name); + Assert.AreEqual (expected.Name, actual.Name); } - #endregion + #endregion #region "Measurement.Symbol" - /// - ///A test for Symbol - /// - [TestMethod()] + + [Test] public void MeasurementSymbolTest () { string expected = "ft"; @@ -88,10 +54,10 @@ public void MeasurementSymbolTest () string actual = null; actual = target.Symbol; - Assert.AreEqual (expected, actual); + Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementSymbolNullTest () { string expected = null; @@ -100,13 +66,11 @@ public void MeasurementSymbolNullTest () actual = target.Symbol; } - #endregion + #endregion #region "Measurement.IsValid" - /// - ///A test for IsValid - /// - [TestMethod()] + + [Test] public void MeasurementIsValidTest () { bool expected = true; @@ -114,10 +78,10 @@ public void MeasurementIsValidTest () bool actual = false; actual = target.IsValid; - Assert.AreEqual (expected, actual); + Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementIsValidNullTest () { bool expected = false; @@ -125,9 +89,10 @@ public void MeasurementIsValidNullTest () bool actual = false; actual = target.IsValid; - Assert.AreEqual (expected, actual); + Assert.AreEqual (expected, actual); } - //[TestMethod()] + + //[Test] //public void MeasurementIsValidNullTest2() //{ // bool expected = false; @@ -135,12 +100,12 @@ public void MeasurementIsValidNullTest () // bool actual = false; // actual = target.IsValid; - // Assert.AreEqual(expected, actual); + // Assert.AreEqual(expected, actual); // Assert.IsTrue(target == null); // Assert.IsFalse(target != null); //} - [TestMethod()] + [Test] public void MeasurementIsValidBadUnitTest () { bool expected = false; @@ -148,15 +113,13 @@ public void MeasurementIsValidBadUnitTest () bool actual = false; actual = target.IsValid; - Assert.AreEqual (expected, actual); + Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.FullValue" - /// - ///A test for FullValue - /// - [TestMethod()] + + [Test] public void MeasurementFullValueTest () { string expected = "10ft"; @@ -164,24 +127,13 @@ public void MeasurementFullValueTest () string actual = null; actual = target.FullValue; - Assert.AreEqual (expected, actual); + Assert.AreEqual (expected, actual); } - // _ - //Public Sub MeasurementFullValueNullTest() - // Dim expected As String = "10" - // Dim target As Measurement = New Measurement(10, DirectCast(Nothing, String)) - // Dim actual As String - // actual = target.FullValue - // Assert.AreEqual(Of String)(expected, actual) - //End Sub #endregion - #region "Measurement.Flags" - /// - ///A test for Flags - /// - [TestMethod()] + + [Test] public void MeasurementFlagsTest () { Measurement target = new Measurement (10, "ft"); @@ -191,13 +143,11 @@ public void MeasurementFlagsTest () actual = target.Flags; Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.Converter" - /// - ///A test for Converter - /// - [TestMethod()] + + [Test] public void MeasurementConverterTest () { Measurement target = new Measurement (10, "ft"); @@ -206,13 +156,11 @@ public void MeasurementConverterTest () Assert.IsNotNull (actual); } - #endregion + #endregion #region "Measurement.ConversionResult" - /// - ///A test for ConversionResult - /// - [TestMethod()] + + [Test] public void MeasurementConversionResultTest () { Measurement target = new Measurement (10, "ft"); @@ -224,7 +172,7 @@ public void MeasurementConversionResultTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementConversionResultNullTest () { Measurement target = new Measurement (10, "ft"); @@ -235,13 +183,11 @@ public void MeasurementConversionResultNullTest () Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.ValidateEntry(Value,Symbol)" - /// - ///A test for ValidateEntry - /// - [TestMethod()] + + [Test] public void MeasurementValidateEntryValueSymbolTest () { Measurement target = new Measurement (10, "ft"); @@ -253,7 +199,7 @@ public void MeasurementValidateEntryValueSymbolTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementValidateEntryValueSymbolIncompatibleTest () { Measurement target = new Measurement (10, "ft"); @@ -265,7 +211,7 @@ public void MeasurementValidateEntryValueSymbolIncompatibleTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementValidateEntryValueSymbolMaxTest () { Measurement target = new Measurement (10, "ft"); @@ -279,7 +225,7 @@ public void MeasurementValidateEntryValueSymbolMaxTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementValidateEntryValueSymbolMinTest () { Measurement target = new Measurement (10, "ft"); @@ -292,13 +238,11 @@ public void MeasurementValidateEntryValueSymbolMinTest () actual = target.ValidateEntry (value, symbol); Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.ValidateEntry(entry)" - /// - ///A test for ValidateEntry - /// - [TestMethod()] + + [Test] public void MeasurementValidateEntrySymbolTest () { Measurement target = new Measurement (10, "ft"); @@ -309,7 +253,7 @@ public void MeasurementValidateEntrySymbolTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementValidateEntrySymbolIncompatibleTest () { Measurement target = new Measurement (10, "ft"); @@ -320,7 +264,7 @@ public void MeasurementValidateEntrySymbolIncompatibleTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementValidateEntrySymbolMaxTest () { Measurement target = new Measurement (10, "ft"); @@ -333,7 +277,7 @@ public void MeasurementValidateEntrySymbolMaxTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementValidateEntrySymbolMinTest () { Measurement target = new Measurement (10, "ft"); @@ -345,13 +289,11 @@ public void MeasurementValidateEntrySymbolMinTest () actual = target.ValidateEntry (entry); Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.ToString" - /// - ///A test for ToString - /// - [TestMethod()] + + [Test] public void MeasurementToStringTest () { Measurement target = new Measurement (10, "ft"); @@ -360,13 +302,11 @@ public void MeasurementToStringTest () actual = target.ToString (); Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.SetValue(measurementString)" - /// - ///A test for SetValue - /// - [TestMethod()] + + [Test] public void MeasurementSetValueStringTest () { Measurement target = new Measurement ("ft"); @@ -375,10 +315,10 @@ public void MeasurementSetValueStringTest () Result actual = default(Result); actual = target.SetValue (measurement); Assert.AreEqual (expected, actual); - Assert.AreEqual (10, target.Value); + Assert.AreEqual (10, target.Value); } - [TestMethod()] + [Test] public void MeasurementSetValueStringTest2 () { Measurement target = new Measurement ("ft"); @@ -387,10 +327,10 @@ public void MeasurementSetValueStringTest2 () Result actual = default(Result); actual = target.SetValue (measurement); Assert.AreEqual (expected, actual); - Assert.AreEqual (12, target.Value); + Assert.AreEqual (12, target.Value); } - [TestMethod()] + [Test] public void MeasurementSetValueStringTest3 () { Measurement target = new Measurement ("ft"); @@ -400,10 +340,10 @@ public void MeasurementSetValueStringTest3 () Result actual = default(Result); actual = target.SetValue (measurement); Assert.AreEqual (expected, actual); - Assert.AreEqual (1, target.Value); + Assert.AreEqual (1, target.Value); } - [TestMethod()] + [Test] public void MeasurementSetValueStringInvalidTest () { Measurement target = new Measurement ("ft"); @@ -414,7 +354,7 @@ public void MeasurementSetValueStringInvalidTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] [ExpectedException(typeof(ArgumentNullException))] public void MeasurementSetValueStringNullTest () { @@ -424,7 +364,7 @@ public void MeasurementSetValueStringNullTest () Assert.Fail (); } - [TestMethod()] + [Test] [ExpectedException(typeof(ArgumentNullException))] public void MeasurementSetValueStringEmptyTest () { @@ -433,13 +373,11 @@ public void MeasurementSetValueStringEmptyTest () actual = target.SetValue (string.Empty); Assert.Fail (); } - #endregion + #endregion #region "Measurement.SetValue(value)" - /// - ///A test for SetValue - /// - [TestMethod()] + + [Test] public void MeasurementSetValueTest () { Measurement target = new Measurement ("ft"); @@ -449,13 +387,11 @@ public void MeasurementSetValueTest () actual = target.SetValue (value); Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.SetUnit(symbol)" - /// - ///A test for SetUnit - /// - [TestMethod()] + + [Test] public void MeasurementSetUnitTest () { Measurement target = new Measurement ("ft"); @@ -467,7 +403,7 @@ public void MeasurementSetUnitTest () Assert.AreEqual ("Second", target.Unit.Name); } - [TestMethod()] + [Test] public void MeasurementSetUnitTest2 () { Measurement target = new Measurement ("ft"); @@ -479,7 +415,7 @@ public void MeasurementSetUnitTest2 () Assert.AreEqual ("Feet", target.Unit.Name); } - [TestMethod()] + [Test] [ExpectedException(typeof(ArgumentNullException))] public void MeasurementSetUnitNullTest () { @@ -490,7 +426,7 @@ public void MeasurementSetUnitNullTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] [ExpectedException(typeof(ArgumentNullException))] public void MeasurementSetUnitEmptyTest () { @@ -500,13 +436,11 @@ public void MeasurementSetUnitEmptyTest () actual = target.SetUnit (string.Empty); Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.SetMinBound" - /// - ///A test for SetMinBound - /// - [TestMethod()] + + [Test] public void MeasurementSetMinBoundTest () { Measurement target = new Measurement (10, "ft"); @@ -518,7 +452,7 @@ public void MeasurementSetMinBoundTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementSetMinBoundTest2 () { Measurement target = new Measurement (10, "ft"); @@ -530,7 +464,7 @@ public void MeasurementSetMinBoundTest2 () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] [ExpectedException(typeof(ArgumentNullException))] public void MeasurementSetMinBoundNullTest () { @@ -540,7 +474,7 @@ public void MeasurementSetMinBoundNullTest () Assert.Fail (); } - [TestMethod()] + [Test] [ExpectedException(typeof(ArgumentNullException))] public void MeasurementSetMinBoundEmptyTest () { @@ -549,13 +483,11 @@ public void MeasurementSetMinBoundEmptyTest () actual = target.SetMinBound (1, string.Empty); Assert.Fail (); } - #endregion + #endregion #region "Measurement.SetMaxBound" - /// - ///A test for SetMinBound - /// - [TestMethod()] + + [Test] public void MeasurementSetMaxBoundTest () { Measurement target = new Measurement (10, "ft"); @@ -567,7 +499,7 @@ public void MeasurementSetMaxBoundTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementSetMaxBoundTest2 () { Measurement target = new Measurement (10, "ft"); @@ -579,7 +511,7 @@ public void MeasurementSetMaxBoundTest2 () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] [ExpectedException(typeof(ArgumentNullException))] public void MeasurementSetMaxBoundNullTest () { @@ -589,7 +521,7 @@ public void MeasurementSetMaxBoundNullTest () Assert.Fail (); } - [TestMethod()] + [Test] [ExpectedException(typeof(ArgumentNullException))] public void MeasurementSetMaxBoundEmptyTest () { @@ -598,13 +530,11 @@ public void MeasurementSetMaxBoundEmptyTest () actual = target.SetMinBound (1, string.Empty); Assert.Fail (); } - #endregion + #endregion #region "Measurement.Operator -" - /// - ///A test for op_Subtraction - /// - [TestMethod()] + + [Test] public void Measurementop_SubtractionTest () { Measurement d1 = new Measurement (5, "ft"); @@ -615,7 +545,7 @@ public void Measurementop_SubtractionTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_SubtractionDiffUnitTest () { Measurement d1 = new Measurement (5, "ft"); @@ -625,13 +555,11 @@ public void Measurementop_SubtractionDiffUnitTest () actual = (d1 - d2); Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.Operator *" - /// - ///A test for op_Multiply - /// - [TestMethod()] + + [Test] public void Measurementop_MultiplyTest () { Measurement d1 = new Measurement (5, "ft"); @@ -642,7 +570,7 @@ public void Measurementop_MultiplyTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_MultiplyDiffUnitTest () { Measurement d1 = new Measurement (5, "ft"); @@ -652,13 +580,11 @@ public void Measurementop_MultiplyDiffUnitTest () actual = (d1 * d2); Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.Operator <=" - /// - ///A test for op_LessThanOrEqual - /// - [TestMethod()] + + [Test] public void Measurementop_LessThanOrEqualTest () { Measurement left = new Measurement (5, "ft"); @@ -669,7 +595,7 @@ public void Measurementop_LessThanOrEqualTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_LessThanOrEqualTest2 () { Measurement left = new Measurement (5, "ft"); @@ -680,7 +606,7 @@ public void Measurementop_LessThanOrEqualTest2 () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_LessThanOrEqualFalseTest () { Measurement left = new Measurement (5, "ft"); @@ -691,7 +617,7 @@ public void Measurementop_LessThanOrEqualFalseTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_LessThanOrEqualDiffUnitTest () { Measurement left = new Measurement (5, "ft"); @@ -702,7 +628,7 @@ public void Measurementop_LessThanOrEqualDiffUnitTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_LessThanOrEqualDiffUnitTest2 () { Measurement left = new Measurement (5, "ft"); @@ -713,7 +639,7 @@ public void Measurementop_LessThanOrEqualDiffUnitTest2 () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_LessThanOrEqualFalseDiffUnitTest () { Measurement left = new Measurement (5, "ft"); @@ -723,13 +649,11 @@ public void Measurementop_LessThanOrEqualFalseDiffUnitTest () actual = (left <= right); Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.Operator <" - /// - ///A test for op_LessThan - /// - [TestMethod()] + + [Test] public void Measurementop_LessThanTest () { Measurement left = new Measurement (5, "ft"); @@ -740,7 +664,7 @@ public void Measurementop_LessThanTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_LessThanFalseTest () { Measurement left = new Measurement (5, "ft"); @@ -751,7 +675,7 @@ public void Measurementop_LessThanFalseTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_LessThanDiffUnitTest () { Measurement left = new Measurement (5, "ft"); @@ -762,7 +686,7 @@ public void Measurementop_LessThanDiffUnitTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_LessThanFalseDiffUnitTest () { Measurement left = new Measurement (5, "ft"); @@ -772,13 +696,11 @@ public void Measurementop_LessThanFalseDiffUnitTest () actual = (left < right); Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.Operator <>" - /// - ///A test for op_Inequality - /// - [TestMethod()] + + [Test] public void Measurementop_InequalityTest () { Measurement left = new Measurement (5, "ft"); @@ -789,7 +711,7 @@ public void Measurementop_InequalityTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_InequalityFalseTest () { Measurement left = new Measurement (5, "ft"); @@ -800,7 +722,7 @@ public void Measurementop_InequalityFalseTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_InequalityDiffUnitTest () { Measurement left = new Measurement (5, "ft"); @@ -811,7 +733,7 @@ public void Measurementop_InequalityDiffUnitTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_InequalityDiffUnitFalseTest () { Measurement left = new Measurement (5, "ft"); @@ -821,13 +743,11 @@ public void Measurementop_InequalityDiffUnitFalseTest () actual = (left != right); Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.Operator >=" - /// - ///A test for op_GreaterThanOrEqual - /// - [TestMethod()] + + [Test] public void Measurementop_GreaterThanOrEqualTest () { Measurement left = new Measurement (5, "ft"); @@ -838,7 +758,7 @@ public void Measurementop_GreaterThanOrEqualTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_GreaterThanOrEqualTest2 () { Measurement left = new Measurement (5, "ft"); @@ -849,7 +769,7 @@ public void Measurementop_GreaterThanOrEqualTest2 () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_GreaterThanOrEqualFalseTest () { Measurement left = new Measurement (5, "ft"); @@ -860,7 +780,7 @@ public void Measurementop_GreaterThanOrEqualFalseTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_GreaterThanOrEqualDiffUnitTest () { Measurement left = new Measurement (5, "ft"); @@ -871,7 +791,7 @@ public void Measurementop_GreaterThanOrEqualDiffUnitTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_GreaterThanOrEqualDiffUnitTest2 () { Measurement left = new Measurement (5, "ft"); @@ -882,7 +802,7 @@ public void Measurementop_GreaterThanOrEqualDiffUnitTest2 () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_GreaterThanOrEqualDiffUnitFalseTest () { Measurement left = new Measurement (5, "ft"); @@ -892,13 +812,11 @@ public void Measurementop_GreaterThanOrEqualDiffUnitFalseTest () actual = (left >= right); Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.Operator >" - /// - ///A test for op_GreaterThan - /// - [TestMethod()] + + [Test] public void Measurementop_GreaterThanTest () { Measurement left = new Measurement (5, "ft"); @@ -909,7 +827,7 @@ public void Measurementop_GreaterThanTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_GreaterThanFalseTest () { Measurement left = new Measurement (5, "ft"); @@ -920,7 +838,7 @@ public void Measurementop_GreaterThanFalseTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_GreaterThanDiffUnitTest () { Measurement left = new Measurement (5, "ft"); @@ -931,7 +849,7 @@ public void Measurementop_GreaterThanDiffUnitTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_GreaterThanDiffUnitFalseTest () { Measurement left = new Measurement (5, "ft"); @@ -941,13 +859,11 @@ public void Measurementop_GreaterThanDiffUnitFalseTest () actual = (left > right); Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.Operator =" - /// - ///A test for op_Equality - /// - [TestMethod()] + + [Test] public void Measurementop_EqualityTest () { Measurement left = new Measurement (5, "ft"); @@ -958,7 +874,7 @@ public void Measurementop_EqualityTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_EqualityDiffUnitTest () { Measurement left = new Measurement (5, "ft"); @@ -969,7 +885,7 @@ public void Measurementop_EqualityDiffUnitTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_EqualityFalseTest () { Measurement left = new Measurement (5, "ft"); @@ -980,7 +896,7 @@ public void Measurementop_EqualityFalseTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_EqualityDiffUnitFalseTest () { Measurement left = new Measurement (5, "ft"); @@ -990,13 +906,11 @@ public void Measurementop_EqualityDiffUnitFalseTest () actual = (left == right); Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.Operator /" - /// - ///A test for op_Division - /// - [TestMethod()] + + [Test] public void Measurementop_DivisionTest () { Measurement d1 = new Measurement (25, "ft"); @@ -1007,7 +921,7 @@ public void Measurementop_DivisionTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_DivisionDiffUnitTest () { Measurement d1 = new Measurement (25, "ft"); @@ -1017,13 +931,11 @@ public void Measurementop_DivisionDiffUnitTest () actual = (d1 / d2); Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.Operator +" - /// - ///A test for op_Addition - /// - [TestMethod()] + + [Test] public void Measurementop_AdditionTest () { Measurement d1 = new Measurement (5, "ft"); @@ -1034,7 +946,7 @@ public void Measurementop_AdditionTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void Measurementop_AdditionDiffUnitTest () { Measurement d1 = new Measurement (5, "ft"); @@ -1044,25 +956,23 @@ public void Measurementop_AdditionDiffUnitTest () actual = (d1 + d2); Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.GetValueAs(unitSymbol)" - /// - ///A test for GetValueAs - /// - //[TestMethod()] - //public void MeasurementGetValueAsTest() - //{ - // Measurement target = new Measurement(5, "ft"); - // string unitSymbol = "in"; - // Measurement expected = new Measurement(Convert.ToDecimal("60.0000"), "in"); - // Measurement actual = default(Measurement); - // actual = target.GetValueAs(unitSymbol); - // Assert.AreEqual(expected.Value, actual.Value); - // Assert.AreEqual(expected.ToString, actual.ToString); - //} - [TestMethod()] + [Test] + public void MeasurementGetValueAsTest() + { + Measurement target = new Measurement(5, "ft"); + string unitSymbol = "in"; + Measurement expected = new Measurement(Convert.ToDecimal("60.0000"), "in"); + Measurement actual = default(Measurement); + actual = target.GetValueAs(unitSymbol); + Assert.AreEqual(expected.Value, actual.Value); + Assert.AreEqual(expected.ToString, actual.ToString); + } + + [Test] public void MeasurementGetValueAsInvalidUnitSymbolTest () { Measurement target = new Measurement (5, "ft"); @@ -1074,13 +984,11 @@ public void MeasurementGetValueAsInvalidUnitSymbolTest () Assert.IsTrue (actual.Value == 0); Assert.IsTrue (actual.Value == 0); } - #endregion + #endregion #region "Measurement.GetStringValueAs(unitSymbol)" - /// - ///A test for GetStringValueAs - /// - [TestMethod()] + + [Test] public void MeasurementGetStringValueAsTest () { Measurement target = new Measurement (5, "ft"); @@ -1091,7 +999,7 @@ public void MeasurementGetStringValueAsTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementGetStringValueAsInvalidUnitSymbolTest () { Measurement target = new Measurement (10, "ft"); @@ -1101,13 +1009,11 @@ public void MeasurementGetStringValueAsInvalidUnitSymbolTest () actual = target.GetStringValueAs (unitSymbol); Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.GetHashCode" - /// - ///A test for GetHashCode - /// - [TestMethod()] + + [Test] public void MeasurementGetHashCodeTest () { Measurement target = new Measurement (10, "ft"); @@ -1127,13 +1033,11 @@ public void MeasurementGetHashCodeTest () actual = target.GetHashCode (); Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.Equals(Of Measurement)" - /// - ///A test for Equals - /// - [TestMethod()] + + [Test] public void MeasurementEqualsOfTest () { IEquatable target = new Measurement (5, "ft"); @@ -1144,7 +1048,7 @@ public void MeasurementEqualsOfTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementEqualsOfTest2 () { IEquatable target = new Measurement (5, "ft"); @@ -1155,7 +1059,7 @@ public void MeasurementEqualsOfTest2 () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementEqualsOfFalseTest () { IEquatable target = new Measurement (5, "ft"); @@ -1166,7 +1070,7 @@ public void MeasurementEqualsOfFalseTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementEqualsOfInvalidUnitTest () { IEquatable target = new Measurement (5, "ft"); @@ -1176,13 +1080,11 @@ public void MeasurementEqualsOfInvalidUnitTest () actual = target.Equals (other); Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.Equals(obj)" - /// - ///A test for Equals - /// - [TestMethod()] + + [Test] public void MeasurementEqualsTest () { Measurement target = new Measurement (5, "ft"); @@ -1193,7 +1095,7 @@ public void MeasurementEqualsTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementEqualsTest2 () { Measurement target = new Measurement (5, "ft"); @@ -1204,7 +1106,7 @@ public void MeasurementEqualsTest2 () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementEqualsFalseTest () { Measurement target = new Measurement (5, "ft"); @@ -1215,7 +1117,7 @@ public void MeasurementEqualsFalseTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementEqualsInvalidTest () { Measurement target = new Measurement (5, "ft"); @@ -1226,7 +1128,7 @@ public void MeasurementEqualsInvalidTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementEqualsInvalidTypeTest () { Measurement target = new Measurement (5, "ft"); @@ -1236,13 +1138,11 @@ public void MeasurementEqualsInvalidTypeTest () actual = target.Equals (obj); Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.CompareTo" - /// - ///A test for CompareTo - /// - [TestMethod()] + + [Test] public void MeasurementCompareToTest () { IComparable target = new Measurement (5, "ft"); @@ -1253,7 +1153,7 @@ public void MeasurementCompareToTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementCompareToGreaterTest () { IComparable target = new Measurement (5, "ft"); @@ -1264,7 +1164,7 @@ public void MeasurementCompareToGreaterTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementCompareToGreaterDifferentUnitTest () { IComparable target = new Measurement (5, "ft"); @@ -1275,7 +1175,7 @@ public void MeasurementCompareToGreaterDifferentUnitTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementCompareToLessTest () { IComparable target = new Measurement (5, "ft"); @@ -1286,7 +1186,7 @@ public void MeasurementCompareToLessTest () Assert.AreEqual (expected, actual); } - [TestMethod()] + [Test] public void MeasurementCompareToGreaterLessUnitTest () { IComparable target = new Measurement (5, "ft"); @@ -1296,13 +1196,11 @@ public void MeasurementCompareToGreaterLessUnitTest () actual = target.CompareTo (other); Assert.AreEqual (expected, actual); } - #endregion + #endregion #region "Measurement.Measurement(Value, UnitSymbol)" - /// - ///A test for Measurement Constructor - /// - [TestMethod()] + + [Test] public void MeasurementConstructorValueUnitSymbolTest () { double value = 10; @@ -1312,11 +1210,11 @@ public void MeasurementConstructorValueUnitSymbolTest () Assert.IsNotNull (target); Assert.IsTrue (target.Flags == MeasurementFlags.None); Assert.IsTrue (target.ConversionResult == Result.NoError); - Assert.AreEqual ("Feet", target.Unit.Name); - Assert.AreEqual (10, target.Value); + Assert.AreEqual ("Feet", target.Unit.Name); + Assert.AreEqual (10, target.Value); } - [TestMethod()] + [Test] public void MeasurementConstructorValueUnitSymbolNullNullTest () { Measurement target = new Measurement (0, (string)null); @@ -1324,11 +1222,11 @@ public void MeasurementConstructorValueUnitSymbolNullNullTest () Assert.IsNotNull (target); Assert.IsTrue (target.Flags == MeasurementFlags.None); Assert.IsTrue (target.ConversionResult == Result.BadUnit); - Assert.AreEqual (null, target.Unit); - Assert.AreEqual (0, target.Value); + Assert.AreEqual (null, target.Unit); + Assert.AreEqual (0, target.Value); } - [TestMethod()] + [Test] public void MeasurementConstructorValueUnitSymbolValueNullTest () { Measurement target = new Measurement (0, "ft"); @@ -1336,11 +1234,11 @@ public void MeasurementConstructorValueUnitSymbolValueNullTest () Assert.IsNotNull (target); Assert.IsTrue (target.Flags == MeasurementFlags.None); Assert.IsTrue (target.ConversionResult == Result.NoError); - Assert.AreEqual ("Feet", target.Unit.Name); - Assert.AreEqual (0, target.Value); + Assert.AreEqual ("Feet", target.Unit.Name); + Assert.AreEqual (0, target.Value); } - [TestMethod()] + [Test] public void MeasurementConstructorValueUnitSymbolUnitSymbolNullTest () { Measurement target = new Measurement (10, (string)null); @@ -1348,11 +1246,11 @@ public void MeasurementConstructorValueUnitSymbolUnitSymbolNullTest () Assert.IsNotNull (target); Assert.IsTrue (target.Flags == MeasurementFlags.None); Assert.IsTrue (target.ConversionResult == Result.BadUnit); - Assert.AreEqual (null, target.Unit); - Assert.AreEqual (10, target.Value); + Assert.AreEqual (null, target.Unit); + Assert.AreEqual (10, target.Value); } - [TestMethod()] + [Test] public void MeasurementConstructorValueUnitSymbolEmptyTest () { Measurement target = new Measurement (10, string.Empty); @@ -1360,16 +1258,14 @@ public void MeasurementConstructorValueUnitSymbolEmptyTest () Assert.IsNotNull (target); Assert.IsTrue (target.Flags == MeasurementFlags.None); Assert.IsTrue (target.ConversionResult == Result.BadUnit); - Assert.AreEqual (null, target.Unit); - Assert.AreEqual (10, target.Value); + Assert.AreEqual (null, target.Unit); + Assert.AreEqual (10, target.Value); } - #endregion + #endregion #region "Measurement.Measurement(unitSymbol)" - /// - ///A test for Measurement Constructor - /// - [TestMethod()] + + [Test] public void MeasurementConstructorUnitSymbolTest () { string unitSymbol = "ft"; @@ -1378,11 +1274,11 @@ public void MeasurementConstructorUnitSymbolTest () Assert.IsNotNull (target); Assert.IsTrue (target.Flags == MeasurementFlags.None); Assert.IsTrue (target.ConversionResult == Result.NoError); - Assert.AreEqual ("Feet", target.Unit.Name); - Assert.AreEqual (0, target.Value); + Assert.AreEqual ("Feet", target.Unit.Name); + Assert.AreEqual (0, target.Value); } - [TestMethod()] + [Test] public void MeasurementConstructorUnitSymbolNullTest () { Measurement target = new Measurement (null); @@ -1390,11 +1286,11 @@ public void MeasurementConstructorUnitSymbolNullTest () Assert.IsNotNull (target); Assert.IsTrue (target.Flags == MeasurementFlags.None); Assert.IsTrue (target.ConversionResult == Result.BadUnit); - Assert.AreEqual (null, target.Unit); - Assert.AreEqual (0, target.Value); + Assert.AreEqual (null, target.Unit); + Assert.AreEqual (0, target.Value); } - [TestMethod()] + [Test] public void MeasurementConstructorUnitSymbolEmptyTest () { Measurement target = new Measurement (null); @@ -1402,16 +1298,14 @@ public void MeasurementConstructorUnitSymbolEmptyTest () Assert.IsNotNull (target); Assert.IsTrue (target.Flags == MeasurementFlags.None); Assert.IsTrue (target.ConversionResult == Result.BadUnit); - Assert.AreEqual (null, target.Unit); - Assert.AreEqual (0, target.Value); + Assert.AreEqual (null, target.Unit); + Assert.AreEqual (0, target.Value); } - #endregion + #endregion #region "Measurement.Measurement(Value, UnitSymbol, ConversionResult)" - /// - ///A test for Measurement Constructor - /// - [TestMethod()] + + [Test] public void MeasurementConstructorValueUnitSymbolResultTest () { double value = 10; @@ -1422,11 +1316,11 @@ public void MeasurementConstructorValueUnitSymbolResultTest () Assert.IsNotNull (target); Assert.IsTrue (target.Flags == MeasurementFlags.None); Assert.IsTrue (target.ConversionResult == Result.NoError); - Assert.AreEqual ("Feet", target.Unit.Name); - Assert.AreEqual (10, target.Value); + Assert.AreEqual ("Feet", target.Unit.Name); + Assert.AreEqual (10, target.Value); } - [TestMethod()] + [Test] public void MeasurementConstructorValueUnitSymbolResultTest2 () { double value = 10; @@ -1437,16 +1331,15 @@ public void MeasurementConstructorValueUnitSymbolResultTest2 () Assert.IsNotNull (target); Assert.IsTrue (target.Flags == MeasurementFlags.None); Assert.IsTrue (target.ConversionResult == Result.GenericError); - Assert.AreEqual ("Feet", target.Unit.Name); - Assert.AreEqual (10, target.Value); + Assert.AreEqual ("Feet", target.Unit.Name); + Assert.AreEqual (10, target.Value); } - #endregion + #endregion #region "Measurement.Measurement(Value,Unit,ConversionResult)" - /// - ///A test for Measurement Constructor - /// - [TestMethod()] + + // A test for Measurement Constructor + [Test] public void MeasurementConstructorValueUnitConversionResultTest () { double value = 10; @@ -1457,11 +1350,11 @@ public void MeasurementConstructorValueUnitConversionResultTest () Assert.IsNotNull (target); Assert.IsTrue (target.Flags == MeasurementFlags.None); Assert.IsTrue (target.ConversionResult == Result.NoError); - Assert.AreEqual ("Feet", target.Unit.Name); - Assert.AreEqual (10, target.Value); + Assert.AreEqual ("Feet", target.Unit.Name); + Assert.AreEqual (10, target.Value); } - [TestMethod()] + [Test] public void MeasurementConstructorValueUnitConversionResultNullTest () { Measurement target = new Measurement (0, (Unit)null, Result.NoError); @@ -1470,15 +1363,14 @@ public void MeasurementConstructorValueUnitConversionResultNullTest () Assert.IsTrue (target.Flags == MeasurementFlags.None); Assert.IsTrue (target.ConversionResult == Result.NoError); Assert.IsNull (target.Unit); - Assert.AreEqual (0, target.Value); + Assert.AreEqual (0, target.Value); } - #endregion + #endregion #region "Measurement.Measurement(Value,Result)" - /// - ///A test for Measurement Constructor - /// - [TestMethod()] + + // A test for Measurement Constructor + [Test] public void MeasurementConstructorValueResultTest () { double value = 10; @@ -1489,10 +1381,10 @@ public void MeasurementConstructorValueResultTest () Assert.IsTrue (target.Flags == MeasurementFlags.None); Assert.IsTrue (target.ConversionResult == Result.NoError); Assert.IsNull (target.Unit); - Assert.AreEqual (10, target.Value); + Assert.AreEqual (10, target.Value); } - [TestMethod()] + [Test] public void MeasurementConstructorValueResultNullTest () { Measurement target = new Measurement (0, Result.NoError); @@ -1501,8 +1393,9 @@ public void MeasurementConstructorValueResultNullTest () Assert.IsTrue (target.Flags == MeasurementFlags.None); Assert.IsTrue (target.ConversionResult == Result.NoError); Assert.IsNull (target.Unit); - Assert.AreEqual (0, target.Value); + Assert.AreEqual (0, target.Value); } + #endregion } } \ No newline at end of file diff --git a/Cubico.Tests/ModifierTest.cs b/Cubico.Tests/ModifierTest.cs index 74406ac..fb56344 100644 --- a/Cubico.Tests/ModifierTest.cs +++ b/Cubico.Tests/ModifierTest.cs @@ -1,51 +1,23 @@ using System; -using System.Diagnostics.Contracts; -using Units; +using Cubico; using NUnit.Framework; namespace Cubico.Tests { - ///This is a test class for UnitTest and is intended to contain all UnitTest Unit Tests [TestFixture] public class ModifierTest { - private TestContext testContextInstance; - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// + TestContext testContextInstance; + + // Gets or sets the test context which provides information about and functionality for the current test run. public TestContext TestContext { get { return testContextInstance; } set { testContextInstance = value; } } - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ - //Public Sub MyTestCleanup() - //End Sub - // - #endregion #region "Modifier.Modifier()" - [TestMethod()] + + [Test] public void ModifierNewTest () { Modifier testObj = new Modifier (); @@ -55,115 +27,83 @@ public void ModifierNewTest () Assert.IsTrue (testObj.Value == 0); Assert.IsNull (testObj.ParentUnit); } - #endregion + #endregion #region "Modifier.ID" - [TestMethod()] + + [Test] public void ModifierIDTest () { Modifier testObj = new Modifier (); - testObj.ID = 99; - Assert.AreEqual (99, testObj.ID); + Assert.AreEqual (99, testObj.ID); } - #endregion + #endregion #region "Modifier.ParentUnit" - [TestMethod()] + + [Test] public void ModifierParentUnitTest () { Unit testUnitObj = new Unit { ID = 99, Name = "Name" }; - Modifier testObj = new Modifier (); + Modifier testObj = new Modifier (); testObj.ParentUnit = testUnitObj; Assert.IsNotNull (testObj.ParentUnit); - Assert.AreEqual (testUnitObj.ID, testObj.ParentUnit.ID); - Assert.AreEqual (testUnitObj.Name, testObj.ParentUnit.Name); + Assert.AreEqual (testUnitObj.ID, testObj.ParentUnit.ID); + Assert.AreEqual (testUnitObj.Name, testObj.ParentUnit.Name); } - [TestMethod()] + [Test] public void ModifierParentUnitNullTest () { Modifier testObj = new Modifier (); - testObj.ParentUnit = null; Assert.IsNull (testObj.ParentUnit); } - #endregion + #endregion #region "Modifier.Value" - [TestMethod()] + + [Test] public void ModifierValueTest () { Modifier testObj = new Modifier (); - testObj.Value = Convert.ToDecimal (0.001); - Assert.AreEqual (Convert.ToDecimal(0.001), testObj.Value); + Assert.AreEqual (Convert.ToDecimal(0.001), testObj.Value); } - #endregion + #endregion #region "Modifier.Order" - [TestMethod()] + + [Test] public void ModifierOrderTest () { Modifier testObj = new Modifier (); - testObj.Order = 10; - Assert.AreEqual (10, testObj.Order); + Assert.AreEqual (10, testObj.Order); } - #endregion + #endregion #region "Modifier.ModifierType" - [TestMethod()] + + [Test] public void ModifierTypeTest () { Modifier testObj = new Modifier (); - testObj.ModifierType = ModifierType.Multiply; - Assert.AreEqual (ModifierType.Multiply, testObj.ModifierType); + Assert.AreEqual (ModifierType.Multiply, testObj.ModifierType); } - #endregion - - //Private Function InitEfObjects() As EFUnit - //Dim efUnitTypeObj As New EFUnitType - //efUnitTypeObj.ID = 10 - //efUnitTypeObj.Name = "Test Type" - //efUnitTypeObj.Description = "Test Desc" - - //Dim efUnitObj As New EFUnit - //efUnitObj.ID = 2 - //efUnitObj.Name = "Test Unit" - //efUnitObj.UnitType = efUnitTypeObj - - //Dim efUnitModifierObj As New EFUnitModifier - //efUnitModifierObj.ID = 2 - //efUnitModifierObj.ModifierID = 2 - //efUnitModifierObj.Order = 1 - //efUnitModifierObj.Value = 0.5 - - //Dim efUnitSymbolObj As New EFUnitSymbol - //efUnitSymbolObj.ID = 3 - //efUnitSymbolObj.IsDefault = True - //efUnitSymbolObj.Symbol = "Tst" - - //efUnitModifierObj.Unit = efUnitObj - //efUnitSymbolObj.Unit = efUnitObj - - //efUnitTypeObj.Unit.Add(efUnitObj) - //efUnitObj.UnitModifiers.Add(efUnitModifierObj) - //efUnitObj.UnitSymbol.Add(efUnitSymbolObj) - - //Return efUnitObj - //End Function + #endregion } } \ No newline at end of file diff --git a/Cubico.Tests/SymbolTest.cs b/Cubico.Tests/SymbolTest.cs index 7acfc95..b09d6cc 100644 --- a/Cubico.Tests/SymbolTest.cs +++ b/Cubico.Tests/SymbolTest.cs @@ -1,52 +1,24 @@ using System; -using System.Diagnostics.Contracts; using Cubico; using NUnit.Framework; namespace Cubico.Tests { - ///This is a test class for UnitTest and is intended to contain all UnitTest Unit Tests - [TestClass()] + [TestFixture] public class SymbolTest { - private TestContext testContextInstance; - private UnitProvider unitPro = new UnitProvider (); - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// + TestContext testContextInstance; + UnitProvider unitPro = new UnitProvider (); + + // Gets or sets the test context which provides information about and functionality for the current test run. public TestContext TestContext { get { return testContextInstance; } set { testContextInstance = value; } } - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ - //Public Sub MyTestCleanup() - //End Sub - // - #endregion #region "Symbol.Symbol()" - [TestMethod()] + + [Test] public void SymbolNewTest () { Symbol testObj = new Symbol (); @@ -56,10 +28,11 @@ public void SymbolNewTest () Assert.IsTrue (testObj.Value == null); Assert.IsNull (testObj.Unit); } - #endregion + #endregion #region "Symbol.Symbol(Unit)" - [TestMethod()] + + [Test] [ExpectedException(typeof(ArgumentNullException))] public void SymbolNewEfUnitSymbolUnitNullTest () { @@ -68,7 +41,7 @@ public void SymbolNewEfUnitSymbolUnitNullTest () Assert.Fail ("Null values are not allowed for this constructor."); } - [TestMethod()] + [Test] public void SymbolNewEfUnitSymbolUnitTest () { Unit unitObj = new Unit { @@ -84,63 +57,46 @@ public void SymbolNewEfUnitSymbolUnitTest () Assert.IsNotNull (testObj.Unit); Assert.IsTrue (testObj.Unit.ID == unitObj.ID); } - #endregion + #endregion #region "Symbol.ID" - //[TestMethod()] - //public void SymbolIDNullTest() - //{ - // Symbol testObj = new Symbol(); - - // testObj.Id = null; - - // Assert.AreEqual(null, testObj.Id); - //} - //[TestMethod()] - //public void SymbolIDNegativeTest() - //{ - // Symbol testObj = new Symbol(); - - // testObj.Id = -1; - - // Assert.IsTrue(testObj.Id == -1); + [Test] + public void SymbolIDNullTest() + { + Symbol testObj = new Symbol(); - // List data = Validation.DataAnnotationValidator.GetErrors(testObj).ToList; + testObj.Id = null; - // Assert.IsNotNull(data); - // Assert.IsTrue(data.Count > 0); - // Assert.IsTrue(data[0].PropertyName == "ID"); - //} + Assert.AreEqual(null, testObj.Id); + } - [TestMethod()] + [Test] public void SymbolIDTest () { Symbol testObj = new Symbol (); testObj.Id = 99; - Assert.AreEqual (99, testObj.Id); + Assert.AreEqual (99, testObj.Id); } - #endregion + #endregion #region "Symbol.ParentUnit" - [TestMethod()] + + [Test] public void SymbolParentUnitTest () { Unit testUnitObj = new Unit (); Symbol testObj = new Symbol (testUnitObj); - - - testObj.Unit = testUnitObj; Assert.IsNotNull (testObj.Unit); - Assert.AreEqual (testUnitObj.ID, testObj.Unit.ID); - Assert.AreEqual (testUnitObj.Name, testObj.Unit.Name); + Assert.AreEqual (testUnitObj.ID, testObj.Unit.ID); + Assert.AreEqual (testUnitObj.Name, testObj.Unit.Name); } - [TestMethod()] + [Test] public void SymbolParentUnitNullTest () { Symbol testObj = new Symbol (); @@ -149,49 +105,37 @@ public void SymbolParentUnitNullTest () Assert.IsNull (testObj.Unit); } - #endregion + #endregion #region "Symbol.Value" - [TestMethod()] + + [Test] public void SymbolValueTest () { Symbol testObj = new Symbol (); testObj.Value = "Test Name"; - Assert.AreEqual ("Test Name", testObj.Value); + Assert.AreEqual ("Test Name", testObj.Value); } - //[TestMethod()] - //public void SymbolValueNullTest() - //{ - // Symbol testObj = new Symbol(); - - // testObj.Value = null; - - // Assert.IsTrue(string.IsNullOrWhiteSpace(testObj.Value)); - // List data = Validation.DataAnnotationValidator.GetErrors(testObj).ToList; - - // Assert.IsNotNull(data); - // Assert.IsTrue(data.Count > 0); - // Assert.IsTrue(data[0].PropertyName == "Value"); - //} #endregion - #region "Symbol.IsDefault" - [TestMethod()] + + [Test] public void SymbolIsDefaultTest () { Symbol testObj = new Symbol (); testObj.IsDefault = true; - Assert.AreEqual (true, testObj.IsDefault); + Assert.AreEqual (true, testObj.IsDefault); } - #endregion + #endregion #region "IEquatable" - [TestMethod()] + + [Test] public void Symbol_EqualityTest () { Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; @@ -200,7 +144,7 @@ public void Symbol_EqualityTest () Assert.IsTrue (expected == target); } - [TestMethod()] + [Test] public void Unit_EqualityTest2 () { Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; @@ -209,7 +153,7 @@ public void Unit_EqualityTest2 () Assert.IsFalse (expected == target); } - [TestMethod()] + [Test] public void Unit_EqualityTest3 () { Symbol expected = null; @@ -218,7 +162,7 @@ public void Unit_EqualityTest3 () Assert.IsFalse (expected == target); } - [TestMethod()] + [Test] public void Unit_EqualityTest4 () { Symbol expected = unitPro.Symbols ["in"].Symbols [0]; @@ -227,7 +171,7 @@ public void Unit_EqualityTest4 () Assert.IsFalse (expected == target); } - [TestMethod()] + [Test] public void Unit_EqualityTest5 () { Symbol expected = null; @@ -236,7 +180,7 @@ public void Unit_EqualityTest5 () Assert.IsTrue (expected == target); } - [TestMethod()] + [Test] public void Unit_EqualityTest6 () { Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; @@ -245,7 +189,7 @@ public void Unit_EqualityTest6 () Assert.IsTrue (expected != target); } - [TestMethod()] + [Test] public void Unit_EqualityTest7 () { Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; @@ -254,7 +198,7 @@ public void Unit_EqualityTest7 () Assert.IsTrue (expected != target); } - [TestMethod()] + [Test] public void Unit_EqualityTest8 () { Symbol expected = null; @@ -263,7 +207,7 @@ public void Unit_EqualityTest8 () Assert.IsTrue (expected != target); } - [TestMethod()] + [Test] public void Unit_EqualityTest8_1 () { Symbol expected = null; @@ -272,7 +216,7 @@ public void Unit_EqualityTest8_1 () Assert.IsFalse (expected != target); } - [TestMethod()] + [Test] public void Unit_EqualityTest9 () { Symbol expected = unitPro.Symbols ["in"].Symbols [0]; @@ -281,7 +225,7 @@ public void Unit_EqualityTest9 () Assert.IsFalse (expected.Equals(target)); } - [TestMethod()] + [Test] public void Unit_EqualityTest10 () { Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; @@ -290,7 +234,7 @@ public void Unit_EqualityTest10 () Assert.IsTrue (expected.Equals(target)); } - [TestMethod()] + [Test] public void Unit_EqualityTest11 () { Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; @@ -299,7 +243,7 @@ public void Unit_EqualityTest11 () Assert.IsFalse (expected.Equals(target)); } - [TestMethod()] + [Test] public void Unit_EqualityTest12 () { Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; @@ -308,7 +252,7 @@ public void Unit_EqualityTest12 () Assert.IsFalse (expected.Equals(target)); } - [TestMethod()] + [Test] public void Unit_EqualityTest13 () { Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; @@ -317,7 +261,7 @@ public void Unit_EqualityTest13 () Assert.IsTrue (expected.Equals((object)target)); } - [TestMethod()] + [Test] public void Unit_EqualityTest14 () { Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; @@ -326,7 +270,7 @@ public void Unit_EqualityTest14 () Assert.IsFalse (expected.Equals((object)target)); } - [TestMethod()] + [Test] public void Unit_EqualityTest154 () { Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; @@ -335,80 +279,14 @@ public void Unit_EqualityTest154 () Assert.IsFalse (expected.Equals((object)target)); } - [TestMethod()] + [Test] public void Unit_EqualityTest15 () { Symbol expected = unitPro.Symbols ["ft"].Symbols [0]; Assert.IsTrue (expected.GetHashCode() == expected.Value.GetHashCode()); } - #endregion - #region "Serialization" - //[TestMethod()] - //public void Unit_BinarySerializationTest() - //{ - // Symbol expected = unitPro.Symbols["ft"].Symbols[0]; - // Symbol actual = default(Symbol); - - // byte[] data = Utility.BinarySerialize(expected); - // actual = (Symbol)Utility.BinaryDeserialize(data); - - // Assert.IsNotNull(actual); - // Assert.AreEqual(expected.Id, actual.Id); - // Assert.AreEqual(expected.Value, actual.Value); - // Assert.AreEqual(expected.IsDefault, actual.IsDefault); - // Assert.AreEqual(expected.UnitId, actual.UnitId); - //} - - //[TestMethod()] - //public void Unit_DataContractSerializationTest() - //{ - // Symbol expected = unitPro.Symbols["ft"].Symbols[0]; - // Symbol actual = default(Symbol); - - // string data = Utility.DataContractSerialize(expected); - // actual = (Symbol)Utility.DataContractDeserialize(data, typeof(Symbol)); - - // Assert.IsNotNull(actual); - // Assert.AreEqual(expected.Id, actual.Id); - // Assert.AreEqual(expected.Value, actual.Value); - // Assert.AreEqual(expected.IsDefault, actual.IsDefault); - // Assert.AreEqual(expected.UnitId, actual.UnitId); - //} #endregion - - //Private Function InitEfObjects() As EFUnit - //Dim efUnitTypeObj As New EFUnitType - //efUnitTypeObj.ID = 10 - //efUnitTypeObj.Name = "Test Type" - //efUnitTypeObj.Description = "Test Desc" - - //Dim efUnitObj As New EFUnit - //efUnitObj.ID = 2 - //efUnitObj.Name = "Test Unit" - //efUnitObj.UnitType = efUnitTypeObj - - //Dim efUnitModifierObj As New EFUnitModifier - //efUnitModifierObj.ID = 2 - //efUnitModifierObj.ModifierID = 2 - //efUnitModifierObj.Order = 1 - //efUnitModifierObj.Value = 0.5 - - //Dim efSymbolsymbolObj As New EFUnitSymbol - //efUnitSymbolObj.ID = 3 - //efUnitSymbolObj.IsDefault = True - //efUnitSymbolObj.Symbol = "Tst" - - //efUnitModifierObj.Unit = efUnitObj - //efUnitSymbolObj.Unit = efUnitObj - - //efUnitTypeObj.Unit.Add(efUnitObj) - //efUnitObj.UnitModifiers.Add(efUnitModifierObj) - //efUnitObj.UnitSymbol.Add(efUnitSymbolObj) - - //Return efUnitObj - //End Function - } } \ No newline at end of file diff --git a/Cubico.Tests/UnitConverterTest.cs b/Cubico.Tests/UnitConverterTest.cs index dfa3413..41ff1d6 100644 --- a/Cubico.Tests/UnitConverterTest.cs +++ b/Cubico.Tests/UnitConverterTest.cs @@ -4,53 +4,22 @@ namespace Cubico.Tests { - ///This is a test class for UnitConverterTest and is intended to contain all UnitConverterTest Unit Tests [TestFixture] public class UnitConverterTest { - private TestContext testContextInstance; - private UnitProvider unitPro = new UnitProvider (); - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// + TestContext testContextInstance; + UnitProvider unitPro = new UnitProvider (); + + // Gets or sets the test context which provides information about and functionality for the current test run. public TestContext TestContext { get { return testContextInstance; } set { testContextInstance = value; } } - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ _ - //Public Sub MyTestCleanup() - //End Sub - // - - #endregion #region "UnitConverter.ParseUnitString" - /// - ///A test for ParseUnitString - /// + [Test] - [TestCategory(UnitTestCategory.Unit)] + [TestCase(UnitTestCategory.Unit)] public void UnitConverter_ParseUnitStringTest () { UnitConverter target = new UnitConverter (); @@ -58,11 +27,11 @@ public void UnitConverter_ParseUnitStringTest () Measurement expected = new Measurement (10, "ft"); Measurement actual = default(Measurement); actual = target.ParseUnitString (input); - Assert.AreEqual (expected, actual); + Assert.AreEqual (expected, actual); } [Test] - [TestCategory(UnitTestCategory.Unit)] + [TestCase(UnitTestCategory.Unit)] public void UnitConverter_ParseUnitStringTest2 () { UnitConverter target = new UnitConverter (); @@ -70,11 +39,11 @@ public void UnitConverter_ParseUnitStringTest2 () Measurement expected = new Measurement (10, "ft"); Measurement actual = default(Measurement); actual = target.ParseUnitString (input); - Assert.AreEqual (expected, actual); + Assert.AreEqual (expected, actual); } [Test] - [TestCategory(UnitTestCategory.Unit)] + [TestCase(UnitTestCategory.Unit)] public void UnitConverter_ParseUnitStringTest3 () { UnitConverter target = new UnitConverter (); @@ -82,11 +51,11 @@ public void UnitConverter_ParseUnitStringTest3 () Measurement expected = new Measurement (10, "m/s"); Measurement actual = default(Measurement); actual = target.ParseUnitString (input); - Assert.AreEqual (expected, actual); + Assert.AreEqual (expected, actual); } [Test] - [TestCategory(UnitTestCategory.Unit)] + [TestCase(UnitTestCategory.Unit)] public void UnitConverter_ParseUnitStringTest4 () { UnitConverter target = new UnitConverter (); @@ -94,11 +63,11 @@ public void UnitConverter_ParseUnitStringTest4 () Measurement expected = new Measurement (10, "'"); Measurement actual = default(Measurement); actual = target.ParseUnitString (input); - Assert.AreEqual (expected, actual); + Assert.AreEqual (expected, actual); } [Test] - [TestCategory(UnitTestCategory.Unit)] + [TestCase(UnitTestCategory.Unit)] public void UnitConverter_ParseUnitStringTest5 () { UnitConverter target = new UnitConverter (); @@ -106,11 +75,11 @@ public void UnitConverter_ParseUnitStringTest5 () Measurement expected = new Measurement (10, "ft²"); Measurement actual = default(Measurement); actual = target.ParseUnitString (input); - Assert.AreEqual (expected, actual); + Assert.AreEqual (expected, actual); } [Test] - [TestCategory(UnitTestCategory.Unit)] + [TestCase(UnitTestCategory.Unit)] public void UnitConverter_ParseUnitStringTest6 () { UnitConverter target = new UnitConverter (); @@ -118,11 +87,11 @@ public void UnitConverter_ParseUnitStringTest6 () Measurement expected = new Measurement (10, "˚"); Measurement actual = default(Measurement); actual = target.ParseUnitString (input); - Assert.AreEqual (expected, actual); + Assert.AreEqual (expected, actual); } [Test] - [TestCategory(UnitTestCategory.Unit)] + [TestCase(UnitTestCategory.Unit)] public void UnitConverter_ParseUnitStringTest7 () { UnitConverter target = new UnitConverter (); @@ -130,11 +99,11 @@ public void UnitConverter_ParseUnitStringTest7 () Measurement expected = new Measurement (10, "˚F"); Measurement actual = default(Measurement); actual = target.ParseUnitString (input); - Assert.AreEqual (expected, actual); + Assert.AreEqual (expected, actual); } [Test] - [TestCategory(UnitTestCategory.Unit)] + [TestCase(UnitTestCategory.Unit)] public void UnitConverter_ParseUnitStringTest8 () { UnitConverter target = new UnitConverter (); @@ -142,11 +111,11 @@ public void UnitConverter_ParseUnitStringTest8 () Measurement expected = new Measurement (10, "µK"); Measurement actual = default(Measurement); actual = target.ParseUnitString (input); - Assert.AreEqual (expected, actual); + Assert.AreEqual (expected, actual); } [Test] - [TestCategory(UnitTestCategory.Unit)] + [TestCase(UnitTestCategory.Unit)] public void UnitConverter_ParseUnitStringTest9 () { UnitConverter target = new UnitConverter (); @@ -154,11 +123,11 @@ public void UnitConverter_ParseUnitStringTest9 () Measurement expected = new Measurement (-10, "µK"); Measurement actual = default(Measurement); actual = target.ParseUnitString (input); - Assert.AreEqual (expected, actual); + Assert.AreEqual (expected, actual); } [Test] - [TestCategory(UnitTestCategory.Unit)] + [TestCase(UnitTestCategory.Unit)] public void UnitConverter_ParseUnitStringNotFoundTest () { UnitConverter target = new UnitConverter (); @@ -167,12 +136,12 @@ public void UnitConverter_ParseUnitStringNotFoundTest () Measurement actual = default(Measurement); actual = target.ParseUnitString (input); - Assert.AreNotEqual (expected, actual); + Assert.AreNotEqual (expected, actual); Assert.AreEqual (expected.ConversionResult, actual.ConversionResult); } [Test] - [TestCategory(UnitTestCategory.Unit)] + [TestCase(UnitTestCategory.Unit)] public void UnitConverter_ParseUnitStringNoSymbolTest () { UnitConverter target = new UnitConverter (); @@ -181,12 +150,12 @@ public void UnitConverter_ParseUnitStringNoSymbolTest () Measurement actual = default(Measurement); actual = target.ParseUnitString (input); - Assert.AreNotEqual (expected, actual); + Assert.AreNotEqual (expected, actual); Assert.AreEqual (expected.ConversionResult, actual.ConversionResult); } [Test] - [TestCategory(UnitTestCategory.Unit)] + [TestCase(UnitTestCategory.Unit)] public void UnitConverter_ParseUnitStringNoValueTest () { UnitConverter target = new UnitConverter (); @@ -194,40 +163,38 @@ public void UnitConverter_ParseUnitStringNoValueTest () Measurement expected = new Measurement (0, "ft"); Measurement actual = default(Measurement); actual = target.ParseUnitString (input); - Assert.AreEqual (expected, actual); + Assert.AreEqual (expected, actual); } [Test] - [TestCategory(UnitTestCategory.Unit)] + [TestCase(UnitTestCategory.Unit)] public void UnitConverter_ParseUnitStringNullTest () { UnitConverter target = new UnitConverter (); Measurement expected = new Measurement (0, Result.BadValue); Measurement actual = default(Measurement); actual = target.ParseUnitString (null); - Assert.AreNotEqual (expected, actual); + Assert.AreNotEqual (expected, actual); Assert.AreEqual (expected.ConversionResult, actual.ConversionResult); } [Test] - [TestCategory(UnitTestCategory.Unit)] + [TestCase(UnitTestCategory.Unit)] public void UnitConverter_ParseUnitStringEmptyTest () { UnitConverter target = new UnitConverter (); Measurement expected = new Measurement (0, Result.BadValue); Measurement actual = default(Measurement); actual = target.ParseUnitString (string.Empty); - Assert.AreNotEqual (expected, actual); + Assert.AreNotEqual (expected, actual); Assert.AreEqual (expected.ConversionResult, actual.ConversionResult); } - #endregion + #endregion #region "UnitConverter.IsCompatible" - /// - ///A test for IsCompatible - /// + [Test] - [TestCategory(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.Integration)] public void UnitConverter_IsCompatibleTest () { UnitConverter target = new UnitConverter (); @@ -239,7 +206,7 @@ public void UnitConverter_IsCompatibleTest () } [Test] - [TestCategory(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.Integration)] public void UnitConverter_IsCompatibleFalseTest () { UnitConverter target = new UnitConverter (); @@ -251,7 +218,7 @@ public void UnitConverter_IsCompatibleFalseTest () } [Test] - [TestCategory(UnitTestCategory.Unit)] + [TestCase(UnitTestCategory.Unit)] [ExpectedException(typeof(ArgumentException))] public void UnitConverter_IsCompatibleNullTest () { @@ -263,7 +230,7 @@ public void UnitConverter_IsCompatibleNullTest () } [Test] - [TestCategory(UnitTestCategory.Unit)] + [TestCase(UnitTestCategory.Unit)] [ExpectedException(typeof(ArgumentException))] public void UnitConverter_IsCompatibleLeftNullTest () { @@ -276,7 +243,7 @@ public void UnitConverter_IsCompatibleLeftNullTest () } [Test] - [TestCategory(UnitTestCategory.Unit)] + [TestCase(UnitTestCategory.Unit)] [ExpectedException(typeof(ArgumentException))] public void UnitConverter_IsCompatibleRightNullTest () { @@ -289,7 +256,7 @@ public void UnitConverter_IsCompatibleRightNullTest () } [Test] - [TestCategory(UnitTestCategory.Unit)] + [TestCase(UnitTestCategory.Unit)] [ExpectedException(typeof(ArgumentException))] public void UnitConverter_IsCompatibleEmptyTest () { @@ -301,7 +268,7 @@ public void UnitConverter_IsCompatibleEmptyTest () } [Test] - [TestCategory(UnitTestCategory.Unit)] + [TestCase(UnitTestCategory.Unit)] [ExpectedException(typeof(ArgumentException))] public void UnitConverter_IsCompatibleLeftEmptyTest () { @@ -314,7 +281,7 @@ public void UnitConverter_IsCompatibleLeftEmptyTest () } [Test] - [TestCategory(UnitTestCategory.Unit)] + [TestCase(UnitTestCategory.Unit)] [ExpectedException(typeof(ArgumentException))] public void UnitConverter_IsCompatibleRightEmptyTest () { @@ -325,14 +292,12 @@ public void UnitConverter_IsCompatibleRightEmptyTest () Assert.Fail (); } - #endregion + #endregion #region "UnitProvider.GetUnitBySymbol" - /// - ///A test for GetUnitBySymbol - /// + [Test] - [TestCategory(UnitTestCategory.CRUD)] + [TestCase(UnitTestCategory.CRUD)] public void UnitConverter_GetUnitBySymbol_Test () { UnitConverter target = new UnitConverter (); @@ -344,7 +309,7 @@ public void UnitConverter_GetUnitBySymbol_Test () } [Test] - [TestCategory(UnitTestCategory.ExceptionTest)] + [TestCase(UnitTestCategory.ExceptionTest)] [ExpectedException(typeof(ArgumentNullException))] public void UnitConverter_GetUnitBySymbolNull_Test () { @@ -356,7 +321,7 @@ public void UnitConverter_GetUnitBySymbolNull_Test () } [Test] - [TestCategory(UnitTestCategory.ExceptionTest)] + [TestCase(UnitTestCategory.ExceptionTest)] [ExpectedException(typeof(ArgumentNullException))] public void UnitConverter_GetUnitBySymbolEmpty_Test () { @@ -368,7 +333,7 @@ public void UnitConverter_GetUnitBySymbolEmpty_Test () } [Test] - [TestCategory(UnitTestCategory.ExceptionTest)] + [TestCase(UnitTestCategory.ExceptionTest)] [ExpectedException(typeof(ArgumentException))] public void UnitConverter_GetUnitBySymbol_UnrecognizedSymbol_Test () { @@ -378,14 +343,12 @@ public void UnitConverter_GetUnitBySymbol_UnrecognizedSymbol_Test () actual = target.GetUnitByName (unitName); Assert.Fail (); } - #endregion + #endregion #region "UnitConverter.GetUnitByName" - /// - ///A test for GetUnitByName - /// + [Test] - [TestCategory(UnitTestCategory.CRUD)] + [TestCase(UnitTestCategory.CRUD)] public void UnitConverter_GetUnitByName_Test () { UnitConverter target = new UnitConverter (); @@ -397,7 +360,7 @@ public void UnitConverter_GetUnitByName_Test () } [Test] - [TestCategory(UnitTestCategory.ExceptionTest)] + [TestCase(UnitTestCategory.ExceptionTest)] [ExpectedException(typeof(ArgumentException))] public void UnitConverter_GetUnitByNameNull_Test () { @@ -410,7 +373,7 @@ public void UnitConverter_GetUnitByNameNull_Test () } [Test] - [TestCategory(UnitTestCategory.ExceptionTest)] + [TestCase(UnitTestCategory.ExceptionTest)] [ExpectedException(typeof(ArgumentException))] public void UnitConverter_GetUnitByNameEmpty_Test () { @@ -423,7 +386,7 @@ public void UnitConverter_GetUnitByNameEmpty_Test () } [Test] - [TestCategory(UnitTestCategory.ExceptionTest)] + [TestCase(UnitTestCategory.ExceptionTest)] [ExpectedException(typeof(ArgumentException))] public void UnitConverter_GetUnitByName_UnrecognizedName_Test () { @@ -433,15 +396,15 @@ public void UnitConverter_GetUnitByName_UnrecognizedName_Test () actual = target.GetUnitByName (unitName); Assert.Fail (); } - #endregion + #endregion #region "UnitConverter.ConvertUnits" #region "Temperature Tests" #region "Source as Kelvin" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_Celcius_Test () { UnitConverter target = new UnitConverter (); @@ -455,8 +418,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Celcius_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_Celcius_Test2 () { UnitConverter target = new UnitConverter (); @@ -470,8 +433,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Celcius_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_Celcius_Test3 () { UnitConverter target = new UnitConverter (); @@ -485,8 +448,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Celcius_Test3 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_Fahrenheit_Test () { UnitConverter target = new UnitConverter (); @@ -500,8 +463,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Fahrenheit_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_Fahrenheit_Test2 () { UnitConverter target = new UnitConverter (); @@ -515,8 +478,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Fahrenheit_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_Fahrenheit_Test3 () { UnitConverter target = new UnitConverter (); @@ -530,8 +493,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Fahrenheit_Test3 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_Millikelvin_Test () { UnitConverter target = new UnitConverter (); @@ -545,8 +508,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Millikelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_Millikelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -560,8 +523,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Millikelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_Microkelvin_Test () { UnitConverter target = new UnitConverter (); @@ -575,8 +538,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Microkelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_Microkelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -590,8 +553,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Microkelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_nK_Test () { UnitConverter target = new UnitConverter (); @@ -605,8 +568,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_nK_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_nK_Test2 () { UnitConverter target = new UnitConverter (); @@ -620,8 +583,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_nK_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_kK_Test () { UnitConverter target = new UnitConverter (); @@ -635,8 +598,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_kK_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_kK_Test2 () { UnitConverter target = new UnitConverter (); @@ -650,8 +613,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_kK_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_Megakelvin_Test () { UnitConverter target = new UnitConverter (); @@ -665,8 +628,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Megakelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_Megakelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -680,8 +643,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Megakelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_Reaumur_Test () { UnitConverter target = new UnitConverter (); @@ -695,8 +658,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Reaumur_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_Reaumur_Test2 () { UnitConverter target = new UnitConverter (); @@ -710,8 +673,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Reaumur_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_Reaumur_Test3 () { UnitConverter target = new UnitConverter (); @@ -725,8 +688,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Reaumur_Test3 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_Rankine_Test () { UnitConverter target = new UnitConverter (); @@ -740,8 +703,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Rankine_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_Rankine_Test2 () { UnitConverter target = new UnitConverter (); @@ -755,8 +718,8 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Rankine_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kelvin_to_Rankine_Test3 () { UnitConverter target = new UnitConverter (); @@ -768,13 +731,13 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Rankine_Test3 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as Celsius" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celcius_to_Kelvin_Test () { UnitConverter target = new UnitConverter (); @@ -788,8 +751,8 @@ public void UnitConverter_ConvertUnits_Celcius_to_Kelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celcius_to_Kelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -803,8 +766,8 @@ public void UnitConverter_ConvertUnits_Celcius_to_Kelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celcius_to_Kelvin_Test3 () { UnitConverter target = new UnitConverter (); @@ -818,8 +781,8 @@ public void UnitConverter_ConvertUnits_Celcius_to_Kelvin_Test3 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celsius_to_Fahrenheit_Test () { UnitConverter target = new UnitConverter (); @@ -833,8 +796,8 @@ public void UnitConverter_ConvertUnits_Celsius_to_Fahrenheit_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celsius_to_Fahrenheit_Test2 () { UnitConverter target = new UnitConverter (); @@ -848,8 +811,8 @@ public void UnitConverter_ConvertUnits_Celsius_to_Fahrenheit_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celsius_to_Fahrenheit_Test3 () { UnitConverter target = new UnitConverter (); @@ -863,8 +826,8 @@ public void UnitConverter_ConvertUnits_Celsius_to_Fahrenheit_Test3 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celsius_to_Millikelvin_Test () { UnitConverter target = new UnitConverter (); @@ -878,8 +841,8 @@ public void UnitConverter_ConvertUnits_Celsius_to_Millikelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celsius_to_Millikelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -893,8 +856,8 @@ public void UnitConverter_ConvertUnits_Celsius_to_Millikelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celsius_to_Microkelvin_Test () { UnitConverter target = new UnitConverter (); @@ -908,8 +871,8 @@ public void UnitConverter_ConvertUnits_Celsius_to_Microkelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celsius_to_Microkelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -923,8 +886,8 @@ public void UnitConverter_ConvertUnits_Celsius_to_Microkelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celsius_to_nK_Test () { UnitConverter target = new UnitConverter (); @@ -938,8 +901,8 @@ public void UnitConverter_ConvertUnits_Celsius_to_nK_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celsius_to_nK_Test2 () { UnitConverter target = new UnitConverter (); @@ -953,8 +916,8 @@ public void UnitConverter_ConvertUnits_Celsius_to_nK_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celsius_to_kK_Test () { UnitConverter target = new UnitConverter (); @@ -968,8 +931,8 @@ public void UnitConverter_ConvertUnits_Celsius_to_kK_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celsius_to_kK_Test2 () { UnitConverter target = new UnitConverter (); @@ -983,8 +946,8 @@ public void UnitConverter_ConvertUnits_Celsius_to_kK_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celsius_to_Megakelvin_Test () { UnitConverter target = new UnitConverter (); @@ -998,8 +961,8 @@ public void UnitConverter_ConvertUnits_Celsius_to_Megakelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celsius_to_Megakelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -1013,8 +976,8 @@ public void UnitConverter_ConvertUnits_Celsius_to_Megakelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celsius_to_Reaumur_Test () { UnitConverter target = new UnitConverter (); @@ -1028,8 +991,8 @@ public void UnitConverter_ConvertUnits_Celsius_to_Reaumur_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celsius_to_Reaumur_Test2 () { UnitConverter target = new UnitConverter (); @@ -1043,8 +1006,8 @@ public void UnitConverter_ConvertUnits_Celsius_to_Reaumur_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celsius_to_Reaumur_Test3 () { UnitConverter target = new UnitConverter (); @@ -1058,8 +1021,8 @@ public void UnitConverter_ConvertUnits_Celsius_to_Reaumur_Test3 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celsius_to_Rankine_Test () { UnitConverter target = new UnitConverter (); @@ -1073,8 +1036,8 @@ public void UnitConverter_ConvertUnits_Celsius_to_Rankine_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celsius_to_Rankine_Test2 () { UnitConverter target = new UnitConverter (); @@ -1088,8 +1051,8 @@ public void UnitConverter_ConvertUnits_Celsius_to_Rankine_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Celsius_to_Rankine_Test3 () { UnitConverter target = new UnitConverter (); @@ -1101,13 +1064,13 @@ public void UnitConverter_ConvertUnits_Celsius_to_Rankine_Test3 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as Fahrenheit" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_Kelvin_Test () { UnitConverter target = new UnitConverter (); @@ -1121,8 +1084,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Kelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_Kelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -1136,8 +1099,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Kelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_Kelvin_Test3 () { UnitConverter target = new UnitConverter (); @@ -1151,8 +1114,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Kelvin_Test3 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_Celsius_Test () { UnitConverter target = new UnitConverter (); @@ -1166,8 +1129,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Celsius_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_Celsius_Test2 () { UnitConverter target = new UnitConverter (); @@ -1181,8 +1144,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Celsius_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_Celsius_Test3 () { UnitConverter target = new UnitConverter (); @@ -1196,8 +1159,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Celsius_Test3 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_Millikelvin_Test () { UnitConverter target = new UnitConverter (); @@ -1211,8 +1174,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Millikelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_Millikelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -1226,8 +1189,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Millikelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_Microkelvin_Test () { UnitConverter target = new UnitConverter (); @@ -1241,8 +1204,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Microkelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_Microkelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -1256,8 +1219,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Microkelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_nK_Test () { UnitConverter target = new UnitConverter (); @@ -1271,8 +1234,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_nK_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_nK_Test2 () { UnitConverter target = new UnitConverter (); @@ -1286,8 +1249,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_nK_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_kK_Test () { UnitConverter target = new UnitConverter (); @@ -1301,8 +1264,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_kK_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_kK_Test2 () { UnitConverter target = new UnitConverter (); @@ -1316,8 +1279,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_kK_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_Megakelvin_Test () { UnitConverter target = new UnitConverter (); @@ -1331,8 +1294,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Megakelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_Megakelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -1346,8 +1309,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Megakelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_Reaumur_Test () { UnitConverter target = new UnitConverter (); @@ -1361,8 +1324,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Reaumur_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_Reaumur_Test2 () { UnitConverter target = new UnitConverter (); @@ -1376,8 +1339,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Reaumur_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_Reaumur_Test3 () { UnitConverter target = new UnitConverter (); @@ -1391,8 +1354,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Reaumur_Test3 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_Rankine_Test () { UnitConverter target = new UnitConverter (); @@ -1406,8 +1369,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Rankine_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_Rankine_Test2 () { UnitConverter target = new UnitConverter (); @@ -1421,8 +1384,8 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Rankine_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Fahrenheit_to_Rankine_Test3 () { UnitConverter target = new UnitConverter (); @@ -1434,13 +1397,13 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Rankine_Test3 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as Millikelvin" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Millikelvin_to_Kelvin_Test () { UnitConverter target = new UnitConverter (); @@ -1454,8 +1417,8 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Kelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Millikelvin_to_Kelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -1469,8 +1432,8 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Kelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Millikelvin_to_Celsius_Test () { UnitConverter target = new UnitConverter (); @@ -1484,8 +1447,8 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Celsius_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Millikelvin_to_Celsius_Test2 () { UnitConverter target = new UnitConverter (); @@ -1499,8 +1462,8 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Celsius_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Millikelvin_to_Fahrenheit_Test () { UnitConverter target = new UnitConverter (); @@ -1514,8 +1477,8 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Fahrenheit_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Millikelvin_to_Fahrenheit_Test2 () { UnitConverter target = new UnitConverter (); @@ -1529,8 +1492,8 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Fahrenheit_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Millikelvin_to_Microkelvin_Test () { UnitConverter target = new UnitConverter (); @@ -1544,8 +1507,8 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Microkelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Millikelvin_to_Microkelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -1559,8 +1522,8 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Microkelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Millikelvin_to_nK_Test () { UnitConverter target = new UnitConverter (); @@ -1574,8 +1537,8 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_nK_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Millikelvin_to_nK_Test2 () { UnitConverter target = new UnitConverter (); @@ -1589,8 +1552,8 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_nK_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Millikelvin_to_kK_Test () { UnitConverter target = new UnitConverter (); @@ -1604,8 +1567,8 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_kK_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Millikelvin_to_kK_Test2 () { UnitConverter target = new UnitConverter (); @@ -1619,8 +1582,8 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_kK_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Millikelvin_to_Megakelvin_Test () { UnitConverter target = new UnitConverter (); @@ -1634,8 +1597,8 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Megakelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Millikelvin_to_Megakelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -1649,8 +1612,8 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Megakelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Millikelvin_to_Reaumur_Test () { UnitConverter target = new UnitConverter (); @@ -1664,8 +1627,8 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Reaumur_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Millikelvin_to_Reaumur_Test2 () { UnitConverter target = new UnitConverter (); @@ -1679,8 +1642,8 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Reaumur_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Millikelvin_to_Rankine_Test () { UnitConverter target = new UnitConverter (); @@ -1694,8 +1657,8 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Rankine_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Millikelvin_to_Rankine_Test2 () { UnitConverter target = new UnitConverter (); @@ -1707,13 +1670,13 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Rankine_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as Millikelvin" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microkelvin_to_Kelvin_Test () { UnitConverter target = new UnitConverter (); @@ -1727,8 +1690,8 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Kelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microkelvin_to_Kelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -1742,8 +1705,8 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Kelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microkelvin_to_Celsius_Test () { UnitConverter target = new UnitConverter (); @@ -1757,8 +1720,8 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Celsius_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microkelvin_to_Celsius_Test2 () { UnitConverter target = new UnitConverter (); @@ -1772,8 +1735,8 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Celsius_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microkelvin_to_Fahrenheit_Test () { UnitConverter target = new UnitConverter (); @@ -1787,8 +1750,8 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Fahrenheit_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microkelvin_to_Fahrenheit_Test2 () { UnitConverter target = new UnitConverter (); @@ -1802,8 +1765,8 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Fahrenheit_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microkelvin_to_Millikelvin_Test () { UnitConverter target = new UnitConverter (); @@ -1817,8 +1780,8 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Millikelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microkelvin_to_Millikelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -1832,8 +1795,8 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Millikelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microkelvin_to_nK_Test () { UnitConverter target = new UnitConverter (); @@ -1847,8 +1810,8 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_nK_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microkelvin_to_nK_Test2 () { UnitConverter target = new UnitConverter (); @@ -1862,8 +1825,8 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_nK_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microkelvin_to_kK_Test () { UnitConverter target = new UnitConverter (); @@ -1877,8 +1840,8 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_kK_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microkelvin_to_kK_Test2 () { UnitConverter target = new UnitConverter (); @@ -1892,8 +1855,8 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_kK_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microkelvin_to_Megakelvin_Test () { UnitConverter target = new UnitConverter (); @@ -1907,8 +1870,8 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Megakelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microkelvin_to_Megakelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -1922,8 +1885,8 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Megakelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microkelvin_to_Reaumur_Test () { UnitConverter target = new UnitConverter (); @@ -1937,8 +1900,8 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Reaumur_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microkelvin_to_Reaumur_Test2 () { UnitConverter target = new UnitConverter (); @@ -1952,8 +1915,8 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Reaumur_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microkelvin_to_Rankine_Test () { UnitConverter target = new UnitConverter (); @@ -1967,8 +1930,8 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Rankine_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microkelvin_to_Rankine_Test2 () { UnitConverter target = new UnitConverter (); @@ -1980,13 +1943,13 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Rankine_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as Millikelvin" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nK_to_Kelvin_Test () { UnitConverter target = new UnitConverter (); @@ -2000,8 +1963,8 @@ public void UnitConverter_ConvertUnits_nK_to_Kelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nK_to_Kelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -2015,8 +1978,8 @@ public void UnitConverter_ConvertUnits_nK_to_Kelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nK_to_Celsius_Test () { UnitConverter target = new UnitConverter (); @@ -2030,8 +1993,8 @@ public void UnitConverter_ConvertUnits_nK_to_Celsius_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nK_to_Celsius_Test2 () { UnitConverter target = new UnitConverter (); @@ -2045,8 +2008,8 @@ public void UnitConverter_ConvertUnits_nK_to_Celsius_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nK_to_Fahrenheit_Test () { UnitConverter target = new UnitConverter (); @@ -2060,8 +2023,8 @@ public void UnitConverter_ConvertUnits_nK_to_Fahrenheit_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nK_to_Fahrenheit_Test2 () { UnitConverter target = new UnitConverter (); @@ -2075,8 +2038,8 @@ public void UnitConverter_ConvertUnits_nK_to_Fahrenheit_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nK_to_Millikelvin_Test () { UnitConverter target = new UnitConverter (); @@ -2090,9 +2053,9 @@ public void UnitConverter_ConvertUnits_nK_to_Millikelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] - public void UnitConverter_ConvertUnits_nK_to_Millikelvin_Test2 () + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] + public void UnitConverter_ConvertUnits_nK_to_Millikelvin_Test2 () { UnitConverter target = new UnitConverter (); double value = Convert.ToDouble (0.5); @@ -2105,8 +2068,8 @@ public void UnitConverter_ConvertUnits_nK_to_Millikelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nK_to_Microkelvin_Test () { UnitConverter target = new UnitConverter (); @@ -2120,8 +2083,8 @@ public void UnitConverter_ConvertUnits_nK_to_Microkelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nK_to_Microkelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -2135,8 +2098,8 @@ public void UnitConverter_ConvertUnits_nK_to_Microkelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nK_to_kK_Test () { UnitConverter target = new UnitConverter (); @@ -2150,8 +2113,8 @@ public void UnitConverter_ConvertUnits_nK_to_kK_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nK_to_kK_Test2 () { UnitConverter target = new UnitConverter (); @@ -2165,8 +2128,8 @@ public void UnitConverter_ConvertUnits_nK_to_kK_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nK_to_Megakelvin_Test () { UnitConverter target = new UnitConverter (); @@ -2180,8 +2143,8 @@ public void UnitConverter_ConvertUnits_nK_to_Megakelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nK_to_Megakelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -2196,8 +2159,8 @@ public void UnitConverter_ConvertUnits_nK_to_Megakelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nK_to_Reaumur_Test () { UnitConverter target = new UnitConverter (); @@ -2211,8 +2174,8 @@ public void UnitConverter_ConvertUnits_nK_to_Reaumur_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nK_to_Reaumur_Test2 () { UnitConverter target = new UnitConverter (); @@ -2226,8 +2189,8 @@ public void UnitConverter_ConvertUnits_nK_to_Reaumur_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nK_to_Rankine_Test () { UnitConverter target = new UnitConverter (); @@ -2241,8 +2204,8 @@ public void UnitConverter_ConvertUnits_nK_to_Rankine_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nK_to_Rankine_Test2 () { UnitConverter target = new UnitConverter (); @@ -2254,13 +2217,13 @@ public void UnitConverter_ConvertUnits_nK_to_Rankine_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as Kilokelvin" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kK_to_Kelvin_Test () { UnitConverter target = new UnitConverter (); @@ -2274,8 +2237,8 @@ public void UnitConverter_ConvertUnits_kK_to_Kelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kK_to_Kelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -2289,8 +2252,8 @@ public void UnitConverter_ConvertUnits_kK_to_Kelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kK_to_Celsius_Test () { UnitConverter target = new UnitConverter (); @@ -2304,8 +2267,8 @@ public void UnitConverter_ConvertUnits_kK_to_Celsius_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kK_to_Celsius_Test2 () { UnitConverter target = new UnitConverter (); @@ -2319,8 +2282,8 @@ public void UnitConverter_ConvertUnits_kK_to_Celsius_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kK_to_Fahrenheit_Test () { UnitConverter target = new UnitConverter (); @@ -2334,8 +2297,8 @@ public void UnitConverter_ConvertUnits_kK_to_Fahrenheit_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kK_to_Fahrenheit_Test2 () { UnitConverter target = new UnitConverter (); @@ -2349,8 +2312,8 @@ public void UnitConverter_ConvertUnits_kK_to_Fahrenheit_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kK_to_Millikelvin_Test () { UnitConverter target = new UnitConverter (); @@ -2364,8 +2327,8 @@ public void UnitConverter_ConvertUnits_kK_to_Millikelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kK_to_Millikelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -2379,8 +2342,8 @@ public void UnitConverter_ConvertUnits_kK_to_Millikelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kK_to_Microkelvin_Test () { UnitConverter target = new UnitConverter (); @@ -2394,8 +2357,8 @@ public void UnitConverter_ConvertUnits_kK_to_Microkelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kK_to_Microkelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -2409,8 +2372,8 @@ public void UnitConverter_ConvertUnits_kK_to_Microkelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kK_to_nK_Test () { UnitConverter target = new UnitConverter (); @@ -2424,8 +2387,8 @@ public void UnitConverter_ConvertUnits_kK_to_nK_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kK_to_nK_Test2 () { UnitConverter target = new UnitConverter (); @@ -2439,8 +2402,8 @@ public void UnitConverter_ConvertUnits_kK_to_nK_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kK_to_Megakelvin_Test () { UnitConverter target = new UnitConverter (); @@ -2454,8 +2417,8 @@ public void UnitConverter_ConvertUnits_kK_to_Megakelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kK_to_Megakelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -2469,8 +2432,8 @@ public void UnitConverter_ConvertUnits_kK_to_Megakelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kK_to_Reaumur_Test () { UnitConverter target = new UnitConverter (); @@ -2484,8 +2447,8 @@ public void UnitConverter_ConvertUnits_kK_to_Reaumur_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kK_to_Reaumur_Test2 () { UnitConverter target = new UnitConverter (); @@ -2499,8 +2462,8 @@ public void UnitConverter_ConvertUnits_kK_to_Reaumur_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kK_to_Rankine_Test () { UnitConverter target = new UnitConverter (); @@ -2514,8 +2477,8 @@ public void UnitConverter_ConvertUnits_kK_to_Rankine_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kK_to_Rankine_Test2 () { UnitConverter target = new UnitConverter (); @@ -2527,13 +2490,13 @@ public void UnitConverter_ConvertUnits_kK_to_Rankine_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as Megakelvin" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megakelvin_to_Kelvin_Test () { UnitConverter target = new UnitConverter (); @@ -2547,8 +2510,8 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Kelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megakelvin_to_Kelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -2562,8 +2525,8 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Kelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megakelvin_to_Celsius_Test () { UnitConverter target = new UnitConverter (); @@ -2577,8 +2540,8 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Celsius_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megakelvin_to_Celsius_Test2 () { UnitConverter target = new UnitConverter (); @@ -2592,8 +2555,8 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Celsius_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megakelvin_to_Fahrenheit_Test () { UnitConverter target = new UnitConverter (); @@ -2607,8 +2570,8 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Fahrenheit_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megakelvin_to_Fahrenheit_Test2 () { UnitConverter target = new UnitConverter (); @@ -2622,8 +2585,8 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Fahrenheit_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megakelvin_to_Millikelvin_Test () { UnitConverter target = new UnitConverter (); @@ -2637,8 +2600,8 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Millikelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megakelvin_to_Millikelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -2652,8 +2615,8 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Millikelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megakelvin_to_Microkelvin_Test () { UnitConverter target = new UnitConverter (); @@ -2667,8 +2630,8 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Microkelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megakelvin_to_Microkelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -2682,8 +2645,8 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Microkelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megakelvin_to_nK_Test () { UnitConverter target = new UnitConverter (); @@ -2697,8 +2660,8 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_nK_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megakelvin_to_nK_Test2 () { UnitConverter target = new UnitConverter (); @@ -2712,8 +2675,8 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_nK_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megakelvin_to_kK_Test () { UnitConverter target = new UnitConverter (); @@ -2727,8 +2690,8 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_kK_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megakelvin_to_kK_Test2 () { UnitConverter target = new UnitConverter (); @@ -2742,8 +2705,8 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_kK_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megakelvin_to_Reaumur_Test () { UnitConverter target = new UnitConverter (); @@ -2757,8 +2720,8 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Reaumur_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megakelvin_to_Reaumur_Test2 () { UnitConverter target = new UnitConverter (); @@ -2772,8 +2735,8 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Reaumur_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megakelvin_to_Rankine_Test () { UnitConverter target = new UnitConverter (); @@ -2787,8 +2750,8 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Rankine_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megakelvin_to_Rankine_Test2 () { UnitConverter target = new UnitConverter (); @@ -2800,13 +2763,13 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Rankine_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as Reaumur" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_Kelvin_Test () { UnitConverter target = new UnitConverter (); @@ -2820,8 +2783,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Kelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_Kelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -2835,8 +2798,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Kelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_Kelvin_Test3 () { UnitConverter target = new UnitConverter (); @@ -2850,8 +2813,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Kelvin_Test3 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_Fahrenheit_Test () { UnitConverter target = new UnitConverter (); @@ -2865,8 +2828,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Fahrenheit_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_Fahrenheit_Test2 () { UnitConverter target = new UnitConverter (); @@ -2880,8 +2843,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Fahrenheit_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_Fahrenheit_Test3 () { UnitConverter target = new UnitConverter (); @@ -2895,8 +2858,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Fahrenheit_Test3 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_Millikelvin_Test () { UnitConverter target = new UnitConverter (); @@ -2910,8 +2873,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Millikelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_Millikelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -2925,8 +2888,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Millikelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_Microkelvin_Test () { UnitConverter target = new UnitConverter (); @@ -2940,8 +2903,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Microkelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_Microkelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -2955,8 +2918,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Microkelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_nK_Test () { UnitConverter target = new UnitConverter (); @@ -2970,8 +2933,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_nK_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_nK_Test2 () { UnitConverter target = new UnitConverter (); @@ -2985,8 +2948,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_nK_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_kK_Test () { UnitConverter target = new UnitConverter (); @@ -3000,8 +2963,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_kK_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_kK_Test2 () { UnitConverter target = new UnitConverter (); @@ -3015,8 +2978,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_kK_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_Megakelvin_Test () { UnitConverter target = new UnitConverter (); @@ -3030,8 +2993,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Megakelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_Megakelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -3045,8 +3008,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Megakelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_Celsius_Test () { UnitConverter target = new UnitConverter (); @@ -3060,8 +3023,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Celsius_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_Celsius_Test2 () { UnitConverter target = new UnitConverter (); @@ -3075,8 +3038,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Celsius_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_Celsius_Test3 () { UnitConverter target = new UnitConverter (); @@ -3090,8 +3053,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Celsius_Test3 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_Rankine_Test () { UnitConverter target = new UnitConverter (); @@ -3105,8 +3068,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Rankine_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_Rankine_Test2 () { UnitConverter target = new UnitConverter (); @@ -3120,8 +3083,8 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Rankine_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Reaumur_to_Rankine_Test3 () { UnitConverter target = new UnitConverter (); @@ -3133,13 +3096,13 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Rankine_Test3 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as Rankine" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_Kelvin_Test () { UnitConverter target = new UnitConverter (); @@ -3153,8 +3116,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_Kelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_Kelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -3168,8 +3131,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_Kelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_Kelvin_Test3 () { UnitConverter target = new UnitConverter (); @@ -3183,8 +3146,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_Kelvin_Test3 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_Fahrenheit_Test () { UnitConverter target = new UnitConverter (); @@ -3198,8 +3161,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_Fahrenheit_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_Fahrenheit_Test2 () { UnitConverter target = new UnitConverter (); @@ -3213,8 +3176,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_Fahrenheit_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_Fahrenheit_Test3 () { UnitConverter target = new UnitConverter (); @@ -3228,8 +3191,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_Fahrenheit_Test3 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_Millikelvin_Test () { UnitConverter target = new UnitConverter (); @@ -3243,8 +3206,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_Millikelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_Millikelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -3258,8 +3221,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_Millikelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_Microkelvin_Test () { UnitConverter target = new UnitConverter (); @@ -3273,8 +3236,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_Microkelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_Microkelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -3288,8 +3251,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_Microkelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_nK_Test () { UnitConverter target = new UnitConverter (); @@ -3303,8 +3266,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_nK_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_nK_Test2 () { UnitConverter target = new UnitConverter (); @@ -3318,8 +3281,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_nK_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_kK_Test () { UnitConverter target = new UnitConverter (); @@ -3333,8 +3296,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_kK_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_kK_Test2 () { UnitConverter target = new UnitConverter (); @@ -3348,8 +3311,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_kK_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_Megakelvin_Test () { UnitConverter target = new UnitConverter (); @@ -3363,8 +3326,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_Megakelvin_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_Megakelvin_Test2 () { UnitConverter target = new UnitConverter (); @@ -3378,8 +3341,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_Megakelvin_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_Celsius_Test () { UnitConverter target = new UnitConverter (); @@ -3393,8 +3356,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_Celsius_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_Celsius_Test2 () { UnitConverter target = new UnitConverter (); @@ -3408,8 +3371,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_Celsius_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_Celsius_Test3 () { UnitConverter target = new UnitConverter (); @@ -3423,8 +3386,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_Celsius_Test3 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_Reaumur_Test () { UnitConverter target = new UnitConverter (); @@ -3438,8 +3401,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_Reaumur_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_Reaumur_Test2 () { UnitConverter target = new UnitConverter (); @@ -3453,8 +3416,8 @@ public void UnitConverter_ConvertUnits_Rankine_to_Reaumur_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Rankine_to_Reaumur_Test3 () { UnitConverter target = new UnitConverter (); @@ -3466,14 +3429,15 @@ public void UnitConverter_ConvertUnits_Rankine_to_Reaumur_Test3 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } + #endregion #endregion - #region "Mass Tests" #region "Source as kg" + [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_g_Test () { UnitConverter target = new UnitConverter (); @@ -3487,8 +3451,8 @@ public void UnitConverter_ConvertUnits_kg_to_g_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_g_Test2 () { UnitConverter target = new UnitConverter (); @@ -3502,8 +3466,8 @@ public void UnitConverter_ConvertUnits_kg_to_g_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_mg_Test () { UnitConverter target = new UnitConverter (); @@ -3517,8 +3481,8 @@ public void UnitConverter_ConvertUnits_kg_to_mg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_mg_Test2 () { UnitConverter target = new UnitConverter (); @@ -3532,8 +3496,8 @@ public void UnitConverter_ConvertUnits_kg_to_mg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_µg_Test () { UnitConverter target = new UnitConverter (); @@ -3547,8 +3511,8 @@ public void UnitConverter_ConvertUnits_kg_to_µg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_µg_Test2 () { UnitConverter target = new UnitConverter (); @@ -3562,8 +3526,8 @@ public void UnitConverter_ConvertUnits_kg_to_µg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_ng_Test () { UnitConverter target = new UnitConverter (); @@ -3577,8 +3541,8 @@ public void UnitConverter_ConvertUnits_kg_to_ng_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_ng_Test2 () { UnitConverter target = new UnitConverter (); @@ -3592,8 +3556,8 @@ public void UnitConverter_ConvertUnits_kg_to_ng_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_Megagram_Test () { UnitConverter target = new UnitConverter (); @@ -3607,8 +3571,8 @@ public void UnitConverter_ConvertUnits_kg_to_Megagram_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_Megagram_Test2 () { UnitConverter target = new UnitConverter (); @@ -3622,8 +3586,8 @@ public void UnitConverter_ConvertUnits_kg_to_Megagram_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_Gg_Test () { UnitConverter target = new UnitConverter (); @@ -3637,8 +3601,8 @@ public void UnitConverter_ConvertUnits_kg_to_Gg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_Gg_Test2 () { UnitConverter target = new UnitConverter (); @@ -3652,8 +3616,8 @@ public void UnitConverter_ConvertUnits_kg_to_Gg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_tonne_Test () { UnitConverter target = new UnitConverter (); @@ -3667,8 +3631,8 @@ public void UnitConverter_ConvertUnits_kg_to_tonne_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_tonne_Test2 () { UnitConverter target = new UnitConverter (); @@ -3682,8 +3646,8 @@ public void UnitConverter_ConvertUnits_kg_to_tonne_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_ton_Test () { UnitConverter target = new UnitConverter (); @@ -3697,8 +3661,8 @@ public void UnitConverter_ConvertUnits_kg_to_ton_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_ton_Test2 () { UnitConverter target = new UnitConverter (); @@ -3712,8 +3676,8 @@ public void UnitConverter_ConvertUnits_kg_to_ton_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_stone_Test () { UnitConverter target = new UnitConverter (); @@ -3727,8 +3691,8 @@ public void UnitConverter_ConvertUnits_kg_to_stone_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_stone_Test2 () { UnitConverter target = new UnitConverter (); @@ -3742,8 +3706,8 @@ public void UnitConverter_ConvertUnits_kg_to_stone_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_cwt_Test () { UnitConverter target = new UnitConverter (); @@ -3757,8 +3721,8 @@ public void UnitConverter_ConvertUnits_kg_to_cwt_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_cwt_Test2 () { UnitConverter target = new UnitConverter (); @@ -3772,8 +3736,8 @@ public void UnitConverter_ConvertUnits_kg_to_cwt_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_lb_Test () { UnitConverter target = new UnitConverter (); @@ -3787,8 +3751,8 @@ public void UnitConverter_ConvertUnits_kg_to_lb_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_lb_Test2 () { UnitConverter target = new UnitConverter (); @@ -3802,8 +3766,8 @@ public void UnitConverter_ConvertUnits_kg_to_lb_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_oz_Test () { UnitConverter target = new UnitConverter (); @@ -3817,8 +3781,8 @@ public void UnitConverter_ConvertUnits_kg_to_oz_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kg_to_oz_Test2 () { UnitConverter target = new UnitConverter (); @@ -3830,13 +3794,13 @@ public void UnitConverter_ConvertUnits_kg_to_oz_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as g" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_kg_Test () { UnitConverter target = new UnitConverter (); @@ -3850,8 +3814,8 @@ public void UnitConverter_ConvertUnits_g_to_kg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_kg_Test2 () { UnitConverter target = new UnitConverter (); @@ -3865,8 +3829,8 @@ public void UnitConverter_ConvertUnits_g_to_kg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_mg_Test () { UnitConverter target = new UnitConverter (); @@ -3880,8 +3844,8 @@ public void UnitConverter_ConvertUnits_g_to_mg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_mg_Test2 () { UnitConverter target = new UnitConverter (); @@ -3895,8 +3859,8 @@ public void UnitConverter_ConvertUnits_g_to_mg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_µg_Test () { UnitConverter target = new UnitConverter (); @@ -3910,8 +3874,8 @@ public void UnitConverter_ConvertUnits_g_to_µg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_µg_Test2 () { UnitConverter target = new UnitConverter (); @@ -3925,8 +3889,8 @@ public void UnitConverter_ConvertUnits_g_to_µg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_ng_Test () { UnitConverter target = new UnitConverter (); @@ -3940,8 +3904,8 @@ public void UnitConverter_ConvertUnits_g_to_ng_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_ng_Test2 () { UnitConverter target = new UnitConverter (); @@ -3955,8 +3919,8 @@ public void UnitConverter_ConvertUnits_g_to_ng_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_Megagram_Test () { UnitConverter target = new UnitConverter (); @@ -3970,8 +3934,8 @@ public void UnitConverter_ConvertUnits_g_to_Megagram_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_Megagram_Test2 () { UnitConverter target = new UnitConverter (); @@ -3985,8 +3949,8 @@ public void UnitConverter_ConvertUnits_g_to_Megagram_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_Gg_Test () { UnitConverter target = new UnitConverter (); @@ -4000,8 +3964,8 @@ public void UnitConverter_ConvertUnits_g_to_Gg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_Gg_Test2 () { UnitConverter target = new UnitConverter (); @@ -4015,8 +3979,8 @@ public void UnitConverter_ConvertUnits_g_to_Gg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_tonne_Test () { UnitConverter target = new UnitConverter (); @@ -4030,8 +3994,8 @@ public void UnitConverter_ConvertUnits_g_to_tonne_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_tonne_Test2 () { UnitConverter target = new UnitConverter (); @@ -4045,8 +4009,8 @@ public void UnitConverter_ConvertUnits_g_to_tonne_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_ton_Test () { UnitConverter target = new UnitConverter (); @@ -4060,8 +4024,8 @@ public void UnitConverter_ConvertUnits_g_to_ton_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_ton_Test2 () { UnitConverter target = new UnitConverter (); @@ -4075,8 +4039,8 @@ public void UnitConverter_ConvertUnits_g_to_ton_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_stone_Test () { UnitConverter target = new UnitConverter (); @@ -4090,8 +4054,8 @@ public void UnitConverter_ConvertUnits_g_to_stone_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_stone_Test2 () { UnitConverter target = new UnitConverter (); @@ -4105,8 +4069,8 @@ public void UnitConverter_ConvertUnits_g_to_stone_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_cwt_Test () { UnitConverter target = new UnitConverter (); @@ -4120,8 +4084,8 @@ public void UnitConverter_ConvertUnits_g_to_cwt_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_cwt_Test2 () { UnitConverter target = new UnitConverter (); @@ -4135,8 +4099,8 @@ public void UnitConverter_ConvertUnits_g_to_cwt_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_lb_Test () { UnitConverter target = new UnitConverter (); @@ -4150,8 +4114,8 @@ public void UnitConverter_ConvertUnits_g_to_lb_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_lb_Test2 () { UnitConverter target = new UnitConverter (); @@ -4165,8 +4129,8 @@ public void UnitConverter_ConvertUnits_g_to_lb_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_oz_Test () { UnitConverter target = new UnitConverter (); @@ -4180,8 +4144,8 @@ public void UnitConverter_ConvertUnits_g_to_oz_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_g_to_oz_Test2 () { UnitConverter target = new UnitConverter (); @@ -4193,13 +4157,13 @@ public void UnitConverter_ConvertUnits_g_to_oz_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as mg" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_kg_Test () { UnitConverter target = new UnitConverter (); @@ -4213,8 +4177,8 @@ public void UnitConverter_ConvertUnits_mg_to_kg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_kg_Test2 () { UnitConverter target = new UnitConverter (); @@ -4228,8 +4192,8 @@ public void UnitConverter_ConvertUnits_mg_to_kg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_g_Test () { UnitConverter target = new UnitConverter (); @@ -4243,8 +4207,8 @@ public void UnitConverter_ConvertUnits_mg_to_g_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_g_Test2 () { UnitConverter target = new UnitConverter (); @@ -4258,8 +4222,8 @@ public void UnitConverter_ConvertUnits_mg_to_g_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_µg_Test () { UnitConverter target = new UnitConverter (); @@ -4273,8 +4237,8 @@ public void UnitConverter_ConvertUnits_mg_to_µg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_µg_Test2 () { UnitConverter target = new UnitConverter (); @@ -4288,8 +4252,8 @@ public void UnitConverter_ConvertUnits_mg_to_µg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_ng_Test () { UnitConverter target = new UnitConverter (); @@ -4303,8 +4267,8 @@ public void UnitConverter_ConvertUnits_mg_to_ng_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_ng_Test2 () { UnitConverter target = new UnitConverter (); @@ -4318,8 +4282,8 @@ public void UnitConverter_ConvertUnits_mg_to_ng_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_Megagram_Test () { UnitConverter target = new UnitConverter (); @@ -4333,8 +4297,8 @@ public void UnitConverter_ConvertUnits_mg_to_Megagram_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_Megagram_Test2 () { UnitConverter target = new UnitConverter (); @@ -4349,8 +4313,8 @@ public void UnitConverter_ConvertUnits_mg_to_Megagram_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_Gg_Test () { UnitConverter target = new UnitConverter (); @@ -4364,8 +4328,8 @@ public void UnitConverter_ConvertUnits_mg_to_Gg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_Gg_Test2 () { UnitConverter target = new UnitConverter (); @@ -4380,8 +4344,8 @@ public void UnitConverter_ConvertUnits_mg_to_Gg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_tonne_Test () { UnitConverter target = new UnitConverter (); @@ -4395,8 +4359,8 @@ public void UnitConverter_ConvertUnits_mg_to_tonne_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_tonne_Test2 () { UnitConverter target = new UnitConverter (); @@ -4411,8 +4375,8 @@ public void UnitConverter_ConvertUnits_mg_to_tonne_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_ton_Test () { UnitConverter target = new UnitConverter (); @@ -4426,8 +4390,8 @@ public void UnitConverter_ConvertUnits_mg_to_ton_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_ton_Test2 () { UnitConverter target = new UnitConverter (); @@ -4441,8 +4405,8 @@ public void UnitConverter_ConvertUnits_mg_to_ton_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_stone_Test () { UnitConverter target = new UnitConverter (); @@ -4456,8 +4420,8 @@ public void UnitConverter_ConvertUnits_mg_to_stone_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_stone_Test2 () { UnitConverter target = new UnitConverter (); @@ -4471,8 +4435,8 @@ public void UnitConverter_ConvertUnits_mg_to_stone_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_cwt_Test () { UnitConverter target = new UnitConverter (); @@ -4486,8 +4450,8 @@ public void UnitConverter_ConvertUnits_mg_to_cwt_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_cwt_Test2 () { UnitConverter target = new UnitConverter (); @@ -4501,8 +4465,8 @@ public void UnitConverter_ConvertUnits_mg_to_cwt_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_lb_Test () { UnitConverter target = new UnitConverter (); @@ -4516,8 +4480,8 @@ public void UnitConverter_ConvertUnits_mg_to_lb_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_lb_Test2 () { UnitConverter target = new UnitConverter (); @@ -4531,8 +4495,8 @@ public void UnitConverter_ConvertUnits_mg_to_lb_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_oz_Test () { UnitConverter target = new UnitConverter (); @@ -4546,8 +4510,8 @@ public void UnitConverter_ConvertUnits_mg_to_oz_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mg_to_oz_Test2 () { UnitConverter target = new UnitConverter (); @@ -4559,13 +4523,13 @@ public void UnitConverter_ConvertUnits_mg_to_oz_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as µg" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_kg_Test () { UnitConverter target = new UnitConverter (); @@ -4579,8 +4543,8 @@ public void UnitConverter_ConvertUnits_µg_to_kg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_kg_Test2 () { UnitConverter target = new UnitConverter (); @@ -4594,8 +4558,8 @@ public void UnitConverter_ConvertUnits_µg_to_kg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_g_Test () { UnitConverter target = new UnitConverter (); @@ -4609,8 +4573,8 @@ public void UnitConverter_ConvertUnits_µg_to_g_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_g_Test2 () { UnitConverter target = new UnitConverter (); @@ -4624,8 +4588,8 @@ public void UnitConverter_ConvertUnits_µg_to_g_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_mg_Test () { UnitConverter target = new UnitConverter (); @@ -4639,8 +4603,8 @@ public void UnitConverter_ConvertUnits_µg_to_mg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_mg_Test2 () { UnitConverter target = new UnitConverter (); @@ -4654,8 +4618,8 @@ public void UnitConverter_ConvertUnits_µg_to_mg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_ng_Test () { UnitConverter target = new UnitConverter (); @@ -4669,8 +4633,8 @@ public void UnitConverter_ConvertUnits_µg_to_ng_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_ng_Test2 () { UnitConverter target = new UnitConverter (); @@ -4684,8 +4648,8 @@ public void UnitConverter_ConvertUnits_µg_to_ng_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_Megagram_Test () { UnitConverter target = new UnitConverter (); @@ -4699,8 +4663,8 @@ public void UnitConverter_ConvertUnits_µg_to_Megagram_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_Megagram_Test2 () { UnitConverter target = new UnitConverter (); @@ -4715,8 +4679,8 @@ public void UnitConverter_ConvertUnits_µg_to_Megagram_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_Gg_Test () { UnitConverter target = new UnitConverter (); @@ -4730,8 +4694,8 @@ public void UnitConverter_ConvertUnits_µg_to_Gg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_Gg_Test2 () { UnitConverter target = new UnitConverter (); @@ -4746,8 +4710,8 @@ public void UnitConverter_ConvertUnits_µg_to_Gg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_tonne_Test () { UnitConverter target = new UnitConverter (); @@ -4761,8 +4725,8 @@ public void UnitConverter_ConvertUnits_µg_to_tonne_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_tonne_Test2 () { UnitConverter target = new UnitConverter (); @@ -4777,8 +4741,8 @@ public void UnitConverter_ConvertUnits_µg_to_tonne_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_ton_Test () { UnitConverter target = new UnitConverter (); @@ -4792,8 +4756,8 @@ public void UnitConverter_ConvertUnits_µg_to_ton_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_ton_Test2 () { UnitConverter target = new UnitConverter (); @@ -4807,8 +4771,8 @@ public void UnitConverter_ConvertUnits_µg_to_ton_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_stone_Test () { UnitConverter target = new UnitConverter (); @@ -4822,8 +4786,8 @@ public void UnitConverter_ConvertUnits_µg_to_stone_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_stone_Test2 () { UnitConverter target = new UnitConverter (); @@ -4837,8 +4801,8 @@ public void UnitConverter_ConvertUnits_µg_to_stone_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_cwt_Test () { UnitConverter target = new UnitConverter (); @@ -4852,8 +4816,8 @@ public void UnitConverter_ConvertUnits_µg_to_cwt_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_cwt_Test2 () { UnitConverter target = new UnitConverter (); @@ -4867,8 +4831,8 @@ public void UnitConverter_ConvertUnits_µg_to_cwt_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_lb_Test () { UnitConverter target = new UnitConverter (); @@ -4882,8 +4846,8 @@ public void UnitConverter_ConvertUnits_µg_to_lb_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_lb_Test2 () { UnitConverter target = new UnitConverter (); @@ -4897,8 +4861,8 @@ public void UnitConverter_ConvertUnits_µg_to_lb_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_oz_Test () { UnitConverter target = new UnitConverter (); @@ -4912,8 +4876,8 @@ public void UnitConverter_ConvertUnits_µg_to_oz_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µg_to_oz_Test2 () { UnitConverter target = new UnitConverter (); @@ -4925,13 +4889,13 @@ public void UnitConverter_ConvertUnits_µg_to_oz_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as ng" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_kg_Test () { UnitConverter target = new UnitConverter (); @@ -4945,8 +4909,8 @@ public void UnitConverter_ConvertUnits_ng_to_kg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_kg_Test2 () { UnitConverter target = new UnitConverter (); @@ -4961,8 +4925,8 @@ public void UnitConverter_ConvertUnits_ng_to_kg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_g_Test () { UnitConverter target = new UnitConverter (); @@ -4976,8 +4940,8 @@ public void UnitConverter_ConvertUnits_ng_to_g_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_g_Test2 () { UnitConverter target = new UnitConverter (); @@ -4992,8 +4956,8 @@ public void UnitConverter_ConvertUnits_ng_to_g_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_mg_Test () { UnitConverter target = new UnitConverter (); @@ -5007,8 +4971,8 @@ public void UnitConverter_ConvertUnits_ng_to_mg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_mg_Test2 () { UnitConverter target = new UnitConverter (); @@ -5022,8 +4986,8 @@ public void UnitConverter_ConvertUnits_ng_to_mg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_µg_Test () { UnitConverter target = new UnitConverter (); @@ -5037,8 +5001,8 @@ public void UnitConverter_ConvertUnits_ng_to_µg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_µg_Test2 () { UnitConverter target = new UnitConverter (); @@ -5052,8 +5016,8 @@ public void UnitConverter_ConvertUnits_ng_to_µg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_Megagram_Test () { UnitConverter target = new UnitConverter (); @@ -5067,8 +5031,8 @@ public void UnitConverter_ConvertUnits_ng_to_Megagram_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_Megagram_Test2 () { UnitConverter target = new UnitConverter (); @@ -5083,8 +5047,8 @@ public void UnitConverter_ConvertUnits_ng_to_Megagram_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_Gg_Test () { UnitConverter target = new UnitConverter (); @@ -5099,8 +5063,8 @@ public void UnitConverter_ConvertUnits_ng_to_Gg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_Gg_Test2 () { UnitConverter target = new UnitConverter (); @@ -5115,8 +5079,8 @@ public void UnitConverter_ConvertUnits_ng_to_Gg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_tonne_Test () { UnitConverter target = new UnitConverter (); @@ -5130,8 +5094,8 @@ public void UnitConverter_ConvertUnits_ng_to_tonne_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_tonne_Test2 () { UnitConverter target = new UnitConverter (); @@ -5145,8 +5109,8 @@ public void UnitConverter_ConvertUnits_ng_to_tonne_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_ton_Test () { UnitConverter target = new UnitConverter (); @@ -5160,8 +5124,8 @@ public void UnitConverter_ConvertUnits_ng_to_ton_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_ton_Test2 () { UnitConverter target = new UnitConverter (); @@ -5175,8 +5139,8 @@ public void UnitConverter_ConvertUnits_ng_to_ton_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_stone_Test () { UnitConverter target = new UnitConverter (); @@ -5190,8 +5154,8 @@ public void UnitConverter_ConvertUnits_ng_to_stone_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_stone_Test2 () { UnitConverter target = new UnitConverter (); @@ -5205,8 +5169,8 @@ public void UnitConverter_ConvertUnits_ng_to_stone_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_cwt_Test () { UnitConverter target = new UnitConverter (); @@ -5220,8 +5184,8 @@ public void UnitConverter_ConvertUnits_ng_to_cwt_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_cwt_Test2 () { UnitConverter target = new UnitConverter (); @@ -5235,8 +5199,8 @@ public void UnitConverter_ConvertUnits_ng_to_cwt_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_lb_Test () { UnitConverter target = new UnitConverter (); @@ -5250,8 +5214,8 @@ public void UnitConverter_ConvertUnits_ng_to_lb_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_lb_Test2 () { UnitConverter target = new UnitConverter (); @@ -5265,8 +5229,8 @@ public void UnitConverter_ConvertUnits_ng_to_lb_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_oz_Test () { UnitConverter target = new UnitConverter (); @@ -5280,8 +5244,8 @@ public void UnitConverter_ConvertUnits_ng_to_oz_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ng_to_oz_Test2 () { UnitConverter target = new UnitConverter (); @@ -5293,13 +5257,13 @@ public void UnitConverter_ConvertUnits_ng_to_oz_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as Megagram" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_kg_Test () { UnitConverter target = new UnitConverter (); @@ -5313,8 +5277,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_kg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_kg_Test2 () { UnitConverter target = new UnitConverter (); @@ -5328,8 +5292,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_kg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_g_Test () { UnitConverter target = new UnitConverter (); @@ -5343,8 +5307,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_g_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_g_Test2 () { UnitConverter target = new UnitConverter (); @@ -5358,8 +5322,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_g_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_µg_Test () { UnitConverter target = new UnitConverter (); @@ -5373,8 +5337,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_µg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_µg_Test2 () { UnitConverter target = new UnitConverter (); @@ -5388,8 +5352,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_µg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_ng_Test () { UnitConverter target = new UnitConverter (); @@ -5403,8 +5367,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_ng_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_ng_Test2 () { UnitConverter target = new UnitConverter (); @@ -5418,8 +5382,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_ng_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_mg_Test () { UnitConverter target = new UnitConverter (); @@ -5433,8 +5397,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_mg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_mg_Test2 () { UnitConverter target = new UnitConverter (); @@ -5448,8 +5412,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_mg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_Gg_Test () { UnitConverter target = new UnitConverter (); @@ -5463,8 +5427,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_Gg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_Gg_Test2 () { UnitConverter target = new UnitConverter (); @@ -5478,8 +5442,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_Gg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagrams_to_tonne_Test () { UnitConverter target = new UnitConverter (); @@ -5493,8 +5457,8 @@ public void UnitConverter_ConvertUnits_Megagrams_to_tonne_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagrams_to_tonne_Test2 () { UnitConverter target = new UnitConverter (); @@ -5508,8 +5472,8 @@ public void UnitConverter_ConvertUnits_Megagrams_to_tonne_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_ton_Test () { UnitConverter target = new UnitConverter (); @@ -5523,8 +5487,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_ton_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_ton_Test2 () { UnitConverter target = new UnitConverter (); @@ -5538,8 +5502,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_ton_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_stone_Test () { UnitConverter target = new UnitConverter (); @@ -5553,8 +5517,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_stone_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_stone_Test2 () { UnitConverter target = new UnitConverter (); @@ -5568,8 +5532,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_stone_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_cwt_Test () { UnitConverter target = new UnitConverter (); @@ -5583,8 +5547,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_cwt_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_cwt_Test2 () { UnitConverter target = new UnitConverter (); @@ -5598,8 +5562,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_cwt_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_lb_Test () { UnitConverter target = new UnitConverter (); @@ -5613,8 +5577,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_lb_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_lb_Test2 () { UnitConverter target = new UnitConverter (); @@ -5628,8 +5592,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_lb_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_oz_Test () { UnitConverter target = new UnitConverter (); @@ -5643,8 +5607,8 @@ public void UnitConverter_ConvertUnits_Megagram_to_oz_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megagram_to_oz_Test2 () { UnitConverter target = new UnitConverter (); @@ -5656,13 +5620,13 @@ public void UnitConverter_ConvertUnits_Megagram_to_oz_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as Gigagram" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_kg_Test () { UnitConverter target = new UnitConverter (); @@ -5676,8 +5640,8 @@ public void UnitConverter_ConvertUnits_Gg_to_kg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_kg_Test2 () { UnitConverter target = new UnitConverter (); @@ -5691,8 +5655,8 @@ public void UnitConverter_ConvertUnits_Gg_to_kg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_g_Test () { UnitConverter target = new UnitConverter (); @@ -5706,8 +5670,8 @@ public void UnitConverter_ConvertUnits_Gg_to_g_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_g_Test2 () { UnitConverter target = new UnitConverter (); @@ -5721,8 +5685,8 @@ public void UnitConverter_ConvertUnits_Gg_to_g_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_mg_Test () { UnitConverter target = new UnitConverter (); @@ -5736,8 +5700,8 @@ public void UnitConverter_ConvertUnits_Gg_to_mg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_mg_Test2 () { UnitConverter target = new UnitConverter (); @@ -5751,8 +5715,8 @@ public void UnitConverter_ConvertUnits_Gg_to_mg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_µg_Test () { UnitConverter target = new UnitConverter (); @@ -5766,8 +5730,8 @@ public void UnitConverter_ConvertUnits_Gg_to_µg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_µg_Test2 () { UnitConverter target = new UnitConverter (); @@ -5781,8 +5745,8 @@ public void UnitConverter_ConvertUnits_Gg_to_µg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_ng_Test () { UnitConverter target = new UnitConverter (); @@ -5796,8 +5760,8 @@ public void UnitConverter_ConvertUnits_Gg_to_ng_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_ng_Test2 () { UnitConverter target = new UnitConverter (); @@ -5811,8 +5775,8 @@ public void UnitConverter_ConvertUnits_Gg_to_ng_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_Megagram_Test () { UnitConverter target = new UnitConverter (); @@ -5826,8 +5790,8 @@ public void UnitConverter_ConvertUnits_Gg_to_Megagram_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_Megagram_Test2 () { UnitConverter target = new UnitConverter (); @@ -5841,8 +5805,8 @@ public void UnitConverter_ConvertUnits_Gg_to_Megagram_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_tonne_Test () { UnitConverter target = new UnitConverter (); @@ -5856,8 +5820,8 @@ public void UnitConverter_ConvertUnits_Gg_to_tonne_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_tonne_Test2 () { UnitConverter target = new UnitConverter (); @@ -5871,8 +5835,8 @@ public void UnitConverter_ConvertUnits_Gg_to_tonne_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_ton_Test () { UnitConverter target = new UnitConverter (); @@ -5886,8 +5850,8 @@ public void UnitConverter_ConvertUnits_Gg_to_ton_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_ton_Test2 () { UnitConverter target = new UnitConverter (); @@ -5901,8 +5865,8 @@ public void UnitConverter_ConvertUnits_Gg_to_ton_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_stone_Test () { UnitConverter target = new UnitConverter (); @@ -5916,8 +5880,8 @@ public void UnitConverter_ConvertUnits_Gg_to_stone_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_stone_Test2 () { UnitConverter target = new UnitConverter (); @@ -5931,8 +5895,8 @@ public void UnitConverter_ConvertUnits_Gg_to_stone_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_cwt_Test () { UnitConverter target = new UnitConverter (); @@ -5946,8 +5910,8 @@ public void UnitConverter_ConvertUnits_Gg_to_cwt_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_cwt_Test2 () { UnitConverter target = new UnitConverter (); @@ -5961,8 +5925,8 @@ public void UnitConverter_ConvertUnits_Gg_to_cwt_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_lb_Test () { UnitConverter target = new UnitConverter (); @@ -5976,8 +5940,8 @@ public void UnitConverter_ConvertUnits_Gg_to_lb_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_lb_Test2 () { UnitConverter target = new UnitConverter (); @@ -5991,8 +5955,8 @@ public void UnitConverter_ConvertUnits_Gg_to_lb_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_oz_Test () { UnitConverter target = new UnitConverter (); @@ -6006,8 +5970,8 @@ public void UnitConverter_ConvertUnits_Gg_to_oz_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gg_to_oz_Test2 () { UnitConverter target = new UnitConverter (); @@ -6019,13 +5983,13 @@ public void UnitConverter_ConvertUnits_Gg_to_oz_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as Tonnes" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_kg_Test () { UnitConverter target = new UnitConverter (); @@ -6039,8 +6003,8 @@ public void UnitConverter_ConvertUnits_tonne_to_kg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_kg_Test2 () { UnitConverter target = new UnitConverter (); @@ -6054,8 +6018,8 @@ public void UnitConverter_ConvertUnits_tonne_to_kg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_mg_Test () { UnitConverter target = new UnitConverter (); @@ -6069,8 +6033,8 @@ public void UnitConverter_ConvertUnits_tonne_to_mg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_mg_Test2 () { UnitConverter target = new UnitConverter (); @@ -6084,8 +6048,8 @@ public void UnitConverter_ConvertUnits_tonne_to_mg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_g_Test () { UnitConverter target = new UnitConverter (); @@ -6099,8 +6063,8 @@ public void UnitConverter_ConvertUnits_tonne_to_g_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_g_Test2 () { UnitConverter target = new UnitConverter (); @@ -6114,8 +6078,8 @@ public void UnitConverter_ConvertUnits_tonne_to_g_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_µg_Test () { UnitConverter target = new UnitConverter (); @@ -6129,8 +6093,8 @@ public void UnitConverter_ConvertUnits_tonne_to_µg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_µg_Test2 () { UnitConverter target = new UnitConverter (); @@ -6144,8 +6108,8 @@ public void UnitConverter_ConvertUnits_tonne_to_µg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_ng_Test () { UnitConverter target = new UnitConverter (); @@ -6159,8 +6123,8 @@ public void UnitConverter_ConvertUnits_tonne_to_ng_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_ng_Test2 () { UnitConverter target = new UnitConverter (); @@ -6174,8 +6138,8 @@ public void UnitConverter_ConvertUnits_tonne_to_ng_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_Megagrams_Test () { UnitConverter target = new UnitConverter (); @@ -6189,8 +6153,8 @@ public void UnitConverter_ConvertUnits_tonne_to_Megagrams_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_Megagrams_Test2 () { UnitConverter target = new UnitConverter (); @@ -6204,8 +6168,8 @@ public void UnitConverter_ConvertUnits_tonne_to_Megagrams_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_Gg_Test () { UnitConverter target = new UnitConverter (); @@ -6219,8 +6183,8 @@ public void UnitConverter_ConvertUnits_tonne_to_Gg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_Gg_Test2 () { UnitConverter target = new UnitConverter (); @@ -6234,8 +6198,8 @@ public void UnitConverter_ConvertUnits_tonne_to_Gg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_ton_Test () { UnitConverter target = new UnitConverter (); @@ -6249,8 +6213,8 @@ public void UnitConverter_ConvertUnits_tonne_to_ton_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_ton_Test2 () { UnitConverter target = new UnitConverter (); @@ -6264,8 +6228,8 @@ public void UnitConverter_ConvertUnits_tonne_to_ton_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_cwt_Test () { UnitConverter target = new UnitConverter (); @@ -6279,8 +6243,8 @@ public void UnitConverter_ConvertUnits_tonne_to_cwt_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_cwt_Test2 () { UnitConverter target = new UnitConverter (); @@ -6294,8 +6258,8 @@ public void UnitConverter_ConvertUnits_tonne_to_cwt_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_stone_Test () { UnitConverter target = new UnitConverter (); @@ -6309,8 +6273,8 @@ public void UnitConverter_ConvertUnits_tonne_to_stone_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_stone_Test2 () { UnitConverter target = new UnitConverter (); @@ -6324,8 +6288,8 @@ public void UnitConverter_ConvertUnits_tonne_to_stone_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_lb_Test () { UnitConverter target = new UnitConverter (); @@ -6339,8 +6303,8 @@ public void UnitConverter_ConvertUnits_tonne_to_lb_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_lb_Test2 () { UnitConverter target = new UnitConverter (); @@ -6354,8 +6318,8 @@ public void UnitConverter_ConvertUnits_tonne_to_lb_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_oz_Test () { UnitConverter target = new UnitConverter (); @@ -6369,8 +6333,8 @@ public void UnitConverter_ConvertUnits_tonne_to_oz_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonne_to_oz_Test2 () { UnitConverter target = new UnitConverter (); @@ -6382,13 +6346,13 @@ public void UnitConverter_ConvertUnits_tonne_to_oz_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as Tons" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ton_to_kg_Test () { UnitConverter target = new UnitConverter (); @@ -6402,8 +6366,8 @@ public void UnitConverter_ConvertUnits_ton_to_kg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ton_to_kg_Test2 () { UnitConverter target = new UnitConverter (); @@ -6417,8 +6381,8 @@ public void UnitConverter_ConvertUnits_ton_to_kg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ton_to_mg_Test () { UnitConverter target = new UnitConverter (); @@ -6432,8 +6396,8 @@ public void UnitConverter_ConvertUnits_ton_to_mg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ton_to_mg_Test2 () { UnitConverter target = new UnitConverter (); @@ -6447,8 +6411,8 @@ public void UnitConverter_ConvertUnits_ton_to_mg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ton_to_g_Test () { UnitConverter target = new UnitConverter (); @@ -6462,8 +6426,8 @@ public void UnitConverter_ConvertUnits_ton_to_g_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ton_to_g_Test2 () { UnitConverter target = new UnitConverter (); @@ -6477,8 +6441,8 @@ public void UnitConverter_ConvertUnits_ton_to_g_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ton_to_µg_Test () { UnitConverter target = new UnitConverter (); @@ -6493,8 +6457,8 @@ public void UnitConverter_ConvertUnits_ton_to_µg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ton_to_µg_Test2 () { UnitConverter target = new UnitConverter (); @@ -6508,8 +6472,8 @@ public void UnitConverter_ConvertUnits_ton_to_µg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ton_to_ng_Test () { UnitConverter target = new UnitConverter (); @@ -6524,8 +6488,8 @@ public void UnitConverter_ConvertUnits_ton_to_ng_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ton_to_ng_Test2 () { UnitConverter target = new UnitConverter (); @@ -6539,8 +6503,8 @@ public void UnitConverter_ConvertUnits_ton_to_ng_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ton_to_Megagrams_Test () { UnitConverter target = new UnitConverter (); @@ -6554,8 +6518,8 @@ public void UnitConverter_ConvertUnits_ton_to_Megagrams_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ton_to_Megagrams_Test2 () { UnitConverter target = new UnitConverter (); @@ -6569,8 +6533,8 @@ public void UnitConverter_ConvertUnits_ton_to_Megagrams_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ton_to_Gg_Test () { UnitConverter target = new UnitConverter (); @@ -6584,8 +6548,8 @@ public void UnitConverter_ConvertUnits_ton_to_Gg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ton_to_Gg_Test2 () { UnitConverter target = new UnitConverter (); @@ -6599,8 +6563,8 @@ public void UnitConverter_ConvertUnits_ton_to_Gg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ton_to_tonne_Test () { UnitConverter target = new UnitConverter (); @@ -6614,8 +6578,8 @@ public void UnitConverter_ConvertUnits_ton_to_tonne_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ton_to_tonne_Test2 () { UnitConverter target = new UnitConverter (); @@ -6629,8 +6593,8 @@ public void UnitConverter_ConvertUnits_ton_to_tonne_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ton_to_lb_Test () { UnitConverter target = new UnitConverter (); @@ -6644,8 +6608,8 @@ public void UnitConverter_ConvertUnits_ton_to_lb_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ton_to_lb_Test2 () { UnitConverter target = new UnitConverter (); @@ -6659,8 +6623,8 @@ public void UnitConverter_ConvertUnits_ton_to_lb_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ton_to_oz_Test () { UnitConverter target = new UnitConverter (); @@ -6674,8 +6638,8 @@ public void UnitConverter_ConvertUnits_ton_to_oz_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ton_to_oz_Test2 () { UnitConverter target = new UnitConverter (); @@ -6687,13 +6651,13 @@ public void UnitConverter_ConvertUnits_ton_to_oz_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as Stone" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_kg_Test () { UnitConverter target = new UnitConverter (); @@ -6707,8 +6671,8 @@ public void UnitConverter_ConvertUnits_stone_to_kg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_kg_Test2 () { UnitConverter target = new UnitConverter (); @@ -6722,8 +6686,8 @@ public void UnitConverter_ConvertUnits_stone_to_kg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_g_Test () { UnitConverter target = new UnitConverter (); @@ -6737,8 +6701,8 @@ public void UnitConverter_ConvertUnits_stone_to_g_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_g_Test2 () { UnitConverter target = new UnitConverter (); @@ -6753,8 +6717,8 @@ public void UnitConverter_ConvertUnits_stone_to_g_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_mg_Test () { UnitConverter target = new UnitConverter (); @@ -6769,8 +6733,8 @@ public void UnitConverter_ConvertUnits_stone_to_mg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_mg_Test2 () { UnitConverter target = new UnitConverter (); @@ -6785,8 +6749,8 @@ public void UnitConverter_ConvertUnits_stone_to_mg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_µg_Test () { UnitConverter target = new UnitConverter (); @@ -6800,8 +6764,8 @@ public void UnitConverter_ConvertUnits_stone_to_µg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_µg_Test2 () { UnitConverter target = new UnitConverter (); @@ -6816,8 +6780,8 @@ public void UnitConverter_ConvertUnits_stone_to_µg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_ng_Test () { UnitConverter target = new UnitConverter (); @@ -6831,8 +6795,8 @@ public void UnitConverter_ConvertUnits_stone_to_ng_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_ng_Test2 () { UnitConverter target = new UnitConverter (); @@ -6847,8 +6811,8 @@ public void UnitConverter_ConvertUnits_stone_to_ng_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_Megagram_Test () { UnitConverter target = new UnitConverter (); @@ -6862,8 +6826,8 @@ public void UnitConverter_ConvertUnits_stone_to_Megagram_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_Megagram_Test2 () { UnitConverter target = new UnitConverter (); @@ -6878,8 +6842,8 @@ public void UnitConverter_ConvertUnits_stone_to_Megagram_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_Gg_Test () { UnitConverter target = new UnitConverter (); @@ -6893,8 +6857,8 @@ public void UnitConverter_ConvertUnits_stone_to_Gg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_Gg_Test2 () { UnitConverter target = new UnitConverter (); @@ -6908,8 +6872,8 @@ public void UnitConverter_ConvertUnits_stone_to_Gg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_tonne_Test () { UnitConverter target = new UnitConverter (); @@ -6923,8 +6887,8 @@ public void UnitConverter_ConvertUnits_stone_to_tonne_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_tonne_Test2 () { UnitConverter target = new UnitConverter (); @@ -6939,8 +6903,8 @@ public void UnitConverter_ConvertUnits_stone_to_tonne_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_ton_Test () { UnitConverter target = new UnitConverter (); @@ -6954,8 +6918,8 @@ public void UnitConverter_ConvertUnits_stone_to_ton_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_ton_Test2 () { UnitConverter target = new UnitConverter (); @@ -6970,8 +6934,8 @@ public void UnitConverter_ConvertUnits_stone_to_ton_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_cwt_Test () { UnitConverter target = new UnitConverter (); @@ -6985,8 +6949,8 @@ public void UnitConverter_ConvertUnits_stone_to_cwt_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_cwt_Test2 () { UnitConverter target = new UnitConverter (); @@ -7000,8 +6964,8 @@ public void UnitConverter_ConvertUnits_stone_to_cwt_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_lb_Test () { UnitConverter target = new UnitConverter (); @@ -7015,8 +6979,8 @@ public void UnitConverter_ConvertUnits_stone_to_lb_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_lb_Test2 () { UnitConverter target = new UnitConverter (); @@ -7030,8 +6994,8 @@ public void UnitConverter_ConvertUnits_stone_to_lb_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_oz_Test () { UnitConverter target = new UnitConverter (); @@ -7045,8 +7009,8 @@ public void UnitConverter_ConvertUnits_stone_to_oz_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_stone_to_oz_Test2 () { UnitConverter target = new UnitConverter (); @@ -7058,13 +7022,13 @@ public void UnitConverter_ConvertUnits_stone_to_oz_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as CWT" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_kg_Test () { UnitConverter target = new UnitConverter (); @@ -7079,8 +7043,8 @@ public void UnitConverter_ConvertUnits_cwt_to_kg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_kg_Test2 () { UnitConverter target = new UnitConverter (); @@ -7094,8 +7058,8 @@ public void UnitConverter_ConvertUnits_cwt_to_kg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_mg_Test () { UnitConverter target = new UnitConverter (); @@ -7109,8 +7073,8 @@ public void UnitConverter_ConvertUnits_cwt_to_mg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_mg_Test2 () { UnitConverter target = new UnitConverter (); @@ -7124,8 +7088,8 @@ public void UnitConverter_ConvertUnits_cwt_to_mg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_g_Test () { UnitConverter target = new UnitConverter (); @@ -7140,8 +7104,8 @@ public void UnitConverter_ConvertUnits_cwt_to_g_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_g_Test2 () { UnitConverter target = new UnitConverter (); @@ -7157,8 +7121,8 @@ public void UnitConverter_ConvertUnits_cwt_to_g_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_µg_Test () { UnitConverter target = new UnitConverter (); @@ -7172,8 +7136,8 @@ public void UnitConverter_ConvertUnits_cwt_to_µg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_µg_Test2 () { UnitConverter target = new UnitConverter (); @@ -7187,8 +7151,8 @@ public void UnitConverter_ConvertUnits_cwt_to_µg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_ng_Test () { UnitConverter target = new UnitConverter (); @@ -7202,8 +7166,8 @@ public void UnitConverter_ConvertUnits_cwt_to_ng_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_ng_Test2 () { UnitConverter target = new UnitConverter (); @@ -7217,8 +7181,8 @@ public void UnitConverter_ConvertUnits_cwt_to_ng_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_Megagram_Test () { UnitConverter target = new UnitConverter (); @@ -7232,8 +7196,8 @@ public void UnitConverter_ConvertUnits_cwt_to_Megagram_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_Megagram_Test2 () { UnitConverter target = new UnitConverter (); @@ -7247,8 +7211,8 @@ public void UnitConverter_ConvertUnits_cwt_to_Megagram_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_Gg_Test () { UnitConverter target = new UnitConverter (); @@ -7262,8 +7226,8 @@ public void UnitConverter_ConvertUnits_cwt_to_Gg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_Gg_Test2 () { UnitConverter target = new UnitConverter (); @@ -7278,8 +7242,8 @@ public void UnitConverter_ConvertUnits_cwt_to_Gg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_tonne_Test () { UnitConverter target = new UnitConverter (); @@ -7293,8 +7257,8 @@ public void UnitConverter_ConvertUnits_cwt_to_tonne_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_tonne_Test2 () { UnitConverter target = new UnitConverter (); @@ -7308,8 +7272,8 @@ public void UnitConverter_ConvertUnits_cwt_to_tonne_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_ton_Test () { UnitConverter target = new UnitConverter (); @@ -7323,8 +7287,8 @@ public void UnitConverter_ConvertUnits_cwt_to_ton_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_ton_Test2 () { UnitConverter target = new UnitConverter (); @@ -7338,8 +7302,8 @@ public void UnitConverter_ConvertUnits_cwt_to_ton_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_stone_Test () { UnitConverter target = new UnitConverter (); @@ -7353,8 +7317,8 @@ public void UnitConverter_ConvertUnits_cwt_to_stone_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_stone_Test2 () { UnitConverter target = new UnitConverter (); @@ -7368,8 +7332,8 @@ public void UnitConverter_ConvertUnits_cwt_to_stone_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_lb_Test () { UnitConverter target = new UnitConverter (); @@ -7383,8 +7347,8 @@ public void UnitConverter_ConvertUnits_cwt_to_lb_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_lb_Test2 () { UnitConverter target = new UnitConverter (); @@ -7398,8 +7362,8 @@ public void UnitConverter_ConvertUnits_cwt_to_lb_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_oz_Test () { UnitConverter target = new UnitConverter (); @@ -7413,8 +7377,8 @@ public void UnitConverter_ConvertUnits_cwt_to_oz_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cwt_to_oz_Test2 () { UnitConverter target = new UnitConverter (); @@ -7431,8 +7395,8 @@ public void UnitConverter_ConvertUnits_cwt_to_oz_Test2 () #region "Source as Pound" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_kg_Test () { UnitConverter target = new UnitConverter (); @@ -7446,8 +7410,8 @@ public void UnitConverter_ConvertUnits_lb_to_kg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_kg_Test2 () { UnitConverter target = new UnitConverter (); @@ -7461,8 +7425,8 @@ public void UnitConverter_ConvertUnits_lb_to_kg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_g_Test () { UnitConverter target = new UnitConverter (); @@ -7476,8 +7440,8 @@ public void UnitConverter_ConvertUnits_lb_to_g_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_g_Test2 () { UnitConverter target = new UnitConverter (); @@ -7491,8 +7455,8 @@ public void UnitConverter_ConvertUnits_lb_to_g_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_mg_Test () { UnitConverter target = new UnitConverter (); @@ -7506,8 +7470,8 @@ public void UnitConverter_ConvertUnits_lb_to_mg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_mg_Test2 () { UnitConverter target = new UnitConverter (); @@ -7521,8 +7485,8 @@ public void UnitConverter_ConvertUnits_lb_to_mg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_µg_Test () { UnitConverter target = new UnitConverter (); @@ -7536,8 +7500,8 @@ public void UnitConverter_ConvertUnits_lb_to_µg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_µg_Test2 () { UnitConverter target = new UnitConverter (); @@ -7551,8 +7515,8 @@ public void UnitConverter_ConvertUnits_lb_to_µg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_ng_Test () { UnitConverter target = new UnitConverter (); @@ -7567,8 +7531,8 @@ public void UnitConverter_ConvertUnits_lb_to_ng_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_ng_Test2 () { UnitConverter target = new UnitConverter (); @@ -7582,8 +7546,8 @@ public void UnitConverter_ConvertUnits_lb_to_ng_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_Megagram_Test () { UnitConverter target = new UnitConverter (); @@ -7597,8 +7561,8 @@ public void UnitConverter_ConvertUnits_lb_to_Megagram_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_Megagram_Test2 () { UnitConverter target = new UnitConverter (); @@ -7612,8 +7576,8 @@ public void UnitConverter_ConvertUnits_lb_to_Megagram_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_Gg_Test () { UnitConverter target = new UnitConverter (); @@ -7627,8 +7591,8 @@ public void UnitConverter_ConvertUnits_lb_to_Gg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_Gg_Test2 () { UnitConverter target = new UnitConverter (); @@ -7642,8 +7606,8 @@ public void UnitConverter_ConvertUnits_lb_to_Gg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_tonne_Test () { UnitConverter target = new UnitConverter (); @@ -7657,8 +7621,8 @@ public void UnitConverter_ConvertUnits_lb_to_tonne_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_tonne_Test2 () { UnitConverter target = new UnitConverter (); @@ -7672,8 +7636,8 @@ public void UnitConverter_ConvertUnits_lb_to_tonne_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_ton_Test () { UnitConverter target = new UnitConverter (); @@ -7687,8 +7651,8 @@ public void UnitConverter_ConvertUnits_lb_to_ton_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_ton_Test2 () { UnitConverter target = new UnitConverter (); @@ -7702,8 +7666,8 @@ public void UnitConverter_ConvertUnits_lb_to_ton_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_stone_Test () { UnitConverter target = new UnitConverter (); @@ -7717,8 +7681,8 @@ public void UnitConverter_ConvertUnits_lb_to_stone_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_stone_Test2 () { UnitConverter target = new UnitConverter (); @@ -7732,8 +7696,8 @@ public void UnitConverter_ConvertUnits_lb_to_stone_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_cwt_Test () { UnitConverter target = new UnitConverter (); @@ -7747,8 +7711,8 @@ public void UnitConverter_ConvertUnits_lb_to_cwt_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_cwt_Test2 () { UnitConverter target = new UnitConverter (); @@ -7762,8 +7726,8 @@ public void UnitConverter_ConvertUnits_lb_to_cwt_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_oz_Test () { UnitConverter target = new UnitConverter (); @@ -7777,8 +7741,8 @@ public void UnitConverter_ConvertUnits_lb_to_oz_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lb_to_oz_Test2 () { UnitConverter target = new UnitConverter (); @@ -7790,13 +7754,13 @@ public void UnitConverter_ConvertUnits_lb_to_oz_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as Ounce" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_kg_Test () { UnitConverter target = new UnitConverter (); @@ -7810,8 +7774,8 @@ public void UnitConverter_ConvertUnits_oz_to_kg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_kg_Test2 () { UnitConverter target = new UnitConverter (); @@ -7825,8 +7789,8 @@ public void UnitConverter_ConvertUnits_oz_to_kg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_g_Test () { UnitConverter target = new UnitConverter (); @@ -7840,8 +7804,8 @@ public void UnitConverter_ConvertUnits_oz_to_g_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_g_Test2 () { UnitConverter target = new UnitConverter (); @@ -7855,8 +7819,8 @@ public void UnitConverter_ConvertUnits_oz_to_g_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_mg_Test () { UnitConverter target = new UnitConverter (); @@ -7870,8 +7834,8 @@ public void UnitConverter_ConvertUnits_oz_to_mg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_mg_Test2 () { UnitConverter target = new UnitConverter (); @@ -7885,8 +7849,8 @@ public void UnitConverter_ConvertUnits_oz_to_mg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_µg_Test () { UnitConverter target = new UnitConverter (); @@ -7900,8 +7864,8 @@ public void UnitConverter_ConvertUnits_oz_to_µg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_µg_Test2 () { UnitConverter target = new UnitConverter (); @@ -7915,8 +7879,8 @@ public void UnitConverter_ConvertUnits_oz_to_µg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_ng_Test () { UnitConverter target = new UnitConverter (); @@ -7931,8 +7895,8 @@ public void UnitConverter_ConvertUnits_oz_to_ng_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_ng_Test2 () { UnitConverter target = new UnitConverter (); @@ -7946,8 +7910,8 @@ public void UnitConverter_ConvertUnits_oz_to_ng_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_Megagram_Test () { UnitConverter target = new UnitConverter (); @@ -7961,8 +7925,8 @@ public void UnitConverter_ConvertUnits_oz_to_Megagram_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_Megagram_Test2 () { UnitConverter target = new UnitConverter (); @@ -7976,8 +7940,8 @@ public void UnitConverter_ConvertUnits_oz_to_Megagram_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_Gg_Test () { UnitConverter target = new UnitConverter (); @@ -7991,8 +7955,8 @@ public void UnitConverter_ConvertUnits_oz_to_Gg_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_Gg_Test2 () { UnitConverter target = new UnitConverter (); @@ -8006,8 +7970,8 @@ public void UnitConverter_ConvertUnits_oz_to_Gg_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_tonne_Test () { UnitConverter target = new UnitConverter (); @@ -8021,8 +7985,8 @@ public void UnitConverter_ConvertUnits_oz_to_tonne_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_tonne_Test2 () { UnitConverter target = new UnitConverter (); @@ -8036,8 +8000,8 @@ public void UnitConverter_ConvertUnits_oz_to_tonne_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_ton_Test () { UnitConverter target = new UnitConverter (); @@ -8051,8 +8015,8 @@ public void UnitConverter_ConvertUnits_oz_to_ton_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_ton_Test2 () { UnitConverter target = new UnitConverter (); @@ -8066,8 +8030,8 @@ public void UnitConverter_ConvertUnits_oz_to_ton_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_stone_Test () { UnitConverter target = new UnitConverter (); @@ -8081,8 +8045,8 @@ public void UnitConverter_ConvertUnits_oz_to_stone_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_stone_Test2 () { UnitConverter target = new UnitConverter (); @@ -8097,8 +8061,8 @@ public void UnitConverter_ConvertUnits_oz_to_stone_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_cwt_Test () { UnitConverter target = new UnitConverter (); @@ -8112,8 +8076,8 @@ public void UnitConverter_ConvertUnits_oz_to_cwt_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_cwt_Test2 () { UnitConverter target = new UnitConverter (); @@ -8127,8 +8091,8 @@ public void UnitConverter_ConvertUnits_oz_to_cwt_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_lb_Test () { UnitConverter target = new UnitConverter (); @@ -8142,8 +8106,8 @@ public void UnitConverter_ConvertUnits_oz_to_lb_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_oz_to_lb_Test2 () { UnitConverter target = new UnitConverter (); @@ -8155,15 +8119,15 @@ public void UnitConverter_ConvertUnits_oz_to_lb_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } + #endregion #endregion - #region "Time Tests" #region "Source as Seconds" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_sec_to_min_Test () { UnitConverter target = new UnitConverter (); @@ -8177,8 +8141,8 @@ public void UnitConverter_ConvertUnits_sec_to_min_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_sec_to_min_Test2 () { UnitConverter target = new UnitConverter (); @@ -8192,8 +8156,8 @@ public void UnitConverter_ConvertUnits_sec_to_min_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_sec_to_hr_Test () { UnitConverter target = new UnitConverter (); @@ -8207,8 +8171,8 @@ public void UnitConverter_ConvertUnits_sec_to_hr_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_sec_to_hr_Test2 () { UnitConverter target = new UnitConverter (); @@ -8222,8 +8186,8 @@ public void UnitConverter_ConvertUnits_sec_to_hr_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_sec_to_ms_Test () { UnitConverter target = new UnitConverter (); @@ -8237,8 +8201,8 @@ public void UnitConverter_ConvertUnits_sec_to_ms_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_sec_to_ms_Test2 () { UnitConverter target = new UnitConverter (); @@ -8252,8 +8216,8 @@ public void UnitConverter_ConvertUnits_sec_to_ms_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_sec_to_day_Test () { UnitConverter target = new UnitConverter (); @@ -8267,8 +8231,8 @@ public void UnitConverter_ConvertUnits_sec_to_day_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_sec_to_day_Test2 () { UnitConverter target = new UnitConverter (); @@ -8282,8 +8246,8 @@ public void UnitConverter_ConvertUnits_sec_to_day_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_sec_to_wk_Test () { UnitConverter target = new UnitConverter (); @@ -8297,8 +8261,8 @@ public void UnitConverter_ConvertUnits_sec_to_wk_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_sec_to_wk_Test2 () { UnitConverter target = new UnitConverter (); @@ -8310,13 +8274,13 @@ public void UnitConverter_ConvertUnits_sec_to_wk_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as Minutes" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_min_to_sec_Test () { UnitConverter target = new UnitConverter (); @@ -8330,8 +8294,8 @@ public void UnitConverter_ConvertUnits_min_to_sec_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_min_to_sec_Test2 () { UnitConverter target = new UnitConverter (); @@ -8345,8 +8309,8 @@ public void UnitConverter_ConvertUnits_min_to_sec_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_min_to_hr_Test () { UnitConverter target = new UnitConverter (); @@ -8360,8 +8324,8 @@ public void UnitConverter_ConvertUnits_min_to_hr_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_min_to_hr_Test2 () { UnitConverter target = new UnitConverter (); @@ -8375,8 +8339,8 @@ public void UnitConverter_ConvertUnits_min_to_hr_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_min_to_ms_Test () { UnitConverter target = new UnitConverter (); @@ -8390,8 +8354,8 @@ public void UnitConverter_ConvertUnits_min_to_ms_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_min_to_ms_Test2 () { UnitConverter target = new UnitConverter (); @@ -8405,8 +8369,8 @@ public void UnitConverter_ConvertUnits_min_to_ms_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_min_to_day_Test () { UnitConverter target = new UnitConverter (); @@ -8420,8 +8384,8 @@ public void UnitConverter_ConvertUnits_min_to_day_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_min_to_day_Test2 () { UnitConverter target = new UnitConverter (); @@ -8435,8 +8399,8 @@ public void UnitConverter_ConvertUnits_min_to_day_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_min_to_wk_Test () { UnitConverter target = new UnitConverter (); @@ -8450,8 +8414,8 @@ public void UnitConverter_ConvertUnits_min_to_wk_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_min_to_wk_Test2 () { UnitConverter target = new UnitConverter (); @@ -8463,13 +8427,13 @@ public void UnitConverter_ConvertUnits_min_to_wk_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as Hours" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_hr_to_sec_Test () { UnitConverter target = new UnitConverter (); @@ -8483,8 +8447,8 @@ public void UnitConverter_ConvertUnits_hr_to_sec_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_hr_to_sec_Test2 () { UnitConverter target = new UnitConverter (); @@ -8498,8 +8462,8 @@ public void UnitConverter_ConvertUnits_hr_to_sec_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_hr_to_min_Test () { UnitConverter target = new UnitConverter (); @@ -8513,8 +8477,8 @@ public void UnitConverter_ConvertUnits_hr_to_min_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_hr_to_min_Test2 () { UnitConverter target = new UnitConverter (); @@ -8528,8 +8492,8 @@ public void UnitConverter_ConvertUnits_hr_to_min_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_hr_to_ms_Test () { UnitConverter target = new UnitConverter (); @@ -8543,8 +8507,8 @@ public void UnitConverter_ConvertUnits_hr_to_ms_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_hr_to_ms_Test2 () { UnitConverter target = new UnitConverter (); @@ -8558,8 +8522,8 @@ public void UnitConverter_ConvertUnits_hr_to_ms_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_hr_to_day_Test () { UnitConverter target = new UnitConverter (); @@ -8573,8 +8537,8 @@ public void UnitConverter_ConvertUnits_hr_to_day_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_hr_to_day_Test2 () { UnitConverter target = new UnitConverter (); @@ -8588,8 +8552,8 @@ public void UnitConverter_ConvertUnits_hr_to_day_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_hr_to_wk_Test () { UnitConverter target = new UnitConverter (); @@ -8603,8 +8567,8 @@ public void UnitConverter_ConvertUnits_hr_to_wk_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_hr_to_wk_Test2 () { UnitConverter target = new UnitConverter (); @@ -8616,13 +8580,13 @@ public void UnitConverter_ConvertUnits_hr_to_wk_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as Milliseconds" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ms_to_sec_Test () { UnitConverter target = new UnitConverter (); @@ -8636,8 +8600,8 @@ public void UnitConverter_ConvertUnits_ms_to_sec_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ms_to_sec_Test2 () { UnitConverter target = new UnitConverter (); @@ -8651,8 +8615,8 @@ public void UnitConverter_ConvertUnits_ms_to_sec_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ms_to_min_Test () { UnitConverter target = new UnitConverter (); @@ -8666,8 +8630,8 @@ public void UnitConverter_ConvertUnits_ms_to_min_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ms_to_min_Test2 () { UnitConverter target = new UnitConverter (); @@ -8681,8 +8645,8 @@ public void UnitConverter_ConvertUnits_ms_to_min_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ms_to_hr_Test () { UnitConverter target = new UnitConverter (); @@ -8696,8 +8660,8 @@ public void UnitConverter_ConvertUnits_ms_to_hr_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ms_to_hr_Test2 () { UnitConverter target = new UnitConverter (); @@ -8711,8 +8675,8 @@ public void UnitConverter_ConvertUnits_ms_to_hr_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ms_to_day_Test () { UnitConverter target = new UnitConverter (); @@ -8726,8 +8690,8 @@ public void UnitConverter_ConvertUnits_ms_to_day_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ms_to_day_Test2 () { UnitConverter target = new UnitConverter (); @@ -8741,8 +8705,8 @@ public void UnitConverter_ConvertUnits_ms_to_day_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ms_to_wk_Test () { UnitConverter target = new UnitConverter (); @@ -8756,8 +8720,8 @@ public void UnitConverter_ConvertUnits_ms_to_wk_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ms_to_wk_Test2 () { UnitConverter target = new UnitConverter (); @@ -8769,13 +8733,13 @@ public void UnitConverter_ConvertUnits_ms_to_wk_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as Days" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_day_to_sec_Test () { UnitConverter target = new UnitConverter (); @@ -8789,8 +8753,8 @@ public void UnitConverter_ConvertUnits_day_to_sec_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_day_to_sec_Test2 () { UnitConverter target = new UnitConverter (); @@ -8804,8 +8768,8 @@ public void UnitConverter_ConvertUnits_day_to_sec_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_day_to_min_Test () { UnitConverter target = new UnitConverter (); @@ -8819,8 +8783,8 @@ public void UnitConverter_ConvertUnits_day_to_min_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_day_to_min_Test2 () { UnitConverter target = new UnitConverter (); @@ -8834,8 +8798,8 @@ public void UnitConverter_ConvertUnits_day_to_min_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_day_to_hr_Test () { UnitConverter target = new UnitConverter (); @@ -8849,8 +8813,8 @@ public void UnitConverter_ConvertUnits_day_to_hr_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_day_to_hr_Test2 () { UnitConverter target = new UnitConverter (); @@ -8864,8 +8828,8 @@ public void UnitConverter_ConvertUnits_day_to_hr_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_day_to_ms_Test () { UnitConverter target = new UnitConverter (); @@ -8879,8 +8843,8 @@ public void UnitConverter_ConvertUnits_day_to_ms_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_day_to_ms_Test2 () { UnitConverter target = new UnitConverter (); @@ -8894,8 +8858,8 @@ public void UnitConverter_ConvertUnits_day_to_ms_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_day_to_wk_Test () { UnitConverter target = new UnitConverter (); @@ -8909,8 +8873,8 @@ public void UnitConverter_ConvertUnits_day_to_wk_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_day_to_wk_Test2 () { UnitConverter target = new UnitConverter (); @@ -8922,13 +8886,13 @@ public void UnitConverter_ConvertUnits_day_to_wk_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - #endregion + #endregion #region "Source as Weeks" [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_wk_to_sec_Test () { UnitConverter target = new UnitConverter (); @@ -8942,8 +8906,8 @@ public void UnitConverter_ConvertUnits_wk_to_sec_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_wk_to_sec_Test2 () { UnitConverter target = new UnitConverter (); @@ -8957,8 +8921,8 @@ public void UnitConverter_ConvertUnits_wk_to_sec_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_wk_to_min_Test () { UnitConverter target = new UnitConverter (); @@ -8972,8 +8936,8 @@ public void UnitConverter_ConvertUnits_wk_to_min_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_wk_to_min_Test2 () { UnitConverter target = new UnitConverter (); @@ -8987,8 +8951,8 @@ public void UnitConverter_ConvertUnits_wk_to_min_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_wk_to_hr_Test () { UnitConverter target = new UnitConverter (); @@ -9002,8 +8966,8 @@ public void UnitConverter_ConvertUnits_wk_to_hr_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_wk_to_hr_Test2 () { UnitConverter target = new UnitConverter (); @@ -9017,8 +8981,8 @@ public void UnitConverter_ConvertUnits_wk_to_hr_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_wk_to_ms_Test () { UnitConverter target = new UnitConverter (); @@ -9032,8 +8996,8 @@ public void UnitConverter_ConvertUnits_wk_to_ms_Test () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_wk_to_ms_Test2 () { UnitConverter target = new UnitConverter (); @@ -9047,8 +9011,8 @@ public void UnitConverter_ConvertUnits_wk_to_ms_Test2 () } [Test] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_wk_to_day_Test () { UnitConverter target = new UnitConverter (); @@ -9075,10 +9039,9 @@ public void UnitConverter_ConvertUnits_wk_to_day_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } + #endregion #endregion - - #endregion } } \ No newline at end of file diff --git a/Cubico.Tests/UnitConverterTest2.cs b/Cubico.Tests/UnitConverterTest2.cs index 3eecfea..d9014d7 100644 --- a/Cubico.Tests/UnitConverterTest2.cs +++ b/Cubico.Tests/UnitConverterTest2.cs @@ -2,55 +2,27 @@ using NUnit.Framework; using Cubico; -namespace Cubico.Test +namespace Cubico.Tests { - [TestClass()] + [TestFixture] public class UnitConverterTest2 { - private TestContext testContextInstance; - private UnitProvider unitPro = new UnitProvider (); - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// + TestContext testContextInstance; + UnitProvider unitPro = new UnitProvider (); + + // Gets or sets the test context which provides information about and functionality for the current test run. public TestContext TestContext { get { return testContextInstance; } set { testContextInstance = value; } } - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ _ - //Public Sub MyTestCleanup() - //End Sub - // - #endregion #region "UnitConverter.ConvertUnits" - #region "Force Tests" #region "Source as Newton (N)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_N_to_dyn_Test () { UnitConverter target = new UnitConverter (); @@ -63,9 +35,9 @@ public void UnitConverter_ConvertUnits_N_to_dyn_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_N_to_dyn_Test2 () { UnitConverter target = new UnitConverter (); @@ -78,9 +50,9 @@ public void UnitConverter_ConvertUnits_N_to_dyn_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_N_to_lbf_Test () { UnitConverter target = new UnitConverter (); @@ -93,9 +65,9 @@ public void UnitConverter_ConvertUnits_N_to_lbf_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_N_to_lbf_Test2 () { UnitConverter target = new UnitConverter (); @@ -108,9 +80,9 @@ public void UnitConverter_ConvertUnits_N_to_lbf_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_N_to_tonf_Test () { UnitConverter target = new UnitConverter (); @@ -123,9 +95,9 @@ public void UnitConverter_ConvertUnits_N_to_tonf_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_N_to_tonf_Test2 () { UnitConverter target = new UnitConverter (); @@ -138,9 +110,9 @@ public void UnitConverter_ConvertUnits_N_to_tonf_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_N_to_tonnef_Test () { UnitConverter target = new UnitConverter (); @@ -153,9 +125,9 @@ public void UnitConverter_ConvertUnits_N_to_tonnef_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_N_to_tonnef_Test2 () { UnitConverter target = new UnitConverter (); @@ -168,9 +140,9 @@ public void UnitConverter_ConvertUnits_N_to_tonnef_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_N_to_Meganewton_Test () { UnitConverter target = new UnitConverter (); @@ -183,9 +155,9 @@ public void UnitConverter_ConvertUnits_N_to_Meganewton_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_N_to_Meganewton_Test2 () { UnitConverter target = new UnitConverter (); @@ -198,9 +170,9 @@ public void UnitConverter_ConvertUnits_N_to_Meganewton_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_N_to_GN_Test () { UnitConverter target = new UnitConverter (); @@ -213,9 +185,9 @@ public void UnitConverter_ConvertUnits_N_to_GN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_N_to_GN_Test2 () { UnitConverter target = new UnitConverter (); @@ -229,9 +201,9 @@ public void UnitConverter_ConvertUnits_N_to_GN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_N_to_kN_Test () { UnitConverter target = new UnitConverter (); @@ -244,9 +216,9 @@ public void UnitConverter_ConvertUnits_N_to_kN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_N_to_kN_Test2 () { UnitConverter target = new UnitConverter (); @@ -259,9 +231,9 @@ public void UnitConverter_ConvertUnits_N_to_kN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_N_to_mN_Test () { UnitConverter target = new UnitConverter (); @@ -274,9 +246,9 @@ public void UnitConverter_ConvertUnits_N_to_mN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_N_to_mN_Test2 () { UnitConverter target = new UnitConverter (); @@ -289,9 +261,9 @@ public void UnitConverter_ConvertUnits_N_to_mN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_N_to_µN_Test () { UnitConverter target = new UnitConverter (); @@ -304,9 +276,9 @@ public void UnitConverter_ConvertUnits_N_to_µN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_N_to_µN_Test2 () { UnitConverter target = new UnitConverter (); @@ -319,9 +291,9 @@ public void UnitConverter_ConvertUnits_N_to_µN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_N_to_nN_Test () { UnitConverter target = new UnitConverter (); @@ -334,9 +306,9 @@ public void UnitConverter_ConvertUnits_N_to_nN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_N_to_nN_Test2 () { UnitConverter target = new UnitConverter (); @@ -352,9 +324,9 @@ public void UnitConverter_ConvertUnits_N_to_nN_Test2 () #region "Source as Dyne (dyn)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_dyn_to_N_Test () { UnitConverter target = new UnitConverter (); @@ -367,9 +339,9 @@ public void UnitConverter_ConvertUnits_dyn_to_N_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_dyn_to_N_Test2 () { UnitConverter target = new UnitConverter (); @@ -382,9 +354,9 @@ public void UnitConverter_ConvertUnits_dyn_to_N_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_dyn_to_lbf_Test () { UnitConverter target = new UnitConverter (); @@ -397,9 +369,9 @@ public void UnitConverter_ConvertUnits_dyn_to_lbf_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_dyn_to_lbf_Test2 () { UnitConverter target = new UnitConverter (); @@ -412,9 +384,9 @@ public void UnitConverter_ConvertUnits_dyn_to_lbf_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_dyn_to_tonf_Test () { UnitConverter target = new UnitConverter (); @@ -427,9 +399,9 @@ public void UnitConverter_ConvertUnits_dyn_to_tonf_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_dyn_to_tonf_Test2 () { UnitConverter target = new UnitConverter (); @@ -442,9 +414,9 @@ public void UnitConverter_ConvertUnits_dyn_to_tonf_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_dyn_to_ng_Test () { UnitConverter target = new UnitConverter (); @@ -457,9 +429,9 @@ public void UnitConverter_ConvertUnits_dyn_to_ng_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_dyn_to_tonnef_Test2 () { UnitConverter target = new UnitConverter (); @@ -472,9 +444,9 @@ public void UnitConverter_ConvertUnits_dyn_to_tonnef_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_dyn_to_Meganewton_Test () { UnitConverter target = new UnitConverter (); @@ -487,9 +459,9 @@ public void UnitConverter_ConvertUnits_dyn_to_Meganewton_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_dyn_to_Meganewton_Test2 () { UnitConverter target = new UnitConverter (); @@ -503,9 +475,9 @@ public void UnitConverter_ConvertUnits_dyn_to_Meganewton_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_dyn_to_GN_Test () { UnitConverter target = new UnitConverter (); @@ -518,9 +490,9 @@ public void UnitConverter_ConvertUnits_dyn_to_GN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_dyn_to_GN_Test2 () { UnitConverter target = new UnitConverter (); @@ -534,9 +506,9 @@ public void UnitConverter_ConvertUnits_dyn_to_GN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_dyn_to_kN_Test () { UnitConverter target = new UnitConverter (); @@ -549,9 +521,9 @@ public void UnitConverter_ConvertUnits_dyn_to_kN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_dyn_to_kN_Test2 () { UnitConverter target = new UnitConverter (); @@ -564,9 +536,9 @@ public void UnitConverter_ConvertUnits_dyn_to_kN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_dyn_to_mN_Test () { UnitConverter target = new UnitConverter (); @@ -579,9 +551,9 @@ public void UnitConverter_ConvertUnits_dyn_to_mN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_dyn_to_mN_Test2 () { UnitConverter target = new UnitConverter (); @@ -594,9 +566,9 @@ public void UnitConverter_ConvertUnits_dyn_to_mN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_dyn_to_µN_Test () { UnitConverter target = new UnitConverter (); @@ -609,9 +581,9 @@ public void UnitConverter_ConvertUnits_dyn_to_µN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_dyn_to_µN_Test2 () { UnitConverter target = new UnitConverter (); @@ -624,9 +596,9 @@ public void UnitConverter_ConvertUnits_dyn_to_µN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_dyn_to_nN_Test () { UnitConverter target = new UnitConverter (); @@ -639,9 +611,9 @@ public void UnitConverter_ConvertUnits_dyn_to_nN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_dyn_to_nN_Test2 () { UnitConverter target = new UnitConverter (); @@ -657,9 +629,9 @@ public void UnitConverter_ConvertUnits_dyn_to_nN_Test2 () #region "Source as Pound-force (lbf)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbf_to_N_Test () { UnitConverter target = new UnitConverter (); @@ -672,9 +644,9 @@ public void UnitConverter_ConvertUnits_lbf_to_N_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbf_to_N_Test2 () { UnitConverter target = new UnitConverter (); @@ -687,9 +659,9 @@ public void UnitConverter_ConvertUnits_lbf_to_N_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbf_to_dyn_Test () { UnitConverter target = new UnitConverter (); @@ -702,9 +674,9 @@ public void UnitConverter_ConvertUnits_lbf_to_dyn_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbf_to_dyn_Test2 () { UnitConverter target = new UnitConverter (); @@ -717,9 +689,9 @@ public void UnitConverter_ConvertUnits_lbf_to_dyn_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbf_to_tonf_Test () { UnitConverter target = new UnitConverter (); @@ -732,9 +704,9 @@ public void UnitConverter_ConvertUnits_lbf_to_tonf_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbf_to_tonf_Test2 () { UnitConverter target = new UnitConverter (); @@ -747,9 +719,9 @@ public void UnitConverter_ConvertUnits_lbf_to_tonf_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbf_to_tonnef_Test () { UnitConverter target = new UnitConverter (); @@ -762,9 +734,9 @@ public void UnitConverter_ConvertUnits_lbf_to_tonnef_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbf_to_tonnef_Test2 () { UnitConverter target = new UnitConverter (); @@ -777,9 +749,9 @@ public void UnitConverter_ConvertUnits_lbf_to_tonnef_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbf_to_Meganewton_Test () { UnitConverter target = new UnitConverter (); @@ -792,9 +764,9 @@ public void UnitConverter_ConvertUnits_lbf_to_Meganewton_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbf_to_Meganewton_Test2 () { UnitConverter target = new UnitConverter (); @@ -807,9 +779,9 @@ public void UnitConverter_ConvertUnits_lbf_to_Meganewton_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbf_to_GN_Test () { UnitConverter target = new UnitConverter (); @@ -822,9 +794,9 @@ public void UnitConverter_ConvertUnits_lbf_to_GN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbf_to_GN_Test2 () { UnitConverter target = new UnitConverter (); @@ -837,9 +809,9 @@ public void UnitConverter_ConvertUnits_lbf_to_GN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbf_to_kN_Test () { UnitConverter target = new UnitConverter (); @@ -852,9 +824,9 @@ public void UnitConverter_ConvertUnits_lbf_to_kN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbf_to_kN_Test2 () { UnitConverter target = new UnitConverter (); @@ -867,9 +839,9 @@ public void UnitConverter_ConvertUnits_lbf_to_kN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbf_to_mN_Test () { UnitConverter target = new UnitConverter (); @@ -882,9 +854,9 @@ public void UnitConverter_ConvertUnits_lbf_to_mN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbf_to_mN_Test2 () { UnitConverter target = new UnitConverter (); @@ -897,9 +869,9 @@ public void UnitConverter_ConvertUnits_lbf_to_mN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbf_to_µN_Test () { UnitConverter target = new UnitConverter (); @@ -912,9 +884,9 @@ public void UnitConverter_ConvertUnits_lbf_to_µN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbf_to_µN_Test2 () { UnitConverter target = new UnitConverter (); @@ -927,9 +899,9 @@ public void UnitConverter_ConvertUnits_lbf_to_µN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbf_to_nN_Test () { UnitConverter target = new UnitConverter (); @@ -942,9 +914,9 @@ public void UnitConverter_ConvertUnits_lbf_to_nN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbf_to_nN_Test2 () { UnitConverter target = new UnitConverter (); @@ -960,9 +932,9 @@ public void UnitConverter_ConvertUnits_lbf_to_nN_Test2 () #region "Source as Ton-force(short) (tonf)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonf_to_N_Test () { UnitConverter target = new UnitConverter (); @@ -975,9 +947,9 @@ public void UnitConverter_ConvertUnits_tonf_to_N_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonf_to_N_Test2 () { UnitConverter target = new UnitConverter (); @@ -990,9 +962,9 @@ public void UnitConverter_ConvertUnits_tonf_to_N_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonf_to_dyn_Test () { UnitConverter target = new UnitConverter (); @@ -1005,9 +977,9 @@ public void UnitConverter_ConvertUnits_tonf_to_dyn_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonf_to_dyn_Test2 () { UnitConverter target = new UnitConverter (); @@ -1020,9 +992,9 @@ public void UnitConverter_ConvertUnits_tonf_to_dyn_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonf_to_lbf_Test () { UnitConverter target = new UnitConverter (); @@ -1035,9 +1007,9 @@ public void UnitConverter_ConvertUnits_tonf_to_lbf_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonf_to_lbf_Test2 () { UnitConverter target = new UnitConverter (); @@ -1050,9 +1022,9 @@ public void UnitConverter_ConvertUnits_tonf_to_lbf_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonf_to_tonnef_Test () { UnitConverter target = new UnitConverter (); @@ -1065,9 +1037,9 @@ public void UnitConverter_ConvertUnits_tonf_to_tonnef_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonf_to_tonnef_Test2 () { UnitConverter target = new UnitConverter (); @@ -1080,9 +1052,9 @@ public void UnitConverter_ConvertUnits_tonf_to_tonnef_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonf_to_Meganewton_Test () { UnitConverter target = new UnitConverter (); @@ -1095,9 +1067,9 @@ public void UnitConverter_ConvertUnits_tonf_to_Meganewton_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonf_to_Meganewton_Test2 () { UnitConverter target = new UnitConverter (); @@ -1110,9 +1082,9 @@ public void UnitConverter_ConvertUnits_tonf_to_Meganewton_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonf_to_GN_Test () { UnitConverter target = new UnitConverter (); @@ -1125,9 +1097,9 @@ public void UnitConverter_ConvertUnits_tonf_to_GN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonf_to_GN_Test2 () { UnitConverter target = new UnitConverter (); @@ -1140,9 +1112,9 @@ public void UnitConverter_ConvertUnits_tonf_to_GN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonf_to_kN_Test () { UnitConverter target = new UnitConverter (); @@ -1155,9 +1127,9 @@ public void UnitConverter_ConvertUnits_tonf_to_kN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonf_to_kN_Test2 () { UnitConverter target = new UnitConverter (); @@ -1170,9 +1142,9 @@ public void UnitConverter_ConvertUnits_tonf_to_kN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonf_to_mN_Test () { UnitConverter target = new UnitConverter (); @@ -1185,9 +1157,9 @@ public void UnitConverter_ConvertUnits_tonf_to_mN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonf_to_mN_Test2 () { UnitConverter target = new UnitConverter (); @@ -1200,9 +1172,9 @@ public void UnitConverter_ConvertUnits_tonf_to_mN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonf_to_µN_Test () { UnitConverter target = new UnitConverter (); @@ -1215,9 +1187,9 @@ public void UnitConverter_ConvertUnits_tonf_to_µN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonf_to_µN_Test2 () { UnitConverter target = new UnitConverter (); @@ -1230,9 +1202,9 @@ public void UnitConverter_ConvertUnits_tonf_to_µN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonf_to_nN_Test () { UnitConverter target = new UnitConverter (); @@ -1245,9 +1217,9 @@ public void UnitConverter_ConvertUnits_tonf_to_nN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonf_to_nN_Test2 () { UnitConverter target = new UnitConverter (); @@ -1263,9 +1235,9 @@ public void UnitConverter_ConvertUnits_tonf_to_nN_Test2 () #region "Source as Tonnes force(metric) (tonnef,tf)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonnef_to_N_Test () { UnitConverter target = new UnitConverter (); @@ -1278,9 +1250,9 @@ public void UnitConverter_ConvertUnits_tonnef_to_N_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonnef_to_N_Test2 () { UnitConverter target = new UnitConverter (); @@ -1293,9 +1265,9 @@ public void UnitConverter_ConvertUnits_tonnef_to_N_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonnef_to_dyn_Test () { UnitConverter target = new UnitConverter (); @@ -1308,9 +1280,9 @@ public void UnitConverter_ConvertUnits_tonnef_to_dyn_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonnef_to_dyn_Test2 () { UnitConverter target = new UnitConverter (); @@ -1323,9 +1295,9 @@ public void UnitConverter_ConvertUnits_tonnef_to_dyn_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonnef_to_lbf_Test () { UnitConverter target = new UnitConverter (); @@ -1338,9 +1310,9 @@ public void UnitConverter_ConvertUnits_tonnef_to_lbf_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonnef_to_lbf_Test2 () { UnitConverter target = new UnitConverter (); @@ -1353,9 +1325,9 @@ public void UnitConverter_ConvertUnits_tonnef_to_lbf_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonnef_to_tonf_Test () { UnitConverter target = new UnitConverter (); @@ -1368,9 +1340,9 @@ public void UnitConverter_ConvertUnits_tonnef_to_tonf_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonnef_to_tonf_Test2 () { UnitConverter target = new UnitConverter (); @@ -1383,9 +1355,9 @@ public void UnitConverter_ConvertUnits_tonnef_to_tonf_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonnef_to_Meganewton_Test () { UnitConverter target = new UnitConverter (); @@ -1398,9 +1370,9 @@ public void UnitConverter_ConvertUnits_tonnef_to_Meganewton_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonnef_to_Meganewton_Test2 () { UnitConverter target = new UnitConverter (); @@ -1413,9 +1385,9 @@ public void UnitConverter_ConvertUnits_tonnef_to_Meganewton_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonnef_to_GN_Test () { UnitConverter target = new UnitConverter (); @@ -1428,9 +1400,9 @@ public void UnitConverter_ConvertUnits_tonnef_to_GN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonnef_to_GN_Test2 () { UnitConverter target = new UnitConverter (); @@ -1443,9 +1415,9 @@ public void UnitConverter_ConvertUnits_tonnef_to_GN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonnef_to_kN_Test () { UnitConverter target = new UnitConverter (); @@ -1458,9 +1430,9 @@ public void UnitConverter_ConvertUnits_tonnef_to_kN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonnef_to_kN_Test2 () { UnitConverter target = new UnitConverter (); @@ -1473,9 +1445,9 @@ public void UnitConverter_ConvertUnits_tonnef_to_kN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonnef_to_mN_Test () { UnitConverter target = new UnitConverter (); @@ -1488,9 +1460,9 @@ public void UnitConverter_ConvertUnits_tonnef_to_mN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonnef_to_mN_Test2 () { UnitConverter target = new UnitConverter (); @@ -1503,9 +1475,9 @@ public void UnitConverter_ConvertUnits_tonnef_to_mN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonnef_to_µN_Test () { UnitConverter target = new UnitConverter (); @@ -1518,9 +1490,9 @@ public void UnitConverter_ConvertUnits_tonnef_to_µN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonnef_to_µN_Test2 () { UnitConverter target = new UnitConverter (); @@ -1533,9 +1505,9 @@ public void UnitConverter_ConvertUnits_tonnef_to_µN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonnef_to_nN_Test () { UnitConverter target = new UnitConverter (); @@ -1549,9 +1521,9 @@ public void UnitConverter_ConvertUnits_tonnef_to_nN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_tonnef_to_nN_Test2 () { UnitConverter target = new UnitConverter (); @@ -1568,9 +1540,9 @@ public void UnitConverter_ConvertUnits_tonnef_to_nN_Test2 () #region "Source as Meganewton (MN)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Meganewton_to_N_Test () { UnitConverter target = new UnitConverter (); @@ -1583,9 +1555,9 @@ public void UnitConverter_ConvertUnits_Meganewton_to_N_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Meganewton_to_N_Test2 () { UnitConverter target = new UnitConverter (); @@ -1598,9 +1570,9 @@ public void UnitConverter_ConvertUnits_Meganewton_to_N_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Meganewton_to_dyn_Test () { UnitConverter target = new UnitConverter (); @@ -1613,9 +1585,9 @@ public void UnitConverter_ConvertUnits_Meganewton_to_dyn_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Meganewton_to_dyn_Test2 () { UnitConverter target = new UnitConverter (); @@ -1628,9 +1600,9 @@ public void UnitConverter_ConvertUnits_Meganewton_to_dyn_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Meganewton_to_lbf_Test () { UnitConverter target = new UnitConverter (); @@ -1643,9 +1615,9 @@ public void UnitConverter_ConvertUnits_Meganewton_to_lbf_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Meganewton_to_lbf_Test2 () { UnitConverter target = new UnitConverter (); @@ -1658,9 +1630,9 @@ public void UnitConverter_ConvertUnits_Meganewton_to_lbf_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Meganewton_to_tonf_Test () { UnitConverter target = new UnitConverter (); @@ -1673,9 +1645,9 @@ public void UnitConverter_ConvertUnits_Meganewton_to_tonf_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Meganewton_to_tonf_Test2 () { UnitConverter target = new UnitConverter (); @@ -1688,9 +1660,9 @@ public void UnitConverter_ConvertUnits_Meganewton_to_tonf_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Meganewton_to_tonnef_Test () { UnitConverter target = new UnitConverter (); @@ -1703,9 +1675,9 @@ public void UnitConverter_ConvertUnits_Meganewton_to_tonnef_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Meganewton_to_tonnef_Test2 () { UnitConverter target = new UnitConverter (); @@ -1718,9 +1690,9 @@ public void UnitConverter_ConvertUnits_Meganewton_to_tonnef_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Meganewton_to_GN_Test () { UnitConverter target = new UnitConverter (); @@ -1733,9 +1705,9 @@ public void UnitConverter_ConvertUnits_Meganewton_to_GN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Meganewton_to_GN_Test2 () { UnitConverter target = new UnitConverter (); @@ -1748,9 +1720,9 @@ public void UnitConverter_ConvertUnits_Meganewton_to_GN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Meganewton_to_kN_Test () { UnitConverter target = new UnitConverter (); @@ -1763,9 +1735,9 @@ public void UnitConverter_ConvertUnits_Meganewton_to_kN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Meganewton_to_kN_Test2 () { UnitConverter target = new UnitConverter (); @@ -1778,9 +1750,9 @@ public void UnitConverter_ConvertUnits_Meganewton_to_kN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Meganewton_to_mN_Test () { UnitConverter target = new UnitConverter (); @@ -1793,9 +1765,9 @@ public void UnitConverter_ConvertUnits_Meganewton_to_mN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Meganewton_to_mN_Test2 () { UnitConverter target = new UnitConverter (); @@ -1808,9 +1780,9 @@ public void UnitConverter_ConvertUnits_Meganewton_to_mN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Meganewton_to_µN_Test () { UnitConverter target = new UnitConverter (); @@ -1823,9 +1795,9 @@ public void UnitConverter_ConvertUnits_Meganewton_to_µN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Meganewton_to_µN_Test2 () { UnitConverter target = new UnitConverter (); @@ -1838,9 +1810,9 @@ public void UnitConverter_ConvertUnits_Meganewton_to_µN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Meganewton_to_nN_Test () { UnitConverter target = new UnitConverter (); @@ -1853,9 +1825,9 @@ public void UnitConverter_ConvertUnits_Meganewton_to_nN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Meganewton_to_nN_Test2 () { UnitConverter target = new UnitConverter (); @@ -1872,9 +1844,9 @@ public void UnitConverter_ConvertUnits_Meganewton_to_nN_Test2 () #region "Source as Giganewton (GN)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GN_to_N_Test () { UnitConverter target = new UnitConverter (); @@ -1887,9 +1859,9 @@ public void UnitConverter_ConvertUnits_GN_to_N_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GN_to_N_Test2 () { UnitConverter target = new UnitConverter (); @@ -1902,9 +1874,9 @@ public void UnitConverter_ConvertUnits_GN_to_N_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GN_to_dyn_Test () { UnitConverter target = new UnitConverter (); @@ -1917,9 +1889,9 @@ public void UnitConverter_ConvertUnits_GN_to_dyn_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GN_to_dyn_Test2 () { UnitConverter target = new UnitConverter (); @@ -1932,9 +1904,9 @@ public void UnitConverter_ConvertUnits_GN_to_dyn_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GN_to_lbf_Test () { UnitConverter target = new UnitConverter (); @@ -1947,9 +1919,9 @@ public void UnitConverter_ConvertUnits_GN_to_lbf_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GN_to_lbf_Test2 () { UnitConverter target = new UnitConverter (); @@ -1962,9 +1934,9 @@ public void UnitConverter_ConvertUnits_GN_to_lbf_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GN_to_tonf_Test () { UnitConverter target = new UnitConverter (); @@ -1977,9 +1949,9 @@ public void UnitConverter_ConvertUnits_GN_to_tonf_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GN_to_tonf_Test2 () { UnitConverter target = new UnitConverter (); @@ -1992,9 +1964,9 @@ public void UnitConverter_ConvertUnits_GN_to_tonf_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GN_to_ng_Test () { UnitConverter target = new UnitConverter (); @@ -2007,9 +1979,9 @@ public void UnitConverter_ConvertUnits_GN_to_ng_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GN_to_tonnef_Test2 () { UnitConverter target = new UnitConverter (); @@ -2022,9 +1994,9 @@ public void UnitConverter_ConvertUnits_GN_to_tonnef_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GN_to_Meganewton_Test () { UnitConverter target = new UnitConverter (); @@ -2037,9 +2009,9 @@ public void UnitConverter_ConvertUnits_GN_to_Meganewton_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GN_to_Meganewton_Test2 () { UnitConverter target = new UnitConverter (); @@ -2052,9 +2024,9 @@ public void UnitConverter_ConvertUnits_GN_to_Meganewton_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GN_to_kN_Test () { UnitConverter target = new UnitConverter (); @@ -2067,9 +2039,9 @@ public void UnitConverter_ConvertUnits_GN_to_kN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GN_to_kN_Test2 () { UnitConverter target = new UnitConverter (); @@ -2082,9 +2054,9 @@ public void UnitConverter_ConvertUnits_GN_to_kN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GN_to_mN_Test () { UnitConverter target = new UnitConverter (); @@ -2097,9 +2069,9 @@ public void UnitConverter_ConvertUnits_GN_to_mN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GN_to_mN_Test2 () { UnitConverter target = new UnitConverter (); @@ -2112,9 +2084,9 @@ public void UnitConverter_ConvertUnits_GN_to_mN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GN_to_µN_Test () { UnitConverter target = new UnitConverter (); @@ -2127,9 +2099,9 @@ public void UnitConverter_ConvertUnits_GN_to_µN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GN_to_µN_Test2 () { UnitConverter target = new UnitConverter (); @@ -2142,9 +2114,9 @@ public void UnitConverter_ConvertUnits_GN_to_µN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GN_to_nN_Test () { UnitConverter target = new UnitConverter (); @@ -2157,9 +2129,9 @@ public void UnitConverter_ConvertUnits_GN_to_nN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GN_to_nN_Test2 () { UnitConverter target = new UnitConverter (); @@ -2176,9 +2148,9 @@ public void UnitConverter_ConvertUnits_GN_to_nN_Test2 () #region "Source as Kilonewton (kN)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kN_to_N_Test () { UnitConverter target = new UnitConverter (); @@ -2191,9 +2163,9 @@ public void UnitConverter_ConvertUnits_kN_to_N_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kN_to_N_Test2 () { UnitConverter target = new UnitConverter (); @@ -2206,9 +2178,9 @@ public void UnitConverter_ConvertUnits_kN_to_N_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kN_to_dyn_Test () { UnitConverter target = new UnitConverter (); @@ -2221,9 +2193,9 @@ public void UnitConverter_ConvertUnits_kN_to_dyn_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kN_to_dyn_Test2 () { UnitConverter target = new UnitConverter (); @@ -2236,9 +2208,9 @@ public void UnitConverter_ConvertUnits_kN_to_dyn_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kN_to_lbf_Test () { UnitConverter target = new UnitConverter (); @@ -2251,9 +2223,9 @@ public void UnitConverter_ConvertUnits_kN_to_lbf_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kN_to_lbf_Test2 () { UnitConverter target = new UnitConverter (); @@ -2266,9 +2238,9 @@ public void UnitConverter_ConvertUnits_kN_to_lbf_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kN_to_tonf_Test () { UnitConverter target = new UnitConverter (); @@ -2281,9 +2253,9 @@ public void UnitConverter_ConvertUnits_kN_to_tonf_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kN_to_tonf_Test2 () { UnitConverter target = new UnitConverter (); @@ -2296,9 +2268,9 @@ public void UnitConverter_ConvertUnits_kN_to_tonf_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kN_to_tonnef_Test () { UnitConverter target = new UnitConverter (); @@ -2311,9 +2283,9 @@ public void UnitConverter_ConvertUnits_kN_to_tonnef_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kN_to_tonnef_Test2 () { UnitConverter target = new UnitConverter (); @@ -2326,9 +2298,9 @@ public void UnitConverter_ConvertUnits_kN_to_tonnef_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kN_to_Meganewton_Test () { UnitConverter target = new UnitConverter (); @@ -2341,9 +2313,9 @@ public void UnitConverter_ConvertUnits_kN_to_Meganewton_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kN_to_Meganewton_Test2 () { UnitConverter target = new UnitConverter (); @@ -2356,9 +2328,9 @@ public void UnitConverter_ConvertUnits_kN_to_Meganewton_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kN_to_GN_Test () { UnitConverter target = new UnitConverter (); @@ -2371,9 +2343,9 @@ public void UnitConverter_ConvertUnits_kN_to_GN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kN_to_GN_Test2 () { UnitConverter target = new UnitConverter (); @@ -2386,9 +2358,9 @@ public void UnitConverter_ConvertUnits_kN_to_GN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kN_to_mN_Test () { UnitConverter target = new UnitConverter (); @@ -2401,9 +2373,9 @@ public void UnitConverter_ConvertUnits_kN_to_mN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kN_to_mN_Test2 () { UnitConverter target = new UnitConverter (); @@ -2416,9 +2388,9 @@ public void UnitConverter_ConvertUnits_kN_to_mN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kN_to_µN_Test () { UnitConverter target = new UnitConverter (); @@ -2431,9 +2403,9 @@ public void UnitConverter_ConvertUnits_kN_to_µN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kN_to_µN_Test2 () { UnitConverter target = new UnitConverter (); @@ -2446,9 +2418,9 @@ public void UnitConverter_ConvertUnits_kN_to_µN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kN_to_nN_Test () { UnitConverter target = new UnitConverter (); @@ -2461,9 +2433,9 @@ public void UnitConverter_ConvertUnits_kN_to_nN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kN_to_nN_Test2 () { UnitConverter target = new UnitConverter (); @@ -2480,9 +2452,9 @@ public void UnitConverter_ConvertUnits_kN_to_nN_Test2 () #region "Source as Milinewton (mN)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mN_to_N_Test () { UnitConverter target = new UnitConverter (); @@ -2495,9 +2467,9 @@ public void UnitConverter_ConvertUnits_mN_to_N_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mN_to_N_Test2 () { UnitConverter target = new UnitConverter (); @@ -2510,9 +2482,9 @@ public void UnitConverter_ConvertUnits_mN_to_N_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mN_to_dyn_Test () { UnitConverter target = new UnitConverter (); @@ -2525,9 +2497,9 @@ public void UnitConverter_ConvertUnits_mN_to_dyn_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mN_to_dyn_Test2 () { UnitConverter target = new UnitConverter (); @@ -2540,9 +2512,9 @@ public void UnitConverter_ConvertUnits_mN_to_dyn_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mN_to_lbf_Test () { UnitConverter target = new UnitConverter (); @@ -2555,9 +2527,9 @@ public void UnitConverter_ConvertUnits_mN_to_lbf_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mN_to_lbf_Test2 () { UnitConverter target = new UnitConverter (); @@ -2570,9 +2542,9 @@ public void UnitConverter_ConvertUnits_mN_to_lbf_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mN_to_tonf_Test () { UnitConverter target = new UnitConverter (); @@ -2585,9 +2557,9 @@ public void UnitConverter_ConvertUnits_mN_to_tonf_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mN_to_tonf_Test2 () { UnitConverter target = new UnitConverter (); @@ -2600,9 +2572,9 @@ public void UnitConverter_ConvertUnits_mN_to_tonf_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mN_to_tonnef_Test () { UnitConverter target = new UnitConverter (); @@ -2615,9 +2587,9 @@ public void UnitConverter_ConvertUnits_mN_to_tonnef_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mN_to_tonnef_Test2 () { UnitConverter target = new UnitConverter (); @@ -2630,9 +2602,9 @@ public void UnitConverter_ConvertUnits_mN_to_tonnef_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mN_to_Meganewton_Test () { UnitConverter target = new UnitConverter (); @@ -2645,9 +2617,9 @@ public void UnitConverter_ConvertUnits_mN_to_Meganewton_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mN_to_Meganewton_Test2 () { UnitConverter target = new UnitConverter (); @@ -2661,9 +2633,9 @@ public void UnitConverter_ConvertUnits_mN_to_Meganewton_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mN_to_GN_Test () { UnitConverter target = new UnitConverter (); @@ -2676,9 +2648,9 @@ public void UnitConverter_ConvertUnits_mN_to_GN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mN_to_GN_Test2 () { UnitConverter target = new UnitConverter (); @@ -2692,9 +2664,9 @@ public void UnitConverter_ConvertUnits_mN_to_GN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mN_to_kN_Test () { UnitConverter target = new UnitConverter (); @@ -2707,9 +2679,9 @@ public void UnitConverter_ConvertUnits_mN_to_kN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mN_to_kN_Test2 () { UnitConverter target = new UnitConverter (); @@ -2722,9 +2694,9 @@ public void UnitConverter_ConvertUnits_mN_to_kN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mN_to_µN_Test () { UnitConverter target = new UnitConverter (); @@ -2737,9 +2709,9 @@ public void UnitConverter_ConvertUnits_mN_to_µN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mN_to_µN_Test2 () { UnitConverter target = new UnitConverter (); @@ -2752,9 +2724,9 @@ public void UnitConverter_ConvertUnits_mN_to_µN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mN_to_nN_Test () { UnitConverter target = new UnitConverter (); @@ -2767,9 +2739,9 @@ public void UnitConverter_ConvertUnits_mN_to_nN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mN_to_nN_Test2 () { UnitConverter target = new UnitConverter (); @@ -2785,9 +2757,9 @@ public void UnitConverter_ConvertUnits_mN_to_nN_Test2 () #region "Source as Micronewton (µN)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µN_to_N_Test () { UnitConverter target = new UnitConverter (); @@ -2800,9 +2772,9 @@ public void UnitConverter_ConvertUnits_µN_to_N_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µN_to_N_Test2 () { UnitConverter target = new UnitConverter (); @@ -2815,9 +2787,9 @@ public void UnitConverter_ConvertUnits_µN_to_N_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µN_to_dyn_Test () { UnitConverter target = new UnitConverter (); @@ -2830,9 +2802,9 @@ public void UnitConverter_ConvertUnits_µN_to_dyn_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µN_to_dyn_Test2 () { UnitConverter target = new UnitConverter (); @@ -2845,9 +2817,9 @@ public void UnitConverter_ConvertUnits_µN_to_dyn_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µN_to_lbf_Test () { UnitConverter target = new UnitConverter (); @@ -2860,9 +2832,9 @@ public void UnitConverter_ConvertUnits_µN_to_lbf_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µN_to_lbf_Test2 () { UnitConverter target = new UnitConverter (); @@ -2875,9 +2847,9 @@ public void UnitConverter_ConvertUnits_µN_to_lbf_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µN_to_tonf_Test () { UnitConverter target = new UnitConverter (); @@ -2890,9 +2862,9 @@ public void UnitConverter_ConvertUnits_µN_to_tonf_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µN_to_tonf_Test2 () { UnitConverter target = new UnitConverter (); @@ -2905,9 +2877,9 @@ public void UnitConverter_ConvertUnits_µN_to_tonf_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µN_to_tonnef_Test () { UnitConverter target = new UnitConverter (); @@ -2920,9 +2892,9 @@ public void UnitConverter_ConvertUnits_µN_to_tonnef_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µN_to_tonnef_Test2 () { UnitConverter target = new UnitConverter (); @@ -2935,9 +2907,9 @@ public void UnitConverter_ConvertUnits_µN_to_tonnef_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µN_to_Meganewton_Test () { UnitConverter target = new UnitConverter (); @@ -2950,9 +2922,9 @@ public void UnitConverter_ConvertUnits_µN_to_Meganewton_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µN_to_Meganewton_Test2 () { UnitConverter target = new UnitConverter (); @@ -2966,9 +2938,9 @@ public void UnitConverter_ConvertUnits_µN_to_Meganewton_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µN_to_GN_Test () { UnitConverter target = new UnitConverter (); @@ -2981,9 +2953,9 @@ public void UnitConverter_ConvertUnits_µN_to_GN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µN_to_GN_Test2 () { UnitConverter target = new UnitConverter (); @@ -2997,9 +2969,9 @@ public void UnitConverter_ConvertUnits_µN_to_GN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µN_to_kN_Test () { UnitConverter target = new UnitConverter (); @@ -3012,9 +2984,9 @@ public void UnitConverter_ConvertUnits_µN_to_kN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µN_to_kN_Test2 () { UnitConverter target = new UnitConverter (); @@ -3028,9 +3000,9 @@ public void UnitConverter_ConvertUnits_µN_to_kN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µN_to_mN_Test () { UnitConverter target = new UnitConverter (); @@ -3043,9 +3015,9 @@ public void UnitConverter_ConvertUnits_µN_to_mN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µN_to_mN_Test2 () { UnitConverter target = new UnitConverter (); @@ -3058,9 +3030,9 @@ public void UnitConverter_ConvertUnits_µN_to_mN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µN_to_nN_Test () { UnitConverter target = new UnitConverter (); @@ -3073,9 +3045,9 @@ public void UnitConverter_ConvertUnits_µN_to_nN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µN_to_nN_Test2 () { UnitConverter target = new UnitConverter (); @@ -3092,9 +3064,9 @@ public void UnitConverter_ConvertUnits_µN_to_nN_Test2 () #region "Source as Nananewton (nN)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nN_to_N_Test () { UnitConverter target = new UnitConverter (); @@ -3107,9 +3079,9 @@ public void UnitConverter_ConvertUnits_nN_to_N_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nN_to_N_Test2 () { UnitConverter target = new UnitConverter (); @@ -3123,9 +3095,9 @@ public void UnitConverter_ConvertUnits_nN_to_N_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nN_to_dyn_Test () { UnitConverter target = new UnitConverter (); @@ -3138,9 +3110,9 @@ public void UnitConverter_ConvertUnits_nN_to_dyn_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nN_to_dyn_Test2 () { UnitConverter target = new UnitConverter (); @@ -3153,9 +3125,9 @@ public void UnitConverter_ConvertUnits_nN_to_dyn_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nN_to_lbf_Test () { UnitConverter target = new UnitConverter (); @@ -3168,9 +3140,9 @@ public void UnitConverter_ConvertUnits_nN_to_lbf_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nN_to_lbf_Test2 () { UnitConverter target = new UnitConverter (); @@ -3183,9 +3155,9 @@ public void UnitConverter_ConvertUnits_nN_to_lbf_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nN_to_tonf_Test () { UnitConverter target = new UnitConverter (); @@ -3198,9 +3170,9 @@ public void UnitConverter_ConvertUnits_nN_to_tonf_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nN_to_tonf_Test2 () { UnitConverter target = new UnitConverter (); @@ -3213,9 +3185,9 @@ public void UnitConverter_ConvertUnits_nN_to_tonf_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nN_to_tonnef_Test () { UnitConverter target = new UnitConverter (); @@ -3228,9 +3200,9 @@ public void UnitConverter_ConvertUnits_nN_to_tonnef_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nN_to_tonnef_Test2 () { UnitConverter target = new UnitConverter (); @@ -3243,9 +3215,9 @@ public void UnitConverter_ConvertUnits_nN_to_tonnef_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nN_to_Meganewton_Test () { UnitConverter target = new UnitConverter (); @@ -3258,9 +3230,9 @@ public void UnitConverter_ConvertUnits_nN_to_Meganewton_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nN_to_Meganewton_Test2 () { UnitConverter target = new UnitConverter (); @@ -3274,9 +3246,9 @@ public void UnitConverter_ConvertUnits_nN_to_Meganewton_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nN_to_GN_Test () { UnitConverter target = new UnitConverter (); @@ -3290,9 +3262,9 @@ public void UnitConverter_ConvertUnits_nN_to_GN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nN_to_GN_Test2 () { UnitConverter target = new UnitConverter (); @@ -3306,9 +3278,9 @@ public void UnitConverter_ConvertUnits_nN_to_GN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nN_to_kN_Test () { UnitConverter target = new UnitConverter (); @@ -3321,9 +3293,9 @@ public void UnitConverter_ConvertUnits_nN_to_kN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nN_to_kN_Test2 () { UnitConverter target = new UnitConverter (); @@ -3337,9 +3309,9 @@ public void UnitConverter_ConvertUnits_nN_to_kN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nN_to_mN_Test () { UnitConverter target = new UnitConverter (); @@ -3352,9 +3324,9 @@ public void UnitConverter_ConvertUnits_nN_to_mN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nN_to_mN_Test2 () { UnitConverter target = new UnitConverter (); @@ -3367,9 +3339,9 @@ public void UnitConverter_ConvertUnits_nN_to_mN_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nN_to_µN_Test () { UnitConverter target = new UnitConverter (); @@ -3382,9 +3354,9 @@ public void UnitConverter_ConvertUnits_nN_to_µN_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nN_to_µN_Test2 () { UnitConverter target = new UnitConverter (); @@ -3402,9 +3374,9 @@ public void UnitConverter_ConvertUnits_nN_to_µN_Test2 () #region "Momentum Tests" #region "Source as kg m/s" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kgMetersPerSec_to_lbFtPerHr_Test () { UnitConverter target = new UnitConverter (); @@ -3417,9 +3389,9 @@ public void UnitConverter_ConvertUnits_kgMetersPerSec_to_lbFtPerHr_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kgMetersPerSec_to_lbFtPerHr_Test2 () { UnitConverter target = new UnitConverter (); @@ -3432,9 +3404,9 @@ public void UnitConverter_ConvertUnits_kgMetersPerSec_to_lbFtPerHr_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kgMeterPerSec_to_GramCentimeterPerSec_Test () { UnitConverter target = new UnitConverter (); @@ -3447,9 +3419,9 @@ public void UnitConverter_ConvertUnits_kgMeterPerSec_to_GramCentimeterPerSec_Tes Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kgMeterPerSec_to_GramCentimeterPerSec_Test2 () { UnitConverter target = new UnitConverter (); @@ -3462,9 +3434,9 @@ public void UnitConverter_ConvertUnits_kgMeterPerSec_to_GramCentimeterPerSec_Tes Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kgMeterPerSec_to_lbFtPerMin_Test () { UnitConverter target = new UnitConverter (); @@ -3477,9 +3449,9 @@ public void UnitConverter_ConvertUnits_kgMeterPerSec_to_lbFtPerMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kgMeterPerSec_to_lbFtPerMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -3492,9 +3464,9 @@ public void UnitConverter_ConvertUnits_kgMeterPerSec_to_lbFtPerMin_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kgMeterPerSec_to_lbFtPerSec_Test () { UnitConverter target = new UnitConverter (); @@ -3507,9 +3479,9 @@ public void UnitConverter_ConvertUnits_kgMeterPerSec_to_lbFtPerSec_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kgMeterPerSec_to_lbFtPerSec_Test2 () { UnitConverter target = new UnitConverter (); @@ -3525,9 +3497,9 @@ public void UnitConverter_ConvertUnits_kgMeterPerSec_to_lbFtPerSec_Test2 () #region "Source as lb ft/hr" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerHr_to_kgMetersPerSec_Test () { UnitConverter target = new UnitConverter (); @@ -3540,9 +3512,9 @@ public void UnitConverter_ConvertUnits_lbFtPerHr_to_kgMetersPerSec_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerHr_to_kgMetersPerSec_Test2 () { UnitConverter target = new UnitConverter (); @@ -3555,9 +3527,9 @@ public void UnitConverter_ConvertUnits_lbFtPerHr_to_kgMetersPerSec_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerHr_to_GramCentimeterPerSec_Test () { UnitConverter target = new UnitConverter (); @@ -3570,9 +3542,9 @@ public void UnitConverter_ConvertUnits_lbFtPerHr_to_GramCentimeterPerSec_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerHr_to_GramCentimeterPerSec_Test2 () { UnitConverter target = new UnitConverter (); @@ -3585,9 +3557,9 @@ public void UnitConverter_ConvertUnits_lbFtPerHr_to_GramCentimeterPerSec_Test2 ( Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerHr_to_lbFtPerMin_Test () { UnitConverter target = new UnitConverter (); @@ -3600,9 +3572,9 @@ public void UnitConverter_ConvertUnits_lbFtPerHr_to_lbFtPerMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerHr_to_lbFtPerMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -3615,9 +3587,9 @@ public void UnitConverter_ConvertUnits_lbFtPerHr_to_lbFtPerMin_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerHr_to_lbFtPerSec_Test () { UnitConverter target = new UnitConverter (); @@ -3630,9 +3602,9 @@ public void UnitConverter_ConvertUnits_lbFtPerHr_to_lbFtPerSec_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerHr_to_lbFtPerSec_Test2 () { UnitConverter target = new UnitConverter (); @@ -3648,9 +3620,9 @@ public void UnitConverter_ConvertUnits_lbFtPerHr_to_lbFtPerSec_Test2 () #region "Source as g cm/s" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_kgMetersPerSec_Test () { UnitConverter target = new UnitConverter (); @@ -3663,9 +3635,9 @@ public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_kgMetersPerSec_Te Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_kgMetersPerSec_Test2 () { UnitConverter target = new UnitConverter (); @@ -3678,9 +3650,9 @@ public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_kgMetersPerSec_Te Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerHr_Test () { UnitConverter target = new UnitConverter (); @@ -3693,9 +3665,9 @@ public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerHr_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerHr_Test2 () { UnitConverter target = new UnitConverter (); @@ -3708,9 +3680,9 @@ public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerHr_Test2 ( Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerMin_Test () { UnitConverter target = new UnitConverter (); @@ -3723,9 +3695,9 @@ public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerMin_Test ( Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -3738,9 +3710,9 @@ public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerMin_Test2 Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerSec_Test () { UnitConverter target = new UnitConverter (); @@ -3753,9 +3725,9 @@ public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerSec_Test ( Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerSec_Test2 () { UnitConverter target = new UnitConverter (); @@ -3771,9 +3743,9 @@ public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerSec_Test2 #region "Source as lb ft/min" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerMin_to_kgMetersPerSec_Test () { UnitConverter target = new UnitConverter (); @@ -3786,9 +3758,9 @@ public void UnitConverter_ConvertUnits_lbFtPerMin_to_kgMetersPerSec_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerMin_to_kgMetersPerSec_Test2 () { UnitConverter target = new UnitConverter (); @@ -3801,9 +3773,9 @@ public void UnitConverter_ConvertUnits_lbFtPerMin_to_kgMetersPerSec_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerMin_to_lbFtPerHr_Test () { UnitConverter target = new UnitConverter (); @@ -3816,9 +3788,9 @@ public void UnitConverter_ConvertUnits_lbFtPerMin_to_lbFtPerHr_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerMin_to_lbFtPerHr_Test2 () { UnitConverter target = new UnitConverter (); @@ -3831,9 +3803,9 @@ public void UnitConverter_ConvertUnits_lbFtPerMin_to_lbFtPerHr_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerMin_to_GramCentimeterPerSec_Test () { UnitConverter target = new UnitConverter (); @@ -3846,9 +3818,9 @@ public void UnitConverter_ConvertUnits_lbFtPerMin_to_GramCentimeterPerSec_Test ( Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerMin_to_GramCentimeterPerSec_Test2 () { UnitConverter target = new UnitConverter (); @@ -3861,9 +3833,9 @@ public void UnitConverter_ConvertUnits_lbFtPerMin_to_GramCentimeterPerSec_Test2 Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerMin_to_lbFtPerSec_Test () { UnitConverter target = new UnitConverter (); @@ -3876,9 +3848,9 @@ public void UnitConverter_ConvertUnits_lbFtPerMin_to_lbFtPerSec_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerMin_to_lbFtPerSec_Test2 () { UnitConverter target = new UnitConverter (); @@ -3894,9 +3866,9 @@ public void UnitConverter_ConvertUnits_lbFtPerMin_to_lbFtPerSec_Test2 () #region "Source as lb ft/sec" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerSec_to_kgMetersPerSec_Test () { UnitConverter target = new UnitConverter (); @@ -3909,9 +3881,9 @@ public void UnitConverter_ConvertUnits_lbFtPerSec_to_kgMetersPerSec_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerSec_to_kgMetersPerSec_Test2 () { UnitConverter target = new UnitConverter (); @@ -3924,9 +3896,9 @@ public void UnitConverter_ConvertUnits_lbFtPerSec_to_kgMetersPerSec_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerSec_to_lbFtPerHr_Test () { UnitConverter target = new UnitConverter (); @@ -3939,9 +3911,9 @@ public void UnitConverter_ConvertUnits_lbFtPerSec_to_lbFtPerHr_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerSec_to_lbFtPerHr_Test2 () { UnitConverter target = new UnitConverter (); @@ -3954,9 +3926,9 @@ public void UnitConverter_ConvertUnits_lbFtPerSec_to_lbFtPerHr_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerSec_to_GramCentimeterPerSec_Test () { UnitConverter target = new UnitConverter (); @@ -3969,9 +3941,9 @@ public void UnitConverter_ConvertUnits_lbFtPerSec_to_GramCentimeterPerSec_Test ( Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerSec_to_GramCentimeterPerSec_Test2 () { UnitConverter target = new UnitConverter (); @@ -3984,9 +3956,9 @@ public void UnitConverter_ConvertUnits_lbFtPerSec_to_GramCentimeterPerSec_Test2 Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerSec_to_lbFtPerMin_Test () { UnitConverter target = new UnitConverter (); @@ -3999,9 +3971,9 @@ public void UnitConverter_ConvertUnits_lbFtPerSec_to_lbFtPerMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_lbFtPerSec_to_lbFtPerMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -4019,9 +3991,9 @@ public void UnitConverter_ConvertUnits_lbFtPerSec_to_lbFtPerMin_Test2 () #region "Speed Tests" #region "Source as Meters/Second" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MetersPerSec_to_KmPerHr_Test () { UnitConverter target = new UnitConverter (); @@ -4034,9 +4006,9 @@ public void UnitConverter_ConvertUnits_MetersPerSec_to_KmPerHr_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MetersPerSec_to_KmPerHr_Test2 () { UnitConverter target = new UnitConverter (); @@ -4049,9 +4021,9 @@ public void UnitConverter_ConvertUnits_MetersPerSec_to_KmPerHr_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MetersPerSec_to_MilesPerHr_Test () { UnitConverter target = new UnitConverter (); @@ -4064,9 +4036,9 @@ public void UnitConverter_ConvertUnits_MetersPerSec_to_MilesPerHr_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MetersPerSec_to_MilesPerHr_Test2 () { UnitConverter target = new UnitConverter (); @@ -4079,9 +4051,9 @@ public void UnitConverter_ConvertUnits_MetersPerSec_to_MilesPerHr_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MetersPerSec_to_MetersPerMin_Test () { UnitConverter target = new UnitConverter (); @@ -4094,9 +4066,9 @@ public void UnitConverter_ConvertUnits_MetersPerSec_to_MetersPerMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MetersPerSec_to_MetersPerMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -4109,9 +4081,9 @@ public void UnitConverter_ConvertUnits_MetersPerSec_to_MetersPerMin_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MetersPerSec_to_FtPerSec_Test () { UnitConverter target = new UnitConverter (); @@ -4124,9 +4096,9 @@ public void UnitConverter_ConvertUnits_MetersPerSec_to_FtPerSec_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MetersPerSec_to_FtPerSec_Test2 () { UnitConverter target = new UnitConverter (); @@ -4142,9 +4114,9 @@ public void UnitConverter_ConvertUnits_MetersPerSec_to_FtPerSec_Test2 () #region "Source as Kilometers/Hour" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_KmPerHr_to_MetersPerSec_Test () { UnitConverter target = new UnitConverter (); @@ -4157,9 +4129,9 @@ public void UnitConverter_ConvertUnits_KmPerHr_to_MetersPerSec_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_KmPerHr_to_MetersPerSec_Test2 () { UnitConverter target = new UnitConverter (); @@ -4172,9 +4144,9 @@ public void UnitConverter_ConvertUnits_KmPerHr_to_MetersPerSec_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_KmPerHr_to_MilesPerHr_Test () { UnitConverter target = new UnitConverter (); @@ -4187,9 +4159,9 @@ public void UnitConverter_ConvertUnits_KmPerHr_to_MilesPerHr_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_KmPerHr_to_MilesPerHr_Test2 () { UnitConverter target = new UnitConverter (); @@ -4202,9 +4174,9 @@ public void UnitConverter_ConvertUnits_KmPerHr_to_MilesPerHr_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_KmPerHr_to_MetersPerMin_Test () { UnitConverter target = new UnitConverter (); @@ -4217,9 +4189,9 @@ public void UnitConverter_ConvertUnits_KmPerHr_to_MetersPerMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_KmPerHr_to_MetersPerMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -4232,9 +4204,9 @@ public void UnitConverter_ConvertUnits_KmPerHr_to_MetersPerMin_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_KmPerHr_to_FtPerSec_Test () { UnitConverter target = new UnitConverter (); @@ -4247,9 +4219,9 @@ public void UnitConverter_ConvertUnits_KmPerHr_to_FtPerSec_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_KmPerHr_to_FtPerSec_Test2 () { UnitConverter target = new UnitConverter (); @@ -4265,9 +4237,9 @@ public void UnitConverter_ConvertUnits_KmPerHr_to_FtPerSec_Test2 () #region "Source as Miles/Hour" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MilesPerHr_to_MetersPerSec_Test () { UnitConverter target = new UnitConverter (); @@ -4280,9 +4252,9 @@ public void UnitConverter_ConvertUnits_MilesPerHr_to_MetersPerSec_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MilesPerHr_to_MetersPerSec_Test2 () { UnitConverter target = new UnitConverter (); @@ -4295,9 +4267,9 @@ public void UnitConverter_ConvertUnits_MilesPerHr_to_MetersPerSec_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MilesPerHr_to_KmPerHr_Test () { UnitConverter target = new UnitConverter (); @@ -4310,9 +4282,9 @@ public void UnitConverter_ConvertUnits_MilesPerHr_to_KmPerHr_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MilesPerHr_to_KmPerHr_Test2 () { UnitConverter target = new UnitConverter (); @@ -4325,9 +4297,9 @@ public void UnitConverter_ConvertUnits_MilesPerHr_to_KmPerHr_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MilesPerHr_to_MetersPerMin_Test () { UnitConverter target = new UnitConverter (); @@ -4340,9 +4312,9 @@ public void UnitConverter_ConvertUnits_MilesPerHr_to_MetersPerMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MilesPerHr_to_MetersPerMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -4355,9 +4327,9 @@ public void UnitConverter_ConvertUnits_MilesPerHr_to_MetersPerMin_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MilesPerHr_to_FtPerSec_Test () { UnitConverter target = new UnitConverter (); @@ -4370,9 +4342,9 @@ public void UnitConverter_ConvertUnits_MilesPerHr_to_FtPerSec_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MilesPerHr_to_FtPerSec_Test2 () { UnitConverter target = new UnitConverter (); @@ -4388,9 +4360,9 @@ public void UnitConverter_ConvertUnits_MilesPerHr_to_FtPerSec_Test2 () #region "Source as Meters/Minute" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MetersPerMin_to_MetersPerSec_Test () { UnitConverter target = new UnitConverter (); @@ -4403,9 +4375,9 @@ public void UnitConverter_ConvertUnits_MetersPerMin_to_MetersPerSec_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MetersPerMin_to_MetersPerSec_Test2 () { UnitConverter target = new UnitConverter (); @@ -4418,9 +4390,9 @@ public void UnitConverter_ConvertUnits_MetersPerMin_to_MetersPerSec_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MetersPerMin_to_KmPerHr_Test () { UnitConverter target = new UnitConverter (); @@ -4433,9 +4405,9 @@ public void UnitConverter_ConvertUnits_MetersPerMin_to_KmPerHr_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MetersPerMin_to_KmPerHr_Test2 () { UnitConverter target = new UnitConverter (); @@ -4448,9 +4420,9 @@ public void UnitConverter_ConvertUnits_MetersPerMin_to_KmPerHr_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MetersPerMin_to_MilesPerHr_Test () { UnitConverter target = new UnitConverter (); @@ -4463,9 +4435,9 @@ public void UnitConverter_ConvertUnits_MetersPerMin_to_MilesPerHr_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MetersPerMin_to_MilesPerHr_Test2 () { UnitConverter target = new UnitConverter (); @@ -4478,9 +4450,9 @@ public void UnitConverter_ConvertUnits_MetersPerMin_to_MilesPerHr_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MetersPerMin_to_FtPerSec_Test () { UnitConverter target = new UnitConverter (); @@ -4493,9 +4465,9 @@ public void UnitConverter_ConvertUnits_MetersPerMin_to_FtPerSec_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_MetersPerMin_to_FtPerSec_Test2 () { UnitConverter target = new UnitConverter (); @@ -4511,9 +4483,9 @@ public void UnitConverter_ConvertUnits_MetersPerMin_to_FtPerSec_Test2 () #region "Source as Feet/Second" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtPerSec_to_MetersPerSec_Test () { UnitConverter target = new UnitConverter (); @@ -4527,9 +4499,9 @@ public void UnitConverter_ConvertUnits_FtPerSec_to_MetersPerSec_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtPerSec_to_MetersPerSec_Test2 () { UnitConverter target = new UnitConverter (); @@ -4542,9 +4514,9 @@ public void UnitConverter_ConvertUnits_FtPerSec_to_MetersPerSec_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtPerSec_to_KmPerHr_Test () { UnitConverter target = new UnitConverter (); @@ -4558,9 +4530,9 @@ public void UnitConverter_ConvertUnits_FtPerSec_to_KmPerHr_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtPerSec_to_KmPerHr_Test2 () { UnitConverter target = new UnitConverter (); @@ -4573,9 +4545,9 @@ public void UnitConverter_ConvertUnits_FtPerSec_to_KmPerHr_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtPerSec_to_MilesPerHr_Test () { UnitConverter target = new UnitConverter (); @@ -4588,9 +4560,9 @@ public void UnitConverter_ConvertUnits_FtPerSec_to_MilesPerHr_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtPerSec_to_MilesPerHr_Test2 () { UnitConverter target = new UnitConverter (); @@ -4603,9 +4575,9 @@ public void UnitConverter_ConvertUnits_FtPerSec_to_MilesPerHr_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtPerSec_to_MetersPerMin_Test () { UnitConverter target = new UnitConverter (); @@ -4618,9 +4590,9 @@ public void UnitConverter_ConvertUnits_FtPerSec_to_MetersPerMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtPerSec_to_MetersPerMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -4638,9 +4610,9 @@ public void UnitConverter_ConvertUnits_FtPerSec_to_MetersPerMin_Test2 () #region "Length Tests" #region "Source as Metres" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_yd_Test () { UnitConverter target = new UnitConverter (); @@ -4653,9 +4625,9 @@ public void UnitConverter_ConvertUnits_m_to_yd_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_yd_Test2 () { UnitConverter target = new UnitConverter (); @@ -4668,9 +4640,9 @@ public void UnitConverter_ConvertUnits_m_to_yd_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_ft_Test () { UnitConverter target = new UnitConverter (); @@ -4684,9 +4656,9 @@ public void UnitConverter_ConvertUnits_m_to_ft_Test () Assert.AreEqual (Result.NoError, actual.ConversionResult); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_ft_Test2 () { UnitConverter target = new UnitConverter (); @@ -4699,9 +4671,9 @@ public void UnitConverter_ConvertUnits_m_to_ft_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_chain_Test () { UnitConverter target = new UnitConverter (); @@ -4714,9 +4686,9 @@ public void UnitConverter_ConvertUnits_m_to_chain_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_chain_Test2 () { UnitConverter target = new UnitConverter (); @@ -4729,9 +4701,9 @@ public void UnitConverter_ConvertUnits_m_to_chain_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_mile_Test () { UnitConverter target = new UnitConverter (); @@ -4744,9 +4716,9 @@ public void UnitConverter_ConvertUnits_m_to_mile_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_mile_Test2 () { UnitConverter target = new UnitConverter (); @@ -4759,9 +4731,9 @@ public void UnitConverter_ConvertUnits_m_to_mile_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_km_Test () { UnitConverter target = new UnitConverter (); @@ -4774,9 +4746,9 @@ public void UnitConverter_ConvertUnits_m_to_km_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_km_Test2 () { UnitConverter target = new UnitConverter (); @@ -4789,9 +4761,9 @@ public void UnitConverter_ConvertUnits_m_to_km_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_Megametres_Test () { UnitConverter target = new UnitConverter (); @@ -4804,9 +4776,9 @@ public void UnitConverter_ConvertUnits_m_to_Megametres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_Megametres_Test2 () { UnitConverter target = new UnitConverter (); @@ -4819,9 +4791,9 @@ public void UnitConverter_ConvertUnits_m_to_Megametres_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_Gm_Test () { UnitConverter target = new UnitConverter (); @@ -4834,9 +4806,9 @@ public void UnitConverter_ConvertUnits_m_to_Gm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_Gm_Test2 () { UnitConverter target = new UnitConverter (); @@ -4849,9 +4821,9 @@ public void UnitConverter_ConvertUnits_m_to_Gm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_furlong_Test () { UnitConverter target = new UnitConverter (); @@ -4864,9 +4836,9 @@ public void UnitConverter_ConvertUnits_m_to_furlong_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_furlong_Test2 () { UnitConverter target = new UnitConverter (); @@ -4879,9 +4851,9 @@ public void UnitConverter_ConvertUnits_m_to_furlong_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_thou_Test () { UnitConverter target = new UnitConverter (); @@ -4894,9 +4866,9 @@ public void UnitConverter_ConvertUnits_m_to_thou_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_thou_Test2 () { UnitConverter target = new UnitConverter (); @@ -4909,9 +4881,9 @@ public void UnitConverter_ConvertUnits_m_to_thou_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_µm_Test () { UnitConverter target = new UnitConverter (); @@ -4924,9 +4896,9 @@ public void UnitConverter_ConvertUnits_m_to_µm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_µm_Test2 () { UnitConverter target = new UnitConverter (); @@ -4939,9 +4911,9 @@ public void UnitConverter_ConvertUnits_m_to_µm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_in_Test () { UnitConverter target = new UnitConverter (); @@ -4954,9 +4926,9 @@ public void UnitConverter_ConvertUnits_m_to_in_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_in_Test2 () { UnitConverter target = new UnitConverter (); @@ -4969,9 +4941,9 @@ public void UnitConverter_ConvertUnits_m_to_in_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_cm_Test () { UnitConverter target = new UnitConverter (); @@ -4984,9 +4956,9 @@ public void UnitConverter_ConvertUnits_m_to_cm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_cm_Test2 () { UnitConverter target = new UnitConverter (); @@ -4999,9 +4971,9 @@ public void UnitConverter_ConvertUnits_m_to_cm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_millimetres_Test () { UnitConverter target = new UnitConverter (); @@ -5014,9 +4986,9 @@ public void UnitConverter_ConvertUnits_m_to_millimetres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m_to_millimetres_Test2 () { UnitConverter target = new UnitConverter (); @@ -5032,9 +5004,9 @@ public void UnitConverter_ConvertUnits_m_to_millimetres_Test2 () #region "Source as Yards" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_m_Test () { UnitConverter target = new UnitConverter (); @@ -5048,9 +5020,9 @@ public void UnitConverter_ConvertUnits_yd_to_m_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_m_Test2 () { UnitConverter target = new UnitConverter (); @@ -5063,9 +5035,9 @@ public void UnitConverter_ConvertUnits_yd_to_m_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_ft_Test () { UnitConverter target = new UnitConverter (); @@ -5078,9 +5050,9 @@ public void UnitConverter_ConvertUnits_yd_to_ft_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_ft_Test2 () { UnitConverter target = new UnitConverter (); @@ -5093,9 +5065,9 @@ public void UnitConverter_ConvertUnits_yd_to_ft_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_chain_Test () { UnitConverter target = new UnitConverter (); @@ -5108,9 +5080,9 @@ public void UnitConverter_ConvertUnits_yd_to_chain_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_chain_Test2 () { UnitConverter target = new UnitConverter (); @@ -5123,9 +5095,9 @@ public void UnitConverter_ConvertUnits_yd_to_chain_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_mile_Test () { UnitConverter target = new UnitConverter (); @@ -5138,9 +5110,9 @@ public void UnitConverter_ConvertUnits_yd_to_mile_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_mile_Test2 () { UnitConverter target = new UnitConverter (); @@ -5153,9 +5125,9 @@ public void UnitConverter_ConvertUnits_yd_to_mile_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_km_Test () { UnitConverter target = new UnitConverter (); @@ -5168,9 +5140,9 @@ public void UnitConverter_ConvertUnits_yd_to_km_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_km_Test2 () { UnitConverter target = new UnitConverter (); @@ -5183,9 +5155,9 @@ public void UnitConverter_ConvertUnits_yd_to_km_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_Megametres_Test () { UnitConverter target = new UnitConverter (); @@ -5198,9 +5170,9 @@ public void UnitConverter_ConvertUnits_yd_to_Megametres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_Megametres_Test2 () { UnitConverter target = new UnitConverter (); @@ -5213,9 +5185,9 @@ public void UnitConverter_ConvertUnits_yd_to_Megametres_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_Gm_Test () { UnitConverter target = new UnitConverter (); @@ -5228,9 +5200,9 @@ public void UnitConverter_ConvertUnits_yd_to_Gm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_Gm_Test2 () { UnitConverter target = new UnitConverter (); @@ -5243,9 +5215,9 @@ public void UnitConverter_ConvertUnits_yd_to_Gm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_furlong_Test () { UnitConverter target = new UnitConverter (); @@ -5258,9 +5230,9 @@ public void UnitConverter_ConvertUnits_yd_to_furlong_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_furlong_Test2 () { UnitConverter target = new UnitConverter (); @@ -5273,9 +5245,9 @@ public void UnitConverter_ConvertUnits_yd_to_furlong_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_thou_Test () { UnitConverter target = new UnitConverter (); @@ -5288,9 +5260,9 @@ public void UnitConverter_ConvertUnits_yd_to_thou_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_thou_Test2 () { UnitConverter target = new UnitConverter (); @@ -5303,9 +5275,9 @@ public void UnitConverter_ConvertUnits_yd_to_thou_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_µm_Test () { UnitConverter target = new UnitConverter (); @@ -5318,9 +5290,9 @@ public void UnitConverter_ConvertUnits_yd_to_µm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_µm_Test2 () { UnitConverter target = new UnitConverter (); @@ -5333,9 +5305,9 @@ public void UnitConverter_ConvertUnits_yd_to_µm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_in_Test () { UnitConverter target = new UnitConverter (); @@ -5348,9 +5320,9 @@ public void UnitConverter_ConvertUnits_yd_to_in_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_in_Test2 () { UnitConverter target = new UnitConverter (); @@ -5364,9 +5336,9 @@ public void UnitConverter_ConvertUnits_yd_to_in_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_cm_Test () { UnitConverter target = new UnitConverter (); @@ -5379,9 +5351,9 @@ public void UnitConverter_ConvertUnits_yd_to_cm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_cm_Test2 () { UnitConverter target = new UnitConverter (); @@ -5394,9 +5366,9 @@ public void UnitConverter_ConvertUnits_yd_to_cm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_millimetres_Test () { UnitConverter target = new UnitConverter (); @@ -5409,9 +5381,9 @@ public void UnitConverter_ConvertUnits_yd_to_millimetres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd_to_millimetres_Test2 () { UnitConverter target = new UnitConverter (); @@ -5427,9 +5399,9 @@ public void UnitConverter_ConvertUnits_yd_to_millimetres_Test2 () #region "Source as Feet" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_m_Test () { UnitConverter target = new UnitConverter (); @@ -5442,9 +5414,9 @@ public void UnitConverter_ConvertUnits_ft_to_m_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_m_Test2 () { UnitConverter target = new UnitConverter (); @@ -5457,9 +5429,9 @@ public void UnitConverter_ConvertUnits_ft_to_m_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_m_negative_Test () { UnitConverter target = new UnitConverter (); @@ -5472,9 +5444,9 @@ public void UnitConverter_ConvertUnits_ft_to_m_negative_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_yd_Test () { UnitConverter target = new UnitConverter (); @@ -5487,9 +5459,9 @@ public void UnitConverter_ConvertUnits_ft_to_yd_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_yd_Test2 () { UnitConverter target = new UnitConverter (); @@ -5502,9 +5474,9 @@ public void UnitConverter_ConvertUnits_ft_to_yd_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_chain_Test () { UnitConverter target = new UnitConverter (); @@ -5517,9 +5489,9 @@ public void UnitConverter_ConvertUnits_ft_to_chain_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_chain_Test2 () { UnitConverter target = new UnitConverter (); @@ -5532,9 +5504,9 @@ public void UnitConverter_ConvertUnits_ft_to_chain_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_mile_Test () { UnitConverter target = new UnitConverter (); @@ -5547,9 +5519,9 @@ public void UnitConverter_ConvertUnits_ft_to_mile_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_mile_Test2 () { UnitConverter target = new UnitConverter (); @@ -5562,9 +5534,9 @@ public void UnitConverter_ConvertUnits_ft_to_mile_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_km_Test () { UnitConverter target = new UnitConverter (); @@ -5577,9 +5549,9 @@ public void UnitConverter_ConvertUnits_ft_to_km_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_km_Test2 () { UnitConverter target = new UnitConverter (); @@ -5592,9 +5564,9 @@ public void UnitConverter_ConvertUnits_ft_to_km_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_Megametres_Test () { UnitConverter target = new UnitConverter (); @@ -5607,9 +5579,9 @@ public void UnitConverter_ConvertUnits_ft_to_Megametres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_Megametres_Test2 () { UnitConverter target = new UnitConverter (); @@ -5622,9 +5594,9 @@ public void UnitConverter_ConvertUnits_ft_to_Megametres_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_Gm_Test () { UnitConverter target = new UnitConverter (); @@ -5637,9 +5609,9 @@ public void UnitConverter_ConvertUnits_ft_to_Gm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_Gm_Test2 () { UnitConverter target = new UnitConverter (); @@ -5652,9 +5624,9 @@ public void UnitConverter_ConvertUnits_ft_to_Gm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_furlong_Test () { UnitConverter target = new UnitConverter (); @@ -5667,9 +5639,9 @@ public void UnitConverter_ConvertUnits_ft_to_furlong_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_furlong_Test2 () { UnitConverter target = new UnitConverter (); @@ -5682,9 +5654,9 @@ public void UnitConverter_ConvertUnits_ft_to_furlong_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_thou_Test () { UnitConverter target = new UnitConverter (); @@ -5697,9 +5669,9 @@ public void UnitConverter_ConvertUnits_ft_to_thou_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_thou_Test2 () { UnitConverter target = new UnitConverter (); @@ -5712,9 +5684,9 @@ public void UnitConverter_ConvertUnits_ft_to_thou_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_µm_Test () { UnitConverter target = new UnitConverter (); @@ -5727,9 +5699,9 @@ public void UnitConverter_ConvertUnits_ft_to_µm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_µm_Test2 () { UnitConverter target = new UnitConverter (); @@ -5742,9 +5714,9 @@ public void UnitConverter_ConvertUnits_ft_to_µm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_in_Test () { UnitConverter target = new UnitConverter (); @@ -5757,9 +5729,9 @@ public void UnitConverter_ConvertUnits_ft_to_in_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_in_Test2 () { UnitConverter target = new UnitConverter (); @@ -5772,9 +5744,9 @@ public void UnitConverter_ConvertUnits_ft_to_in_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_cm_Test () { UnitConverter target = new UnitConverter (); @@ -5787,9 +5759,9 @@ public void UnitConverter_ConvertUnits_ft_to_cm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_cm_Test2 () { UnitConverter target = new UnitConverter (); @@ -5802,9 +5774,9 @@ public void UnitConverter_ConvertUnits_ft_to_cm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_millimetres_Test () { UnitConverter target = new UnitConverter (); @@ -5817,9 +5789,9 @@ public void UnitConverter_ConvertUnits_ft_to_millimetres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft_to_millimetres_Test2 () { UnitConverter target = new UnitConverter (); @@ -5835,9 +5807,9 @@ public void UnitConverter_ConvertUnits_ft_to_millimetres_Test2 () #region "Source as Chain" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_m_Test () { UnitConverter target = new UnitConverter (); @@ -5850,9 +5822,9 @@ public void UnitConverter_ConvertUnits_chain_to_m_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_m_Test2 () { UnitConverter target = new UnitConverter (); @@ -5865,9 +5837,9 @@ public void UnitConverter_ConvertUnits_chain_to_m_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_yd_Test () { UnitConverter target = new UnitConverter (); @@ -5880,9 +5852,9 @@ public void UnitConverter_ConvertUnits_chain_to_yd_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_yd_Test2 () { UnitConverter target = new UnitConverter (); @@ -5895,9 +5867,9 @@ public void UnitConverter_ConvertUnits_chain_to_yd_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_ft_Test () { UnitConverter target = new UnitConverter (); @@ -5910,9 +5882,9 @@ public void UnitConverter_ConvertUnits_chain_to_ft_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_ft_Test2 () { UnitConverter target = new UnitConverter (); @@ -5925,9 +5897,9 @@ public void UnitConverter_ConvertUnits_chain_to_ft_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_mile_Test () { UnitConverter target = new UnitConverter (); @@ -5940,9 +5912,9 @@ public void UnitConverter_ConvertUnits_chain_to_mile_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_mile_Test2 () { UnitConverter target = new UnitConverter (); @@ -5955,9 +5927,9 @@ public void UnitConverter_ConvertUnits_chain_to_mile_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_km_Test () { UnitConverter target = new UnitConverter (); @@ -5970,9 +5942,9 @@ public void UnitConverter_ConvertUnits_chain_to_km_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_km_Test2 () { UnitConverter target = new UnitConverter (); @@ -5985,9 +5957,9 @@ public void UnitConverter_ConvertUnits_chain_to_km_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_Megametres_Test () { UnitConverter target = new UnitConverter (); @@ -6000,9 +5972,9 @@ public void UnitConverter_ConvertUnits_chain_to_Megametres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_Megametres_Test2 () { UnitConverter target = new UnitConverter (); @@ -6015,9 +5987,9 @@ public void UnitConverter_ConvertUnits_chain_to_Megametres_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_Gm_Test () { UnitConverter target = new UnitConverter (); @@ -6030,9 +6002,9 @@ public void UnitConverter_ConvertUnits_chain_to_Gm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_Gm_Test2 () { UnitConverter target = new UnitConverter (); @@ -6045,9 +6017,9 @@ public void UnitConverter_ConvertUnits_chain_to_Gm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_furlong_Test () { UnitConverter target = new UnitConverter (); @@ -6060,9 +6032,9 @@ public void UnitConverter_ConvertUnits_chain_to_furlong_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_furlong_Test2 () { UnitConverter target = new UnitConverter (); @@ -6075,9 +6047,9 @@ public void UnitConverter_ConvertUnits_chain_to_furlong_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_thou_Test () { UnitConverter target = new UnitConverter (); @@ -6090,9 +6062,9 @@ public void UnitConverter_ConvertUnits_chain_to_thou_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_thou_Test2 () { UnitConverter target = new UnitConverter (); @@ -6105,9 +6077,9 @@ public void UnitConverter_ConvertUnits_chain_to_thou_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_µm_Test () { UnitConverter target = new UnitConverter (); @@ -6120,9 +6092,9 @@ public void UnitConverter_ConvertUnits_chain_to_µm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_µm_Test2 () { UnitConverter target = new UnitConverter (); @@ -6135,9 +6107,9 @@ public void UnitConverter_ConvertUnits_chain_to_µm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_in_Test () { UnitConverter target = new UnitConverter (); @@ -6150,9 +6122,9 @@ public void UnitConverter_ConvertUnits_chain_to_in_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_in_Test2 () { UnitConverter target = new UnitConverter (); @@ -6165,9 +6137,9 @@ public void UnitConverter_ConvertUnits_chain_to_in_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_cm_Test () { UnitConverter target = new UnitConverter (); @@ -6180,9 +6152,9 @@ public void UnitConverter_ConvertUnits_chain_to_cm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_cm_Test2 () { UnitConverter target = new UnitConverter (); @@ -6195,9 +6167,9 @@ public void UnitConverter_ConvertUnits_chain_to_cm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_millimetres_Test () { UnitConverter target = new UnitConverter (); @@ -6210,9 +6182,9 @@ public void UnitConverter_ConvertUnits_chain_to_millimetres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_chain_to_millimetres_Test2 () { UnitConverter target = new UnitConverter (); @@ -6228,9 +6200,9 @@ public void UnitConverter_ConvertUnits_chain_to_millimetres_Test2 () #region "Source as Miles" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_m_Test () { UnitConverter target = new UnitConverter (); @@ -6243,9 +6215,9 @@ public void UnitConverter_ConvertUnits_miles_to_m_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_m_Test2 () { UnitConverter target = new UnitConverter (); @@ -6258,9 +6230,9 @@ public void UnitConverter_ConvertUnits_miles_to_m_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_yd_Test () { UnitConverter target = new UnitConverter (); @@ -6273,9 +6245,9 @@ public void UnitConverter_ConvertUnits_miles_to_yd_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_yd_Test2 () { UnitConverter target = new UnitConverter (); @@ -6288,9 +6260,9 @@ public void UnitConverter_ConvertUnits_miles_to_yd_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_ft_Test () { UnitConverter target = new UnitConverter (); @@ -6303,9 +6275,9 @@ public void UnitConverter_ConvertUnits_miles_to_ft_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_ft_Test2 () { UnitConverter target = new UnitConverter (); @@ -6318,9 +6290,9 @@ public void UnitConverter_ConvertUnits_miles_to_ft_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_chain_Test () { UnitConverter target = new UnitConverter (); @@ -6333,9 +6305,9 @@ public void UnitConverter_ConvertUnits_miles_to_chain_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_chain_Test2 () { UnitConverter target = new UnitConverter (); @@ -6348,9 +6320,9 @@ public void UnitConverter_ConvertUnits_miles_to_chain_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_km_Test () { UnitConverter target = new UnitConverter (); @@ -6363,9 +6335,9 @@ public void UnitConverter_ConvertUnits_miles_to_km_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_km_Test2 () { UnitConverter target = new UnitConverter (); @@ -6378,9 +6350,9 @@ public void UnitConverter_ConvertUnits_miles_to_km_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_Megametres_Test () { UnitConverter target = new UnitConverter (); @@ -6393,9 +6365,9 @@ public void UnitConverter_ConvertUnits_miles_to_Megametres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_Megametres_Test2 () { UnitConverter target = new UnitConverter (); @@ -6408,9 +6380,9 @@ public void UnitConverter_ConvertUnits_miles_to_Megametres_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_Gm_Test () { UnitConverter target = new UnitConverter (); @@ -6423,9 +6395,9 @@ public void UnitConverter_ConvertUnits_miles_to_Gm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_Gm_Test2 () { UnitConverter target = new UnitConverter (); @@ -6438,9 +6410,9 @@ public void UnitConverter_ConvertUnits_miles_to_Gm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_furlong_Test () { UnitConverter target = new UnitConverter (); @@ -6453,9 +6425,9 @@ public void UnitConverter_ConvertUnits_miles_to_furlong_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_furlong_Test2 () { UnitConverter target = new UnitConverter (); @@ -6468,9 +6440,9 @@ public void UnitConverter_ConvertUnits_miles_to_furlong_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_thou_Test () { UnitConverter target = new UnitConverter (); @@ -6483,9 +6455,9 @@ public void UnitConverter_ConvertUnits_miles_to_thou_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_thou_Test2 () { UnitConverter target = new UnitConverter (); @@ -6498,9 +6470,9 @@ public void UnitConverter_ConvertUnits_miles_to_thou_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_µm_Test () { UnitConverter target = new UnitConverter (); @@ -6513,9 +6485,9 @@ public void UnitConverter_ConvertUnits_miles_to_µm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_µm_Test2 () { UnitConverter target = new UnitConverter (); @@ -6528,9 +6500,9 @@ public void UnitConverter_ConvertUnits_miles_to_µm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_in_Test () { UnitConverter target = new UnitConverter (); @@ -6543,9 +6515,9 @@ public void UnitConverter_ConvertUnits_miles_to_in_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_in_Test2 () { UnitConverter target = new UnitConverter (); @@ -6558,9 +6530,9 @@ public void UnitConverter_ConvertUnits_miles_to_in_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_cm_Test () { UnitConverter target = new UnitConverter (); @@ -6573,9 +6545,9 @@ public void UnitConverter_ConvertUnits_miles_to_cm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_cm_Test2 () { UnitConverter target = new UnitConverter (); @@ -6588,9 +6560,9 @@ public void UnitConverter_ConvertUnits_miles_to_cm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_millimetres_Test () { UnitConverter target = new UnitConverter (); @@ -6603,9 +6575,9 @@ public void UnitConverter_ConvertUnits_miles_to_millimetres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_miles_to_millimetres_Test2 () { UnitConverter target = new UnitConverter (); @@ -6621,9 +6593,9 @@ public void UnitConverter_ConvertUnits_miles_to_millimetres_Test2 () #region "Source as Kilometres" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_m_Test () { UnitConverter target = new UnitConverter (); @@ -6636,9 +6608,9 @@ public void UnitConverter_ConvertUnits_km_to_m_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_m_Test2 () { UnitConverter target = new UnitConverter (); @@ -6651,9 +6623,9 @@ public void UnitConverter_ConvertUnits_km_to_m_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_yd_Test () { UnitConverter target = new UnitConverter (); @@ -6666,9 +6638,9 @@ public void UnitConverter_ConvertUnits_km_to_yd_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_yd_Test2 () { UnitConverter target = new UnitConverter (); @@ -6681,9 +6653,9 @@ public void UnitConverter_ConvertUnits_km_to_yd_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_ft_Test () { UnitConverter target = new UnitConverter (); @@ -6696,9 +6668,9 @@ public void UnitConverter_ConvertUnits_km_to_ft_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_ft_Test2 () { UnitConverter target = new UnitConverter (); @@ -6711,9 +6683,9 @@ public void UnitConverter_ConvertUnits_km_to_ft_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_chain_Test () { UnitConverter target = new UnitConverter (); @@ -6726,9 +6698,9 @@ public void UnitConverter_ConvertUnits_km_to_chain_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_chain_Test2 () { UnitConverter target = new UnitConverter (); @@ -6741,9 +6713,9 @@ public void UnitConverter_ConvertUnits_km_to_chain_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_miles_Test () { UnitConverter target = new UnitConverter (); @@ -6756,9 +6728,9 @@ public void UnitConverter_ConvertUnits_km_to_miles_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_miles_Test2 () { UnitConverter target = new UnitConverter (); @@ -6771,9 +6743,9 @@ public void UnitConverter_ConvertUnits_km_to_miles_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_Megametres_Test () { UnitConverter target = new UnitConverter (); @@ -6786,9 +6758,9 @@ public void UnitConverter_ConvertUnits_km_to_Megametres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_Megametres_Test2 () { UnitConverter target = new UnitConverter (); @@ -6801,9 +6773,9 @@ public void UnitConverter_ConvertUnits_km_to_Megametres_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_Gm_Test () { UnitConverter target = new UnitConverter (); @@ -6816,9 +6788,9 @@ public void UnitConverter_ConvertUnits_km_to_Gm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_Gm_Test2 () { UnitConverter target = new UnitConverter (); @@ -6831,9 +6803,9 @@ public void UnitConverter_ConvertUnits_km_to_Gm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_furlong_Test () { UnitConverter target = new UnitConverter (); @@ -6846,9 +6818,9 @@ public void UnitConverter_ConvertUnits_km_to_furlong_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_furlong_Test2 () { UnitConverter target = new UnitConverter (); @@ -6861,9 +6833,9 @@ public void UnitConverter_ConvertUnits_km_to_furlong_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_thou_Test () { UnitConverter target = new UnitConverter (); @@ -6876,9 +6848,9 @@ public void UnitConverter_ConvertUnits_km_to_thou_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_thou_Test2 () { UnitConverter target = new UnitConverter (); @@ -6891,9 +6863,9 @@ public void UnitConverter_ConvertUnits_km_to_thou_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_µm_Test () { UnitConverter target = new UnitConverter (); @@ -6906,9 +6878,9 @@ public void UnitConverter_ConvertUnits_km_to_µm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_µm_Test2 () { UnitConverter target = new UnitConverter (); @@ -6921,9 +6893,9 @@ public void UnitConverter_ConvertUnits_km_to_µm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_in_Test () { UnitConverter target = new UnitConverter (); @@ -6936,9 +6908,9 @@ public void UnitConverter_ConvertUnits_km_to_in_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_in_Test2 () { UnitConverter target = new UnitConverter (); @@ -6951,9 +6923,9 @@ public void UnitConverter_ConvertUnits_km_to_in_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_cm_Test () { UnitConverter target = new UnitConverter (); @@ -6966,9 +6938,9 @@ public void UnitConverter_ConvertUnits_km_to_cm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_cm_Test2 () { UnitConverter target = new UnitConverter (); @@ -6981,9 +6953,9 @@ public void UnitConverter_ConvertUnits_km_to_cm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_millimetres_Test () { UnitConverter target = new UnitConverter (); @@ -6996,9 +6968,9 @@ public void UnitConverter_ConvertUnits_km_to_millimetres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km_to_millimetres_Test2 () { UnitConverter target = new UnitConverter (); @@ -7014,9 +6986,9 @@ public void UnitConverter_ConvertUnits_km_to_millimetres_Test2 () #region "Source as Megametres" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_m_Test () { UnitConverter target = new UnitConverter (); @@ -7029,9 +7001,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_m_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_m_Test2 () { UnitConverter target = new UnitConverter (); @@ -7044,9 +7016,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_m_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_yd_Test () { UnitConverter target = new UnitConverter (); @@ -7059,9 +7031,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_yd_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_yd_Test2 () { UnitConverter target = new UnitConverter (); @@ -7074,9 +7046,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_yd_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_ft_Test () { UnitConverter target = new UnitConverter (); @@ -7089,9 +7061,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_ft_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_ft_Test2 () { UnitConverter target = new UnitConverter (); @@ -7104,9 +7076,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_ft_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_chain_Test () { UnitConverter target = new UnitConverter (); @@ -7119,9 +7091,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_chain_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_chain_Test2 () { UnitConverter target = new UnitConverter (); @@ -7134,9 +7106,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_chain_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_miles_Test () { UnitConverter target = new UnitConverter (); @@ -7149,9 +7121,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_miles_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_miles_Test2 () { UnitConverter target = new UnitConverter (); @@ -7164,9 +7136,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_miles_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_km_Test () { UnitConverter target = new UnitConverter (); @@ -7179,9 +7151,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_km_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_km_Test2 () { UnitConverter target = new UnitConverter (); @@ -7194,9 +7166,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_km_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_Gm_Test () { UnitConverter target = new UnitConverter (); @@ -7209,9 +7181,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_Gm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_Gm_Test2 () { UnitConverter target = new UnitConverter (); @@ -7224,9 +7196,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_Gm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_furlong_Test () { UnitConverter target = new UnitConverter (); @@ -7239,9 +7211,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_furlong_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_furlong_Test2 () { UnitConverter target = new UnitConverter (); @@ -7254,9 +7226,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_furlong_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_thou_Test () { UnitConverter target = new UnitConverter (); @@ -7269,9 +7241,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_thou_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_thou_Test2 () { UnitConverter target = new UnitConverter (); @@ -7284,9 +7256,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_thou_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_µm_Test () { UnitConverter target = new UnitConverter (); @@ -7299,9 +7271,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_µm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_µm_Test2 () { UnitConverter target = new UnitConverter (); @@ -7314,9 +7286,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_µm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_in_Test () { UnitConverter target = new UnitConverter (); @@ -7329,9 +7301,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_in_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_in_Test2 () { UnitConverter target = new UnitConverter (); @@ -7344,9 +7316,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_in_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_cm_Test () { UnitConverter target = new UnitConverter (); @@ -7359,9 +7331,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_cm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_cm_Test2 () { UnitConverter target = new UnitConverter (); @@ -7374,9 +7346,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_cm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_millimetres_Test () { UnitConverter target = new UnitConverter (); @@ -7389,9 +7361,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_millimetres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megametres_to_millimetres_Test2 () { UnitConverter target = new UnitConverter (); @@ -7407,9 +7379,9 @@ public void UnitConverter_ConvertUnits_Megametres_to_millimetres_Test2 () #region "Source as Gigametres" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_m_Test () { UnitConverter target = new UnitConverter (); @@ -7422,9 +7394,9 @@ public void UnitConverter_ConvertUnits_Gm_to_m_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_m_Test2 () { UnitConverter target = new UnitConverter (); @@ -7437,9 +7409,9 @@ public void UnitConverter_ConvertUnits_Gm_to_m_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_yd_Test () { UnitConverter target = new UnitConverter (); @@ -7452,9 +7424,9 @@ public void UnitConverter_ConvertUnits_Gm_to_yd_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_yd_Test2 () { UnitConverter target = new UnitConverter (); @@ -7467,9 +7439,9 @@ public void UnitConverter_ConvertUnits_Gm_to_yd_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_ft_Test () { UnitConverter target = new UnitConverter (); @@ -7482,9 +7454,9 @@ public void UnitConverter_ConvertUnits_Gm_to_ft_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_ft_Test2 () { UnitConverter target = new UnitConverter (); @@ -7497,9 +7469,9 @@ public void UnitConverter_ConvertUnits_Gm_to_ft_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_chain_Test () { UnitConverter target = new UnitConverter (); @@ -7512,9 +7484,9 @@ public void UnitConverter_ConvertUnits_Gm_to_chain_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_chain_Test2 () { UnitConverter target = new UnitConverter (); @@ -7527,9 +7499,9 @@ public void UnitConverter_ConvertUnits_Gm_to_chain_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_miles_Test () { UnitConverter target = new UnitConverter (); @@ -7542,9 +7514,9 @@ public void UnitConverter_ConvertUnits_Gm_to_miles_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_miles_Test2 () { UnitConverter target = new UnitConverter (); @@ -7557,9 +7529,9 @@ public void UnitConverter_ConvertUnits_Gm_to_miles_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_km_Test () { UnitConverter target = new UnitConverter (); @@ -7572,9 +7544,9 @@ public void UnitConverter_ConvertUnits_Gm_to_km_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gms_to_km_Test2 () { UnitConverter target = new UnitConverter (); @@ -7587,9 +7559,9 @@ public void UnitConverter_ConvertUnits_Gms_to_km_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_Megametres_Test () { UnitConverter target = new UnitConverter (); @@ -7602,9 +7574,9 @@ public void UnitConverter_ConvertUnits_Gm_to_Megametres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_Megametres_Test2 () { UnitConverter target = new UnitConverter (); @@ -7617,9 +7589,9 @@ public void UnitConverter_ConvertUnits_Gm_to_Megametres_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_furlong_Test () { UnitConverter target = new UnitConverter (); @@ -7632,9 +7604,9 @@ public void UnitConverter_ConvertUnits_Gm_to_furlong_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_furlong_Test2 () { UnitConverter target = new UnitConverter (); @@ -7647,9 +7619,9 @@ public void UnitConverter_ConvertUnits_Gm_to_furlong_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_thou_Test () { UnitConverter target = new UnitConverter (); @@ -7662,9 +7634,9 @@ public void UnitConverter_ConvertUnits_Gm_to_thou_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_thou_Test2 () { UnitConverter target = new UnitConverter (); @@ -7677,9 +7649,9 @@ public void UnitConverter_ConvertUnits_Gm_to_thou_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_µm_Test () { UnitConverter target = new UnitConverter (); @@ -7692,9 +7664,9 @@ public void UnitConverter_ConvertUnits_Gm_to_µm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_µm_Test2 () { UnitConverter target = new UnitConverter (); @@ -7707,9 +7679,9 @@ public void UnitConverter_ConvertUnits_Gm_to_µm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_in_Test () { UnitConverter target = new UnitConverter (); @@ -7722,9 +7694,9 @@ public void UnitConverter_ConvertUnits_Gm_to_in_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_in_Test2 () { UnitConverter target = new UnitConverter (); @@ -7737,9 +7709,9 @@ public void UnitConverter_ConvertUnits_Gm_to_in_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_cm_Test () { UnitConverter target = new UnitConverter (); @@ -7752,9 +7724,9 @@ public void UnitConverter_ConvertUnits_Gm_to_cm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_cm_Test2 () { UnitConverter target = new UnitConverter (); @@ -7767,9 +7739,9 @@ public void UnitConverter_ConvertUnits_Gm_to_cm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_millimetres_Test () { UnitConverter target = new UnitConverter (); @@ -7782,9 +7754,9 @@ public void UnitConverter_ConvertUnits_Gm_to_millimetres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gm_to_millimetres_Test2 () { UnitConverter target = new UnitConverter (); @@ -7800,9 +7772,9 @@ public void UnitConverter_ConvertUnits_Gm_to_millimetres_Test2 () #region "Source as Furlongs" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_m_Test () { UnitConverter target = new UnitConverter (); @@ -7815,9 +7787,9 @@ public void UnitConverter_ConvertUnits_furlong_to_m_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_m_Test2 () { UnitConverter target = new UnitConverter (); @@ -7830,9 +7802,9 @@ public void UnitConverter_ConvertUnits_furlong_to_m_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_yd_Test () { UnitConverter target = new UnitConverter (); @@ -7845,9 +7817,9 @@ public void UnitConverter_ConvertUnits_furlong_to_yd_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_yd_Test2 () { UnitConverter target = new UnitConverter (); @@ -7860,9 +7832,9 @@ public void UnitConverter_ConvertUnits_furlong_to_yd_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_ft_Test () { UnitConverter target = new UnitConverter (); @@ -7875,9 +7847,9 @@ public void UnitConverter_ConvertUnits_furlong_to_ft_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_ft_Test2 () { UnitConverter target = new UnitConverter (); @@ -7890,9 +7862,9 @@ public void UnitConverter_ConvertUnits_furlong_to_ft_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_mile_Test () { UnitConverter target = new UnitConverter (); @@ -7905,9 +7877,9 @@ public void UnitConverter_ConvertUnits_furlong_to_mile_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_mile_Test2 () { UnitConverter target = new UnitConverter (); @@ -7920,9 +7892,9 @@ public void UnitConverter_ConvertUnits_furlong_to_mile_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_km_Test () { UnitConverter target = new UnitConverter (); @@ -7935,9 +7907,9 @@ public void UnitConverter_ConvertUnits_furlong_to_km_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_km_Test2 () { UnitConverter target = new UnitConverter (); @@ -7950,9 +7922,9 @@ public void UnitConverter_ConvertUnits_furlong_to_km_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_Megametres_Test () { UnitConverter target = new UnitConverter (); @@ -7965,9 +7937,9 @@ public void UnitConverter_ConvertUnits_furlong_to_Megametres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_Megametres_Test2 () { UnitConverter target = new UnitConverter (); @@ -7980,9 +7952,9 @@ public void UnitConverter_ConvertUnits_furlong_to_Megametres_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_Gm_Test () { UnitConverter target = new UnitConverter (); @@ -7995,9 +7967,9 @@ public void UnitConverter_ConvertUnits_furlong_to_Gm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_Gm_Test2 () { UnitConverter target = new UnitConverter (); @@ -8010,9 +7982,9 @@ public void UnitConverter_ConvertUnits_furlong_to_Gm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_chain_Test () { UnitConverter target = new UnitConverter (); @@ -8025,9 +7997,9 @@ public void UnitConverter_ConvertUnits_furlong_to_chain_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_chain_Test2 () { UnitConverter target = new UnitConverter (); @@ -8040,9 +8012,9 @@ public void UnitConverter_ConvertUnits_furlong_to_chain_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_thou_Test () { UnitConverter target = new UnitConverter (); @@ -8055,9 +8027,9 @@ public void UnitConverter_ConvertUnits_furlong_to_thou_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_thou_Test2 () { UnitConverter target = new UnitConverter (); @@ -8070,9 +8042,9 @@ public void UnitConverter_ConvertUnits_furlong_to_thou_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_µm_Test () { UnitConverter target = new UnitConverter (); @@ -8085,9 +8057,9 @@ public void UnitConverter_ConvertUnits_furlong_to_µm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_µm_Test2 () { UnitConverter target = new UnitConverter (); @@ -8100,9 +8072,9 @@ public void UnitConverter_ConvertUnits_furlong_to_µm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_in_Test () { UnitConverter target = new UnitConverter (); @@ -8115,9 +8087,9 @@ public void UnitConverter_ConvertUnits_furlong_to_in_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_in_Test2 () { UnitConverter target = new UnitConverter (); @@ -8130,9 +8102,9 @@ public void UnitConverter_ConvertUnits_furlong_to_in_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_cm_Test () { UnitConverter target = new UnitConverter (); @@ -8145,9 +8117,9 @@ public void UnitConverter_ConvertUnits_furlong_to_cm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_cm_Test2 () { UnitConverter target = new UnitConverter (); @@ -8160,9 +8132,9 @@ public void UnitConverter_ConvertUnits_furlong_to_cm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_millimetres_Test () { UnitConverter target = new UnitConverter (); @@ -8175,9 +8147,9 @@ public void UnitConverter_ConvertUnits_furlong_to_millimetres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_furlong_to_millimetres_Test2 () { UnitConverter target = new UnitConverter (); @@ -8193,9 +8165,9 @@ public void UnitConverter_ConvertUnits_furlong_to_millimetres_Test2 () #region "Source as Thou" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_m_Test () { UnitConverter target = new UnitConverter (); @@ -8208,9 +8180,9 @@ public void UnitConverter_ConvertUnits_thou_to_m_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_m_Test2 () { UnitConverter target = new UnitConverter (); @@ -8223,9 +8195,9 @@ public void UnitConverter_ConvertUnits_thou_to_m_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_yd_Test () { UnitConverter target = new UnitConverter (); @@ -8238,9 +8210,9 @@ public void UnitConverter_ConvertUnits_thou_to_yd_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_yd_Test2 () { UnitConverter target = new UnitConverter (); @@ -8253,9 +8225,9 @@ public void UnitConverter_ConvertUnits_thou_to_yd_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_ft_Test () { UnitConverter target = new UnitConverter (); @@ -8268,9 +8240,9 @@ public void UnitConverter_ConvertUnits_thou_to_ft_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_ft_Test2 () { UnitConverter target = new UnitConverter (); @@ -8283,9 +8255,9 @@ public void UnitConverter_ConvertUnits_thou_to_ft_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_mile_Test () { UnitConverter target = new UnitConverter (); @@ -8298,9 +8270,9 @@ public void UnitConverter_ConvertUnits_thou_to_mile_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_mile_Test2 () { UnitConverter target = new UnitConverter (); @@ -8313,9 +8285,9 @@ public void UnitConverter_ConvertUnits_thou_to_mile_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_km_Test () { UnitConverter target = new UnitConverter (); @@ -8328,9 +8300,9 @@ public void UnitConverter_ConvertUnits_thou_to_km_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_km_Test2 () { UnitConverter target = new UnitConverter (); @@ -8343,9 +8315,9 @@ public void UnitConverter_ConvertUnits_thou_to_km_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_Megametres_Test () { UnitConverter target = new UnitConverter (); @@ -8358,9 +8330,9 @@ public void UnitConverter_ConvertUnits_thou_to_Megametres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_Megametres_Test2 () { UnitConverter target = new UnitConverter (); @@ -8373,9 +8345,9 @@ public void UnitConverter_ConvertUnits_thou_to_Megametres_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_Gm_Test () { UnitConverter target = new UnitConverter (); @@ -8388,9 +8360,9 @@ public void UnitConverter_ConvertUnits_thou_to_Gm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_Gm_Test2 () { UnitConverter target = new UnitConverter (); @@ -8403,9 +8375,9 @@ public void UnitConverter_ConvertUnits_thou_to_Gm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_chain_Test () { UnitConverter target = new UnitConverter (); @@ -8418,9 +8390,9 @@ public void UnitConverter_ConvertUnits_thou_to_chain_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_chain_Test2 () { UnitConverter target = new UnitConverter (); @@ -8433,9 +8405,9 @@ public void UnitConverter_ConvertUnits_thou_to_chain_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_in_Test () { UnitConverter target = new UnitConverter (); @@ -8448,9 +8420,9 @@ public void UnitConverter_ConvertUnits_thou_to_in_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_in_Test2 () { UnitConverter target = new UnitConverter (); @@ -8463,9 +8435,9 @@ public void UnitConverter_ConvertUnits_thou_to_in_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_µm_Test () { UnitConverter target = new UnitConverter (); @@ -8478,9 +8450,9 @@ public void UnitConverter_ConvertUnits_thou_to_µm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_µm_Test2 () { UnitConverter target = new UnitConverter (); @@ -8493,9 +8465,9 @@ public void UnitConverter_ConvertUnits_thou_to_µm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_furlong_Test () { UnitConverter target = new UnitConverter (); @@ -8508,9 +8480,9 @@ public void UnitConverter_ConvertUnits_thou_to_furlong_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_furlong_Test2 () { UnitConverter target = new UnitConverter (); @@ -8523,9 +8495,9 @@ public void UnitConverter_ConvertUnits_thou_to_furlong_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_cm_Test () { UnitConverter target = new UnitConverter (); @@ -8538,9 +8510,9 @@ public void UnitConverter_ConvertUnits_thou_to_cm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_cm_Test2 () { UnitConverter target = new UnitConverter (); @@ -8553,9 +8525,9 @@ public void UnitConverter_ConvertUnits_thou_to_cm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_millimetres_Test () { UnitConverter target = new UnitConverter (); @@ -8568,9 +8540,9 @@ public void UnitConverter_ConvertUnits_thou_to_millimetres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_thou_to_millimetres_Test2 () { UnitConverter target = new UnitConverter (); @@ -8586,9 +8558,9 @@ public void UnitConverter_ConvertUnits_thou_to_millimetres_Test2 () #region "Source as Microns" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_m_Test () { UnitConverter target = new UnitConverter (); @@ -8601,9 +8573,9 @@ public void UnitConverter_ConvertUnits_µm_to_m_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_m_Test2 () { UnitConverter target = new UnitConverter (); @@ -8616,9 +8588,9 @@ public void UnitConverter_ConvertUnits_µm_to_m_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_yd_Test () { UnitConverter target = new UnitConverter (); @@ -8631,9 +8603,9 @@ public void UnitConverter_ConvertUnits_µm_to_yd_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_yd_Test2 () { UnitConverter target = new UnitConverter (); @@ -8646,9 +8618,9 @@ public void UnitConverter_ConvertUnits_µm_to_yd_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_ft_Test () { UnitConverter target = new UnitConverter (); @@ -8662,9 +8634,9 @@ public void UnitConverter_ConvertUnits_µm_to_ft_Test () Assert.AreEqual (Result.NoError, actual.ConversionResult); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_ft_Test2 () { UnitConverter target = new UnitConverter (); @@ -8677,9 +8649,9 @@ public void UnitConverter_ConvertUnits_µm_to_ft_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_chain_Test () { UnitConverter target = new UnitConverter (); @@ -8692,9 +8664,9 @@ public void UnitConverter_ConvertUnits_µm_to_chain_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_chain_Test2 () { UnitConverter target = new UnitConverter (); @@ -8707,9 +8679,9 @@ public void UnitConverter_ConvertUnits_µm_to_chain_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_mile_Test () { UnitConverter target = new UnitConverter (); @@ -8722,9 +8694,9 @@ public void UnitConverter_ConvertUnits_µm_to_mile_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_mile_Test2 () { UnitConverter target = new UnitConverter (); @@ -8737,9 +8709,9 @@ public void UnitConverter_ConvertUnits_µm_to_mile_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_km_Test () { UnitConverter target = new UnitConverter (); @@ -8752,9 +8724,9 @@ public void UnitConverter_ConvertUnits_µm_to_km_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_km_Test2 () { UnitConverter target = new UnitConverter (); @@ -8767,9 +8739,9 @@ public void UnitConverter_ConvertUnits_µm_to_km_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_Megametres_Test () { UnitConverter target = new UnitConverter (); @@ -8782,9 +8754,9 @@ public void UnitConverter_ConvertUnits_µm_to_Megametres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_Megametres_Test2 () { UnitConverter target = new UnitConverter (); @@ -8797,9 +8769,9 @@ public void UnitConverter_ConvertUnits_µm_to_Megametres_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_Gm_Test () { UnitConverter target = new UnitConverter (); @@ -8812,9 +8784,9 @@ public void UnitConverter_ConvertUnits_µm_to_Gm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_Gm_Test2 () { UnitConverter target = new UnitConverter (); @@ -8827,9 +8799,9 @@ public void UnitConverter_ConvertUnits_µm_to_Gm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_furlong_Test () { UnitConverter target = new UnitConverter (); @@ -8842,9 +8814,9 @@ public void UnitConverter_ConvertUnits_µm_to_furlong_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_furlong_Test2 () { UnitConverter target = new UnitConverter (); @@ -8857,9 +8829,9 @@ public void UnitConverter_ConvertUnits_µm_to_furlong_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_thou_Test () { UnitConverter target = new UnitConverter (); @@ -8872,9 +8844,9 @@ public void UnitConverter_ConvertUnits_µm_to_thou_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_thou_Test2 () { UnitConverter target = new UnitConverter (); @@ -8887,9 +8859,9 @@ public void UnitConverter_ConvertUnits_µm_to_thou_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_in_Test () { UnitConverter target = new UnitConverter (); @@ -8902,9 +8874,9 @@ public void UnitConverter_ConvertUnits_µm_to_in_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_in_Test2 () { UnitConverter target = new UnitConverter (); @@ -8917,9 +8889,9 @@ public void UnitConverter_ConvertUnits_µm_to_in_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_cm_Test () { UnitConverter target = new UnitConverter (); @@ -8932,9 +8904,9 @@ public void UnitConverter_ConvertUnits_µm_to_cm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_cm_Test2 () { UnitConverter target = new UnitConverter (); @@ -8947,9 +8919,9 @@ public void UnitConverter_ConvertUnits_µm_to_cm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_millimetres_Test () { UnitConverter target = new UnitConverter (); @@ -8962,9 +8934,9 @@ public void UnitConverter_ConvertUnits_µm_to_millimetres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µm_to_millimetres_Test2 () { UnitConverter target = new UnitConverter (); @@ -8980,9 +8952,9 @@ public void UnitConverter_ConvertUnits_µm_to_millimetres_Test2 () #region "Source as Inches" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_m_Test () { UnitConverter target = new UnitConverter (); @@ -8995,9 +8967,9 @@ public void UnitConverter_ConvertUnits_in_to_m_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_m_Test2 () { UnitConverter target = new UnitConverter (); @@ -9010,9 +8982,9 @@ public void UnitConverter_ConvertUnits_in_to_m_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_yd_Test () { UnitConverter target = new UnitConverter (); @@ -9025,9 +8997,9 @@ public void UnitConverter_ConvertUnits_in_to_yd_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_yd_Test2 () { UnitConverter target = new UnitConverter (); @@ -9040,9 +9012,9 @@ public void UnitConverter_ConvertUnits_in_to_yd_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_ft_Test () { UnitConverter target = new UnitConverter (); @@ -9055,9 +9027,9 @@ public void UnitConverter_ConvertUnits_in_to_ft_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_ft_Test2 () { UnitConverter target = new UnitConverter (); @@ -9070,9 +9042,9 @@ public void UnitConverter_ConvertUnits_in_to_ft_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_mile_Test () { UnitConverter target = new UnitConverter (); @@ -9085,9 +9057,9 @@ public void UnitConverter_ConvertUnits_in_to_mile_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_mile_Test2 () { UnitConverter target = new UnitConverter (); @@ -9100,9 +9072,9 @@ public void UnitConverter_ConvertUnits_in_to_mile_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_km_Test () { UnitConverter target = new UnitConverter (); @@ -9115,9 +9087,9 @@ public void UnitConverter_ConvertUnits_in_to_km_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_km_Test2 () { UnitConverter target = new UnitConverter (); @@ -9130,9 +9102,9 @@ public void UnitConverter_ConvertUnits_in_to_km_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_Megametres_Test () { UnitConverter target = new UnitConverter (); @@ -9145,9 +9117,9 @@ public void UnitConverter_ConvertUnits_in_to_Megametres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_Megametres_Test2 () { UnitConverter target = new UnitConverter (); @@ -9160,9 +9132,9 @@ public void UnitConverter_ConvertUnits_in_to_Megametres_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_Gm_Test () { UnitConverter target = new UnitConverter (); @@ -9175,9 +9147,9 @@ public void UnitConverter_ConvertUnits_in_to_Gm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_Gm_Test2 () { UnitConverter target = new UnitConverter (); @@ -9190,9 +9162,9 @@ public void UnitConverter_ConvertUnits_in_to_Gm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_chain_Test () { UnitConverter target = new UnitConverter (); @@ -9205,9 +9177,9 @@ public void UnitConverter_ConvertUnits_in_to_chain_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_chain_Test2 () { UnitConverter target = new UnitConverter (); @@ -9220,9 +9192,9 @@ public void UnitConverter_ConvertUnits_in_to_chain_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_thou_Test () { UnitConverter target = new UnitConverter (); @@ -9235,9 +9207,9 @@ public void UnitConverter_ConvertUnits_in_to_thou_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_thou_Test2 () { UnitConverter target = new UnitConverter (); @@ -9250,9 +9222,9 @@ public void UnitConverter_ConvertUnits_in_to_thou_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_µm_Test () { UnitConverter target = new UnitConverter (); @@ -9265,9 +9237,9 @@ public void UnitConverter_ConvertUnits_in_to_µm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_µm_Test2 () { UnitConverter target = new UnitConverter (); @@ -9280,9 +9252,9 @@ public void UnitConverter_ConvertUnits_in_to_µm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_furlong_Test () { UnitConverter target = new UnitConverter (); @@ -9295,9 +9267,9 @@ public void UnitConverter_ConvertUnits_in_to_furlong_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_furlong_Test2 () { UnitConverter target = new UnitConverter (); @@ -9310,9 +9282,9 @@ public void UnitConverter_ConvertUnits_in_to_furlong_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_cm_Test () { UnitConverter target = new UnitConverter (); @@ -9325,9 +9297,9 @@ public void UnitConverter_ConvertUnits_in_to_cm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_cm_Test2 () { UnitConverter target = new UnitConverter (); @@ -9340,9 +9312,9 @@ public void UnitConverter_ConvertUnits_in_to_cm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_millimetres_Test () { UnitConverter target = new UnitConverter (); @@ -9355,9 +9327,9 @@ public void UnitConverter_ConvertUnits_in_to_millimetres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in_to_millimetres_Test2 () { UnitConverter target = new UnitConverter (); @@ -9373,9 +9345,9 @@ public void UnitConverter_ConvertUnits_in_to_millimetres_Test2 () #region "Source as Centimetres" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_m_Test () { UnitConverter target = new UnitConverter (); @@ -9388,9 +9360,9 @@ public void UnitConverter_ConvertUnits_cm_to_m_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_m_Test2 () { UnitConverter target = new UnitConverter (); @@ -9403,9 +9375,9 @@ public void UnitConverter_ConvertUnits_cm_to_m_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_yd_Test () { UnitConverter target = new UnitConverter (); @@ -9418,9 +9390,9 @@ public void UnitConverter_ConvertUnits_cm_to_yd_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_yd_Test2 () { UnitConverter target = new UnitConverter (); @@ -9433,9 +9405,9 @@ public void UnitConverter_ConvertUnits_cm_to_yd_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_ft_Test () { UnitConverter target = new UnitConverter (); @@ -9449,9 +9421,9 @@ public void UnitConverter_ConvertUnits_cm_to_ft_Test () Assert.AreEqual (Result.NoError, actual.ConversionResult); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_ft_Test2 () { UnitConverter target = new UnitConverter (); @@ -9464,9 +9436,9 @@ public void UnitConverter_ConvertUnits_cm_to_ft_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_chain_Test () { UnitConverter target = new UnitConverter (); @@ -9479,9 +9451,9 @@ public void UnitConverter_ConvertUnits_cm_to_chain_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_chain_Test2 () { UnitConverter target = new UnitConverter (); @@ -9494,9 +9466,9 @@ public void UnitConverter_ConvertUnits_cm_to_chain_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_mile_Test () { UnitConverter target = new UnitConverter (); @@ -9509,9 +9481,9 @@ public void UnitConverter_ConvertUnits_cm_to_mile_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_mile_Test2 () { UnitConverter target = new UnitConverter (); @@ -9524,9 +9496,9 @@ public void UnitConverter_ConvertUnits_cm_to_mile_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_km_Test () { UnitConverter target = new UnitConverter (); @@ -9539,9 +9511,9 @@ public void UnitConverter_ConvertUnits_cm_to_km_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_km_Test2 () { UnitConverter target = new UnitConverter (); @@ -9554,9 +9526,9 @@ public void UnitConverter_ConvertUnits_cm_to_km_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_Megametres_Test () { UnitConverter target = new UnitConverter (); @@ -9569,9 +9541,9 @@ public void UnitConverter_ConvertUnits_cm_to_Megametres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_Megametres_Test2 () { UnitConverter target = new UnitConverter (); @@ -9584,9 +9556,9 @@ public void UnitConverter_ConvertUnits_cm_to_Megametres_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_Gm_Test () { UnitConverter target = new UnitConverter (); @@ -9599,9 +9571,9 @@ public void UnitConverter_ConvertUnits_cm_to_Gm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_Gm_Test2 () { UnitConverter target = new UnitConverter (); @@ -9614,9 +9586,9 @@ public void UnitConverter_ConvertUnits_cm_to_Gm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_furlong_Test () { UnitConverter target = new UnitConverter (); @@ -9629,9 +9601,9 @@ public void UnitConverter_ConvertUnits_cm_to_furlong_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_furlong_Test2 () { UnitConverter target = new UnitConverter (); @@ -9644,9 +9616,9 @@ public void UnitConverter_ConvertUnits_cm_to_furlong_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_thou_Test () { UnitConverter target = new UnitConverter (); @@ -9659,9 +9631,9 @@ public void UnitConverter_ConvertUnits_cm_to_thou_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_thou_Test2 () { UnitConverter target = new UnitConverter (); @@ -9674,9 +9646,9 @@ public void UnitConverter_ConvertUnits_cm_to_thou_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_µm_Test () { UnitConverter target = new UnitConverter (); @@ -9689,9 +9661,9 @@ public void UnitConverter_ConvertUnits_cm_to_µm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_µm_Test2 () { UnitConverter target = new UnitConverter (); @@ -9704,9 +9676,9 @@ public void UnitConverter_ConvertUnits_cm_to_µm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_in_Test () { UnitConverter target = new UnitConverter (); @@ -9719,9 +9691,9 @@ public void UnitConverter_ConvertUnits_cm_to_in_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_in_Test2 () { UnitConverter target = new UnitConverter (); @@ -9734,9 +9706,9 @@ public void UnitConverter_ConvertUnits_cm_to_in_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_millimetres_Test () { UnitConverter target = new UnitConverter (); @@ -9749,9 +9721,9 @@ public void UnitConverter_ConvertUnits_cm_to_millimetres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm_to_millimetres_Test2 () { UnitConverter target = new UnitConverter (); @@ -9767,9 +9739,9 @@ public void UnitConverter_ConvertUnits_cm_to_millimetres_Test2 () #region "Source as Millimetres" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_m_Test () { UnitConverter target = new UnitConverter (); @@ -9782,9 +9754,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_m_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_m_Test2 () { UnitConverter target = new UnitConverter (); @@ -9797,9 +9769,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_m_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_yd_Test () { UnitConverter target = new UnitConverter (); @@ -9812,9 +9784,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_yd_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_yd_Test2 () { UnitConverter target = new UnitConverter (); @@ -9827,9 +9799,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_yd_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_ft_Test () { UnitConverter target = new UnitConverter (); @@ -9843,9 +9815,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_ft_Test () Assert.AreEqual (Result.NoError, actual.ConversionResult); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_ft_Test2 () { UnitConverter target = new UnitConverter (); @@ -9858,9 +9830,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_ft_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_chain_Test () { UnitConverter target = new UnitConverter (); @@ -9873,9 +9845,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_chain_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_chain_Test2 () { UnitConverter target = new UnitConverter (); @@ -9888,9 +9860,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_chain_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_mile_Test () { UnitConverter target = new UnitConverter (); @@ -9903,9 +9875,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_mile_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_mile_Test2 () { UnitConverter target = new UnitConverter (); @@ -9918,9 +9890,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_mile_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_km_Test () { UnitConverter target = new UnitConverter (); @@ -9933,9 +9905,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_km_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_km_Test2 () { UnitConverter target = new UnitConverter (); @@ -9948,9 +9920,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_km_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_Megametres_Test () { UnitConverter target = new UnitConverter (); @@ -9963,9 +9935,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_Megametres_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_Megametres_Test2 () { UnitConverter target = new UnitConverter (); @@ -9978,9 +9950,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_Megametres_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_Gm_Test () { UnitConverter target = new UnitConverter (); @@ -9993,9 +9965,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_Gm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_Gm_Test2 () { UnitConverter target = new UnitConverter (); @@ -10008,9 +9980,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_Gm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_furlong_Test () { UnitConverter target = new UnitConverter (); @@ -10023,9 +9995,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_furlong_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_furlong_Test2 () { UnitConverter target = new UnitConverter (); @@ -10038,9 +10010,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_furlong_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_thou_Test () { UnitConverter target = new UnitConverter (); @@ -10053,9 +10025,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_thou_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_thou_Test2 () { UnitConverter target = new UnitConverter (); @@ -10068,9 +10040,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_thou_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_µm_Test () { UnitConverter target = new UnitConverter (); @@ -10083,9 +10055,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_µm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_µm_Test2 () { UnitConverter target = new UnitConverter (); @@ -10098,9 +10070,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_µm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_in_Test () { UnitConverter target = new UnitConverter (); @@ -10113,9 +10085,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_in_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_in_Test2 () { UnitConverter target = new UnitConverter (); @@ -10128,9 +10100,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_in_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_cm_Test () { UnitConverter target = new UnitConverter (); @@ -10143,9 +10115,9 @@ public void UnitConverter_ConvertUnits_millimetres_to_cm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_millimetres_to_cm_Test2 () { UnitConverter target = new UnitConverter (); @@ -10161,4 +10133,4 @@ public void UnitConverter_ConvertUnits_millimetres_to_cm_Test2 () #endregion #endregion } -} +} \ No newline at end of file diff --git a/Cubico.Tests/UnitConverterTest3.cs b/Cubico.Tests/UnitConverterTest3.cs index e645184..0de3974 100644 --- a/Cubico.Tests/UnitConverterTest3.cs +++ b/Cubico.Tests/UnitConverterTest3.cs @@ -2,56 +2,27 @@ using NUnit.Framework; using Cubico; -namespace Cubico.Test +namespace Cubico.Tests { - [TestClass()] + [TestFixture] public class UnitConverterTest3 { - private TestContext testContextInstance; - private UnitProvider unitPro = new UnitProvider (); - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// + TestContext testContextInstance; + UnitProvider unitPro = new UnitProvider (); + + // Gets or sets the test context which provides information about and functionality for the current test run. public TestContext TestContext { get { return testContextInstance; } set { testContextInstance = value; } } - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ _ - //Public Sub MyTestCleanup() - //End Sub - // - #endregion - #region "UnitConverter.ConvertUnits" - #region "Power Tests" #region "Source as Watts" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Watts_to_Horsepower_Test () { UnitConverter target = new UnitConverter (); @@ -64,9 +35,9 @@ public void UnitConverter_ConvertUnits_Watts_to_Horsepower_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Watts_to_Horsepower_Test2 () { UnitConverter target = new UnitConverter (); @@ -79,9 +50,9 @@ public void UnitConverter_ConvertUnits_Watts_to_Horsepower_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Watts_to_Megawatt_Test () { UnitConverter target = new UnitConverter (); @@ -94,9 +65,9 @@ public void UnitConverter_ConvertUnits_Watts_to_Megawatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Watts_to_Megawatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -109,9 +80,9 @@ public void UnitConverter_ConvertUnits_Watts_to_Megawatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Watts_to_Kilowatt_Test () { UnitConverter target = new UnitConverter (); @@ -124,9 +95,9 @@ public void UnitConverter_ConvertUnits_Watts_to_Kilowatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Watts_to_Kilowatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -139,9 +110,9 @@ public void UnitConverter_ConvertUnits_Watts_to_Kilowatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Watts_to_Microwatt_Test () { UnitConverter target = new UnitConverter (); @@ -154,9 +125,9 @@ public void UnitConverter_ConvertUnits_Watts_to_Microwatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Watts_to_Microwatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -169,9 +140,9 @@ public void UnitConverter_ConvertUnits_Watts_to_Microwatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Watts_to_Nanowatt_Test () { UnitConverter target = new UnitConverter (); @@ -184,9 +155,9 @@ public void UnitConverter_ConvertUnits_Watts_to_Nanowatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Watts_to_Nanowatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -199,9 +170,9 @@ public void UnitConverter_ConvertUnits_Watts_to_Nanowatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Watts_to_MilliWatt_Test () { UnitConverter target = new UnitConverter (); @@ -214,9 +185,9 @@ public void UnitConverter_ConvertUnits_Watts_to_MilliWatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Watts_to_MilliWatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -229,9 +200,9 @@ public void UnitConverter_ConvertUnits_Watts_to_MilliWatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Watts_to_BTUperMin_Test () { UnitConverter target = new UnitConverter (); @@ -244,9 +215,9 @@ public void UnitConverter_ConvertUnits_Watts_to_BTUperMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Watts_to_BTUperMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -259,9 +230,9 @@ public void UnitConverter_ConvertUnits_Watts_to_BTUperMin_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Watts_to_FtLbPerMin_Test () { UnitConverter target = new UnitConverter (); @@ -274,9 +245,9 @@ public void UnitConverter_ConvertUnits_Watts_to_FtLbPerMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Watts_to_FtLbPerMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -292,9 +263,9 @@ public void UnitConverter_ConvertUnits_Watts_to_FtLbPerMin_Test2 () #region "Source as Horsepower" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Horsepower_to_Watts_Test () { UnitConverter target = new UnitConverter (); @@ -307,9 +278,9 @@ public void UnitConverter_ConvertUnits_Horsepower_to_Watts_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Horsepower_to_Watts_Test2 () { UnitConverter target = new UnitConverter (); @@ -322,9 +293,9 @@ public void UnitConverter_ConvertUnits_Horsepower_to_Watts_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Horsepower_to_Megawatt_Test () { UnitConverter target = new UnitConverter (); @@ -337,9 +308,9 @@ public void UnitConverter_ConvertUnits_Horsepower_to_Megawatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Horsepower_to_Megawatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -352,9 +323,9 @@ public void UnitConverter_ConvertUnits_Horsepower_to_Megawatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Horsepower_to_Kilowatt_Test () { UnitConverter target = new UnitConverter (); @@ -367,9 +338,9 @@ public void UnitConverter_ConvertUnits_Horsepower_to_Kilowatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Horsepower_to_Kilowatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -382,9 +353,9 @@ public void UnitConverter_ConvertUnits_Horsepower_to_Kilowatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Horsepower_to_Microwatt_Test () { UnitConverter target = new UnitConverter (); @@ -397,9 +368,9 @@ public void UnitConverter_ConvertUnits_Horsepower_to_Microwatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Horsepower_to_Microwatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -412,9 +383,9 @@ public void UnitConverter_ConvertUnits_Horsepower_to_Microwatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Horsepower_to_Nanowatt_Test () { UnitConverter target = new UnitConverter (); @@ -427,9 +398,9 @@ public void UnitConverter_ConvertUnits_Horsepower_to_Nanowatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Horsepower_to_Nanowatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -442,9 +413,9 @@ public void UnitConverter_ConvertUnits_Horsepower_to_Nanowatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Horsepower_to_MilliWatt_Test () { UnitConverter target = new UnitConverter (); @@ -457,9 +428,9 @@ public void UnitConverter_ConvertUnits_Horsepower_to_MilliWatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Horsepower_to_MilliWatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -472,9 +443,9 @@ public void UnitConverter_ConvertUnits_Horsepower_to_MilliWatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Horsepower_to_BTUperMin_Test () { UnitConverter target = new UnitConverter (); @@ -487,9 +458,9 @@ public void UnitConverter_ConvertUnits_Horsepower_to_BTUperMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Horsepower_to_BTUperMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -502,9 +473,9 @@ public void UnitConverter_ConvertUnits_Horsepower_to_BTUperMin_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Horsepower_to_FtLbPerMin_Test () { UnitConverter target = new UnitConverter (); @@ -517,9 +488,9 @@ public void UnitConverter_ConvertUnits_Horsepower_to_FtLbPerMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Horsepower_to_FtLbPerMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -535,9 +506,9 @@ public void UnitConverter_ConvertUnits_Horsepower_to_FtLbPerMin_Test2 () #region "Source as Megawatts" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megawatts_to_Watts_Test () { UnitConverter target = new UnitConverter (); @@ -550,9 +521,9 @@ public void UnitConverter_ConvertUnits_Megawatts_to_Watts_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megawatts_to_Watts_Test2 () { UnitConverter target = new UnitConverter (); @@ -565,9 +536,9 @@ public void UnitConverter_ConvertUnits_Megawatts_to_Watts_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megawatts_to_Horsepower_Test () { UnitConverter target = new UnitConverter (); @@ -580,9 +551,9 @@ public void UnitConverter_ConvertUnits_Megawatts_to_Horsepower_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megawatts_to_Horsepower_Test2 () { UnitConverter target = new UnitConverter (); @@ -595,9 +566,9 @@ public void UnitConverter_ConvertUnits_Megawatts_to_Horsepower_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megawatts_to_Kilowatt_Test () { UnitConverter target = new UnitConverter (); @@ -610,9 +581,9 @@ public void UnitConverter_ConvertUnits_Megawatts_to_Kilowatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megawatts_to_Kilowatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -625,9 +596,9 @@ public void UnitConverter_ConvertUnits_Megawatts_to_Kilowatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megawatts_to_Microwatt_Test () { UnitConverter target = new UnitConverter (); @@ -640,9 +611,9 @@ public void UnitConverter_ConvertUnits_Megawatts_to_Microwatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megawatts_to_Microwatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -655,9 +626,9 @@ public void UnitConverter_ConvertUnits_Megawatts_to_Microwatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megawatts_to_Nanowatt_Test () { UnitConverter target = new UnitConverter (); @@ -670,9 +641,9 @@ public void UnitConverter_ConvertUnits_Megawatts_to_Nanowatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megawatts_to_Nanowatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -685,9 +656,9 @@ public void UnitConverter_ConvertUnits_Megawatts_to_Nanowatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megawatts_to_MilliWatt_Test () { UnitConverter target = new UnitConverter (); @@ -700,9 +671,9 @@ public void UnitConverter_ConvertUnits_Megawatts_to_MilliWatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megawatts_to_MilliWatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -715,9 +686,9 @@ public void UnitConverter_ConvertUnits_Megawatts_to_MilliWatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megawatts_to_BTUperMin_Test () { UnitConverter target = new UnitConverter (); @@ -730,9 +701,9 @@ public void UnitConverter_ConvertUnits_Megawatts_to_BTUperMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megawatts_to_BTUperMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -745,9 +716,9 @@ public void UnitConverter_ConvertUnits_Megawatts_to_BTUperMin_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megawatts_to_FtLbPerMin_Test () { UnitConverter target = new UnitConverter (); @@ -760,9 +731,9 @@ public void UnitConverter_ConvertUnits_Megawatts_to_FtLbPerMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megawatts_to_FtLbPerMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -778,9 +749,9 @@ public void UnitConverter_ConvertUnits_Megawatts_to_FtLbPerMin_Test2 () #region "Source as Kilowatts" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kilowatts_to_Watts_Test () { UnitConverter target = new UnitConverter (); @@ -793,9 +764,9 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_Watts_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kilowatts_to_Watts_Test2 () { UnitConverter target = new UnitConverter (); @@ -808,9 +779,9 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_Watts_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kilowatts_to_Horsepower_Test () { UnitConverter target = new UnitConverter (); @@ -823,9 +794,9 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_Horsepower_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kilowatts_to_Horsepower_Test2 () { UnitConverter target = new UnitConverter (); @@ -838,9 +809,9 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_Horsepower_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kilowatts_to_Megawatt_Test () { UnitConverter target = new UnitConverter (); @@ -853,9 +824,9 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_Megawatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kilowatts_to_Megawatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -868,9 +839,9 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_Megawatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kilowatts_to_Microwatt_Test () { UnitConverter target = new UnitConverter (); @@ -883,9 +854,9 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_Microwatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kilowatts_to_Microwatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -898,9 +869,9 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_Microwatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kilowatts_to_Nanowatt_Test () { UnitConverter target = new UnitConverter (); @@ -913,9 +884,9 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_Nanowatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kilowatts_to_Nanowatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -928,9 +899,9 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_Nanowatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kilowatts_to_MilliWatt_Test () { UnitConverter target = new UnitConverter (); @@ -943,9 +914,9 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_MilliWatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kilowatts_to_MilliWatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -958,9 +929,9 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_MilliWatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kilowatts_to_BTUperMin_Test () { UnitConverter target = new UnitConverter (); @@ -973,9 +944,9 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_BTUperMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kilowatts_to_BTUperMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -988,9 +959,9 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_BTUperMin_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kilowatts_to_FtLbPerMin_Test () { UnitConverter target = new UnitConverter (); @@ -1003,9 +974,9 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_FtLbPerMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Kilowatts_to_FtLbPerMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -1021,9 +992,9 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_FtLbPerMin_Test2 () #region "Source as Microwatts" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microwatts_to_Watts_Test () { UnitConverter target = new UnitConverter (); @@ -1036,9 +1007,9 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Watts_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microwatts_to_Watts_Test2 () { UnitConverter target = new UnitConverter (); @@ -1051,9 +1022,9 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Watts_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microwatts_to_Horsepower_Test () { UnitConverter target = new UnitConverter (); @@ -1066,9 +1037,9 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Horsepower_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microwatts_to_Horsepower_Test2 () { UnitConverter target = new UnitConverter (); @@ -1081,9 +1052,9 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Horsepower_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microwatts_to_Megawatt_Test () { UnitConverter target = new UnitConverter (); @@ -1096,9 +1067,9 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Megawatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microwatts_to_Megawatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -1112,9 +1083,9 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Megawatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microwatts_to_kikowatt_Test () { UnitConverter target = new UnitConverter (); @@ -1127,9 +1098,9 @@ public void UnitConverter_ConvertUnits_Microwatts_to_kikowatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microwatts_to_Kilowatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -1143,9 +1114,9 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Kilowatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microwatts_to_Nanowatt_Test () { UnitConverter target = new UnitConverter (); @@ -1158,9 +1129,9 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Nanowatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microwatts_to_Nanowatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -1173,9 +1144,9 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Nanowatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microwatts_to_Milliwatt_Test () { UnitConverter target = new UnitConverter (); @@ -1188,9 +1159,9 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Milliwatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microwatts_to_Milliwatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -1203,9 +1174,9 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Milliwatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microwatts_to_BTUperMin_Test () { UnitConverter target = new UnitConverter (); @@ -1218,9 +1189,9 @@ public void UnitConverter_ConvertUnits_Microwatts_to_BTUperMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microwatts_to_BTUperMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -1233,9 +1204,9 @@ public void UnitConverter_ConvertUnits_Microwatts_to_BTUperMin_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microwatts_to_FtLbPerMin_Test () { UnitConverter target = new UnitConverter (); @@ -1248,9 +1219,9 @@ public void UnitConverter_ConvertUnits_Microwatts_to_FtLbPerMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Microwatts_to_FtLbPerMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -1266,9 +1237,9 @@ public void UnitConverter_ConvertUnits_Microwatts_to_FtLbPerMin_Test2 () #region "Source as Nanowatts" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Nanowatts_to_Watts_Test () { UnitConverter target = new UnitConverter (); @@ -1281,9 +1252,9 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Watts_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Nanowatts_to_Watts_Test2 () { UnitConverter target = new UnitConverter (); @@ -1297,9 +1268,9 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Watts_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Nanowatts_to_Horsepower_Test () { UnitConverter target = new UnitConverter (); @@ -1312,9 +1283,9 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Horsepower_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Nanowatts_to_Horsepower_Test2 () { UnitConverter target = new UnitConverter (); @@ -1327,9 +1298,9 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Horsepower_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Nanowatts_to_Megawatt_Test () { UnitConverter target = new UnitConverter (); @@ -1342,9 +1313,9 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Megawatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Nanowatts_to_Megawatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -1358,9 +1329,9 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Megawatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Nanowatts_to_Kilowatt_Test () { UnitConverter target = new UnitConverter (); @@ -1373,9 +1344,9 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Kilowatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Nanowatts_to_Kilowatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -1389,9 +1360,9 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Kilowatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Nanowatts_to_Microwatt_Test () { UnitConverter target = new UnitConverter (); @@ -1404,9 +1375,9 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Microwatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Nanowatts_to_Microwatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -1419,9 +1390,9 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Microwatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Nanowatts_to_Milliwatt_Test () { UnitConverter target = new UnitConverter (); @@ -1434,9 +1405,9 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Milliwatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Nanowatts_to_Milliwatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -1449,9 +1420,9 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Milliwatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Nanowatts_to_BTUperMin_Test () { UnitConverter target = new UnitConverter (); @@ -1464,9 +1435,9 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_BTUperMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Nanowatts_to_BTUperMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -1479,9 +1450,9 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_BTUperMin_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Nanowatts_to_FtLbPerMin_Test () { UnitConverter target = new UnitConverter (); @@ -1494,9 +1465,9 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_FtLbPerMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Nanowatts_to_FtLbPerMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -1512,9 +1483,9 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_FtLbPerMin_Test2 () #region "Source as Milliwatts" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Milliwatts_to_Watts_Test () { UnitConverter target = new UnitConverter (); @@ -1527,9 +1498,9 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Watts_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Milliwatts_to_Watts_Test2 () { UnitConverter target = new UnitConverter (); @@ -1542,9 +1513,9 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Watts_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Milliwatts_to_Horsepower_Test () { UnitConverter target = new UnitConverter (); @@ -1557,9 +1528,9 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Horsepower_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Milliwatts_to_Horsepower_Test2 () { UnitConverter target = new UnitConverter (); @@ -1572,9 +1543,9 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Horsepower_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Milliwatts_to_Megawatt_Test () { UnitConverter target = new UnitConverter (); @@ -1587,9 +1558,9 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Megawatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Milliwatts_to_Megawatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -1603,9 +1574,9 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Megawatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Milliwatts_to_Kilowatt_Test () { UnitConverter target = new UnitConverter (); @@ -1618,9 +1589,9 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Kilowatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Milliwatts_to_Kilowatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -1633,9 +1604,9 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Kilowatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Milliwatts_to_Microwatt_Test () { UnitConverter target = new UnitConverter (); @@ -1648,9 +1619,9 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Microwatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Milliwatts_to_Microwatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -1663,9 +1634,9 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Microwatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Milliwatts_to_Nanowatt_Test () { UnitConverter target = new UnitConverter (); @@ -1678,9 +1649,9 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Nanowatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Milliwatts_to_Nanowatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -1693,9 +1664,9 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Nanowatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Milliwatts_to_BTUperMin_Test () { UnitConverter target = new UnitConverter (); @@ -1708,9 +1679,9 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_BTUperMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Milliwatts_to_BTUperMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -1723,9 +1694,9 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_BTUperMin_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Milliwatts_to_FtLbPerMin_Test () { UnitConverter target = new UnitConverter (); @@ -1738,9 +1709,9 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_FtLbPerMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Milliwatts_to_FtLbPerMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -1756,9 +1727,9 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_FtLbPerMin_Test2 () #region "Source as BTU/min" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_BTUperMin_to_Watts_Test () { UnitConverter target = new UnitConverter (); @@ -1771,9 +1742,9 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Watts_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_BTUperMin_to_Watts_Test2 () { UnitConverter target = new UnitConverter (); @@ -1786,9 +1757,9 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Watts_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_BTUperMin_to_Horsepower_Test () { UnitConverter target = new UnitConverter (); @@ -1801,9 +1772,9 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Horsepower_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_BTUperMin_to_Horsepower_Test2 () { UnitConverter target = new UnitConverter (); @@ -1816,9 +1787,9 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Horsepower_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_BTUperMin_to_Megawatt_Test () { UnitConverter target = new UnitConverter (); @@ -1831,9 +1802,9 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Megawatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_BTUperMin_to_Megawatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -1846,9 +1817,9 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Megawatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_BTUperMin_to_Kilowatt_Test () { UnitConverter target = new UnitConverter (); @@ -1861,9 +1832,9 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Kilowatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_BTUperMin_to_Kilowatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -1876,9 +1847,9 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Kilowatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_BTUperMin_to_Microwatt_Test () { UnitConverter target = new UnitConverter (); @@ -1891,9 +1862,9 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Microwatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_BTUperMin_to_Microwatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -1906,9 +1877,9 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Microwatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_BTUperMin_to_Nanowatt_Test () { UnitConverter target = new UnitConverter (); @@ -1921,9 +1892,9 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Nanowatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_BTUperMin_to_Nanowatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -1936,9 +1907,9 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Nanowatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_BTUperMin_to_Milliwatts_Test () { UnitConverter target = new UnitConverter (); @@ -1951,9 +1922,9 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Milliwatts_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_BTUperMin_to_Milliwatts_Test2 () { UnitConverter target = new UnitConverter (); @@ -1966,9 +1937,9 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Milliwatts_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_BTUperMin_to_FtLbPerMin_Test () { UnitConverter target = new UnitConverter (); @@ -1981,9 +1952,9 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_FtLbPerMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_BTUperMin_to_FtLbPerMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -1999,9 +1970,9 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_FtLbPerMin_Test2 () #region "Source as ft lb/min" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtLbPerMin_to_Watts_Test () { UnitConverter target = new UnitConverter (); @@ -2014,9 +1985,9 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Watts_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtLbPerMin_to_Watts_Test2 () { UnitConverter target = new UnitConverter (); @@ -2029,9 +2000,9 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Watts_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtLbPerMin_to_Horsepower_Test () { UnitConverter target = new UnitConverter (); @@ -2044,9 +2015,9 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Horsepower_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtLbPerMin_to_Horsepower_Test2 () { UnitConverter target = new UnitConverter (); @@ -2059,9 +2030,9 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Horsepower_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtLbPerMin_to_Megawatt_Test () { UnitConverter target = new UnitConverter (); @@ -2074,9 +2045,9 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Megawatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtLbPerMin_to_Megawatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -2089,9 +2060,9 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Megawatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtLbPerMin_to_Kilowatt_Test () { UnitConverter target = new UnitConverter (); @@ -2104,9 +2075,9 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Kilowatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtLbPerMin_to_Kilowatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -2119,9 +2090,9 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Kilowatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtLbPerMin_to_Microwatt_Test () { UnitConverter target = new UnitConverter (); @@ -2134,9 +2105,9 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Microwatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtLbPerMin_to_Microwatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -2149,9 +2120,9 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Microwatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtLbPerMin_to_Nanowatt_Test () { UnitConverter target = new UnitConverter (); @@ -2164,9 +2135,9 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Nanowatt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtLbPerMin_to_Nanowatt_Test2 () { UnitConverter target = new UnitConverter (); @@ -2179,9 +2150,9 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Nanowatt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtLbPerMin_to_Milliwatts_Test () { UnitConverter target = new UnitConverter (); @@ -2194,9 +2165,9 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Milliwatts_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtLbPerMin_to_Milliwatts_Test2 () { UnitConverter target = new UnitConverter (); @@ -2209,9 +2180,9 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Milliwatts_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtLbPerMin_to_BTUperMin_Test () { UnitConverter target = new UnitConverter (); @@ -2224,9 +2195,9 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_BTUperMin_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_FtLbPerMin_to_BTUperMin_Test2 () { UnitConverter target = new UnitConverter (); @@ -2243,9 +2214,9 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_BTUperMin_Test2 () #region "Energy Tests" #region "Source as Joule" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_J_to_erg_Test () { UnitConverter target = new UnitConverter (); @@ -2258,9 +2229,9 @@ public void UnitConverter_ConvertUnits_J_to_erg_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_J_to_erg_Test2 () { UnitConverter target = new UnitConverter (); @@ -2273,9 +2244,9 @@ public void UnitConverter_ConvertUnits_J_to_erg_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_J_to_cal_Test () { UnitConverter target = new UnitConverter (); @@ -2288,9 +2259,9 @@ public void UnitConverter_ConvertUnits_J_to_cal_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_J_to_cal_Test2 () { UnitConverter target = new UnitConverter (); @@ -2303,9 +2274,9 @@ public void UnitConverter_ConvertUnits_J_to_cal_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_J_to_Btu_Test () { UnitConverter target = new UnitConverter (); @@ -2318,9 +2289,9 @@ public void UnitConverter_ConvertUnits_J_to_Btu_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_J_to_Btu_Test2 () { UnitConverter target = new UnitConverter (); @@ -2333,9 +2304,9 @@ public void UnitConverter_ConvertUnits_J_to_Btu_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_J_to_therm_Test () { UnitConverter target = new UnitConverter (); @@ -2348,9 +2319,9 @@ public void UnitConverter_ConvertUnits_J_to_therm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_J_to_therm_Test2 () { UnitConverter target = new UnitConverter (); @@ -2363,9 +2334,9 @@ public void UnitConverter_ConvertUnits_J_to_therm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_J_to_mJ_Test () { UnitConverter target = new UnitConverter (); @@ -2378,9 +2349,9 @@ public void UnitConverter_ConvertUnits_J_to_mJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_J_to_mJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -2393,9 +2364,9 @@ public void UnitConverter_ConvertUnits_J_to_mJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_J_to_Megajoule_Test () { UnitConverter target = new UnitConverter (); @@ -2408,9 +2379,9 @@ public void UnitConverter_ConvertUnits_J_to_Megajoule_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_J_to_Megajoule_Test2 () { UnitConverter target = new UnitConverter (); @@ -2423,9 +2394,9 @@ public void UnitConverter_ConvertUnits_J_to_Megajoule_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_J_to_kJ_Test () { UnitConverter target = new UnitConverter (); @@ -2438,9 +2409,9 @@ public void UnitConverter_ConvertUnits_J_to_kJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_J_to_kJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -2453,9 +2424,9 @@ public void UnitConverter_ConvertUnits_J_to_kJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_J_to_GJ_Test () { UnitConverter target = new UnitConverter (); @@ -2468,9 +2439,9 @@ public void UnitConverter_ConvertUnits_J_to_GJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_J_to_GJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -2484,9 +2455,9 @@ public void UnitConverter_ConvertUnits_J_to_GJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_J_to_µJ_Test () { UnitConverter target = new UnitConverter (); @@ -2499,9 +2470,9 @@ public void UnitConverter_ConvertUnits_J_to_µJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_J_to_µJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -2514,9 +2485,9 @@ public void UnitConverter_ConvertUnits_J_to_µJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_J_to_nJ_Test () { UnitConverter target = new UnitConverter (); @@ -2529,9 +2500,9 @@ public void UnitConverter_ConvertUnits_J_to_nJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_J_to_nJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -2546,9 +2517,9 @@ public void UnitConverter_ConvertUnits_J_to_nJ_Test2 () #endregion #region "Source as Energy (erg)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_erg_to_J_Test () { UnitConverter target = new UnitConverter (); @@ -2561,9 +2532,9 @@ public void UnitConverter_ConvertUnits_erg_to_J_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_erg_to_J_Test2 () { UnitConverter target = new UnitConverter (); @@ -2576,9 +2547,9 @@ public void UnitConverter_ConvertUnits_erg_to_J_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_erg_to_cal_Test () { UnitConverter target = new UnitConverter (); @@ -2591,9 +2562,9 @@ public void UnitConverter_ConvertUnits_erg_to_cal_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_erg_to_cal_Test2 () { UnitConverter target = new UnitConverter (); @@ -2606,9 +2577,9 @@ public void UnitConverter_ConvertUnits_erg_to_cal_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_erg_to_Btu_Test () { UnitConverter target = new UnitConverter (); @@ -2621,9 +2592,9 @@ public void UnitConverter_ConvertUnits_erg_to_Btu_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_erg_to_Btu_Test2 () { UnitConverter target = new UnitConverter (); @@ -2636,9 +2607,9 @@ public void UnitConverter_ConvertUnits_erg_to_Btu_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_erg_to_therm_Test () { UnitConverter target = new UnitConverter (); @@ -2651,9 +2622,9 @@ public void UnitConverter_ConvertUnits_erg_to_therm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_erg_to_therm_Test2 () { UnitConverter target = new UnitConverter (); @@ -2667,9 +2638,9 @@ public void UnitConverter_ConvertUnits_erg_to_therm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_erg_to_mJ_Test () { UnitConverter target = new UnitConverter (); @@ -2682,9 +2653,9 @@ public void UnitConverter_ConvertUnits_erg_to_mJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_erg_to_mJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -2697,9 +2668,9 @@ public void UnitConverter_ConvertUnits_erg_to_mJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_erg_to_Megajoule_Test () { UnitConverter target = new UnitConverter (); @@ -2712,9 +2683,9 @@ public void UnitConverter_ConvertUnits_erg_to_Megajoule_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_erg_to_Megajoule_Test2 () { UnitConverter target = new UnitConverter (); @@ -2728,9 +2699,9 @@ public void UnitConverter_ConvertUnits_erg_to_Megajoule_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_erg_to_kJ_Test () { UnitConverter target = new UnitConverter (); @@ -2743,9 +2714,9 @@ public void UnitConverter_ConvertUnits_erg_to_kJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_erg_to_kJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -2759,9 +2730,9 @@ public void UnitConverter_ConvertUnits_erg_to_kJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_erg_to_GJ_Test () { UnitConverter target = new UnitConverter (); @@ -2774,9 +2745,9 @@ public void UnitConverter_ConvertUnits_erg_to_GJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_erg_to_GJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -2790,9 +2761,9 @@ public void UnitConverter_ConvertUnits_erg_to_GJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_erg_to_µJ_Test () { UnitConverter target = new UnitConverter (); @@ -2805,9 +2776,9 @@ public void UnitConverter_ConvertUnits_erg_to_µJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_erg_to_µJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -2820,9 +2791,9 @@ public void UnitConverter_ConvertUnits_erg_to_µJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_erg_to_nJ_Test () { UnitConverter target = new UnitConverter (); @@ -2835,9 +2806,9 @@ public void UnitConverter_ConvertUnits_erg_to_nJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_erg_to_nJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -2852,9 +2823,9 @@ public void UnitConverter_ConvertUnits_erg_to_nJ_Test2 () #endregion #region "Source as Calorie (cal)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cal_to_J_Test () { UnitConverter target = new UnitConverter (); @@ -2867,9 +2838,9 @@ public void UnitConverter_ConvertUnits_cal_to_J_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cal_to_J_Test2 () { UnitConverter target = new UnitConverter (); @@ -2882,9 +2853,9 @@ public void UnitConverter_ConvertUnits_cal_to_J_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cal_to_erg_Test () { UnitConverter target = new UnitConverter (); @@ -2897,9 +2868,9 @@ public void UnitConverter_ConvertUnits_cal_to_erg_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cal_to_erg_Test2 () { UnitConverter target = new UnitConverter (); @@ -2912,9 +2883,9 @@ public void UnitConverter_ConvertUnits_cal_to_erg_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cal_to_Btu_Test () { UnitConverter target = new UnitConverter (); @@ -2927,9 +2898,9 @@ public void UnitConverter_ConvertUnits_cal_to_Btu_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cal_to_Btu_Test2 () { UnitConverter target = new UnitConverter (); @@ -2942,9 +2913,9 @@ public void UnitConverter_ConvertUnits_cal_to_Btu_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cal_to_therm_Test () { UnitConverter target = new UnitConverter (); @@ -2957,9 +2928,9 @@ public void UnitConverter_ConvertUnits_cal_to_therm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cal_to_therm_Test2 () { UnitConverter target = new UnitConverter (); @@ -2972,9 +2943,9 @@ public void UnitConverter_ConvertUnits_cal_to_therm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cal_to_mJ_Test () { UnitConverter target = new UnitConverter (); @@ -2987,9 +2958,9 @@ public void UnitConverter_ConvertUnits_cal_to_mJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cal_to_mJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -3002,9 +2973,9 @@ public void UnitConverter_ConvertUnits_cal_to_mJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cal_to_Megajoule_Test () { UnitConverter target = new UnitConverter (); @@ -3017,9 +2988,9 @@ public void UnitConverter_ConvertUnits_cal_to_Megajoule_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cal_to_Megajoule_Test2 () { UnitConverter target = new UnitConverter (); @@ -3032,9 +3003,9 @@ public void UnitConverter_ConvertUnits_cal_to_Megajoule_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cal_to_kJ_Test () { UnitConverter target = new UnitConverter (); @@ -3047,9 +3018,9 @@ public void UnitConverter_ConvertUnits_cal_to_kJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cal_to_kJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -3062,9 +3033,9 @@ public void UnitConverter_ConvertUnits_cal_to_kJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cal_to_GJ_Test () { UnitConverter target = new UnitConverter (); @@ -3077,9 +3048,9 @@ public void UnitConverter_ConvertUnits_cal_to_GJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cal_to_GJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -3092,9 +3063,9 @@ public void UnitConverter_ConvertUnits_cal_to_GJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cal_to_µJ_Test () { UnitConverter target = new UnitConverter (); @@ -3107,9 +3078,9 @@ public void UnitConverter_ConvertUnits_cal_to_µJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cal_to_µJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -3122,9 +3093,9 @@ public void UnitConverter_ConvertUnits_cal_to_µJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cal_to_nJ_Test () { UnitConverter target = new UnitConverter (); @@ -3137,9 +3108,9 @@ public void UnitConverter_ConvertUnits_cal_to_nJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cal_to_nJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -3154,9 +3125,9 @@ public void UnitConverter_ConvertUnits_cal_to_nJ_Test2 () #endregion #region "Source as British thermal unit (Btu)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Btu_to_J_Test () { UnitConverter target = new UnitConverter (); @@ -3169,9 +3140,9 @@ public void UnitConverter_ConvertUnits_Btu_to_J_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Btu_to_J_Test2 () { UnitConverter target = new UnitConverter (); @@ -3184,9 +3155,9 @@ public void UnitConverter_ConvertUnits_Btu_to_J_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Btu_to_erg_Test () { UnitConverter target = new UnitConverter (); @@ -3199,9 +3170,9 @@ public void UnitConverter_ConvertUnits_Btu_to_erg_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Btu_to_erg_Test2 () { UnitConverter target = new UnitConverter (); @@ -3214,9 +3185,9 @@ public void UnitConverter_ConvertUnits_Btu_to_erg_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Btu_to_cal_Test () { UnitConverter target = new UnitConverter (); @@ -3229,9 +3200,9 @@ public void UnitConverter_ConvertUnits_Btu_to_cal_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Btu_to_cal_Test2 () { UnitConverter target = new UnitConverter (); @@ -3244,9 +3215,9 @@ public void UnitConverter_ConvertUnits_Btu_to_cal_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Btu_to_therm_Test () { UnitConverter target = new UnitConverter (); @@ -3259,9 +3230,9 @@ public void UnitConverter_ConvertUnits_Btu_to_therm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Btu_to_therm_Test2 () { UnitConverter target = new UnitConverter (); @@ -3274,9 +3245,9 @@ public void UnitConverter_ConvertUnits_Btu_to_therm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Btu_to_mJ_Test () { UnitConverter target = new UnitConverter (); @@ -3289,9 +3260,9 @@ public void UnitConverter_ConvertUnits_Btu_to_mJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Btu_to_mJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -3304,9 +3275,9 @@ public void UnitConverter_ConvertUnits_Btu_to_mJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Btu_to_Megajoule_Test () { UnitConverter target = new UnitConverter (); @@ -3319,9 +3290,9 @@ public void UnitConverter_ConvertUnits_Btu_to_Megajoule_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Btu_to_Megajoule_Test2 () { UnitConverter target = new UnitConverter (); @@ -3334,9 +3305,9 @@ public void UnitConverter_ConvertUnits_Btu_to_Megajoule_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Btu_to_kJ_Test () { UnitConverter target = new UnitConverter (); @@ -3349,9 +3320,9 @@ public void UnitConverter_ConvertUnits_Btu_to_kJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Btu_to_kJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -3364,9 +3335,9 @@ public void UnitConverter_ConvertUnits_Btu_to_kJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Btu_to_GJ_Test () { UnitConverter target = new UnitConverter (); @@ -3379,9 +3350,9 @@ public void UnitConverter_ConvertUnits_Btu_to_GJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Btu_to_GJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -3394,9 +3365,9 @@ public void UnitConverter_ConvertUnits_Btu_to_GJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Btu_to_µJ_Test () { UnitConverter target = new UnitConverter (); @@ -3409,9 +3380,9 @@ public void UnitConverter_ConvertUnits_Btu_to_µJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Btu_to_µJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -3424,9 +3395,9 @@ public void UnitConverter_ConvertUnits_Btu_to_µJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Btu_to_nJ_Test () { UnitConverter target = new UnitConverter (); @@ -3439,9 +3410,9 @@ public void UnitConverter_ConvertUnits_Btu_to_nJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Btu_to_nJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -3456,9 +3427,9 @@ public void UnitConverter_ConvertUnits_Btu_to_nJ_Test2 () #endregion #region "Source as Therm (therm)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_therm_to_J_Test () { UnitConverter target = new UnitConverter (); @@ -3471,9 +3442,9 @@ public void UnitConverter_ConvertUnits_therm_to_J_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_therm_to_J_Test2 () { UnitConverter target = new UnitConverter (); @@ -3486,9 +3457,9 @@ public void UnitConverter_ConvertUnits_therm_to_J_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_therm_to_erg_Test () { UnitConverter target = new UnitConverter (); @@ -3501,9 +3472,9 @@ public void UnitConverter_ConvertUnits_therm_to_erg_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_therm_to_erg_Test2 () { UnitConverter target = new UnitConverter (); @@ -3516,9 +3487,9 @@ public void UnitConverter_ConvertUnits_therm_to_erg_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_therm_to_cal_Test () { UnitConverter target = new UnitConverter (); @@ -3531,9 +3502,9 @@ public void UnitConverter_ConvertUnits_therm_to_cal_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_therm_to_cal_Test2 () { UnitConverter target = new UnitConverter (); @@ -3546,9 +3517,9 @@ public void UnitConverter_ConvertUnits_therm_to_cal_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_therm_to_Btu_Test () { UnitConverter target = new UnitConverter (); @@ -3561,9 +3532,9 @@ public void UnitConverter_ConvertUnits_therm_to_Btu_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_therm_to_Btu_Test2 () { UnitConverter target = new UnitConverter (); @@ -3576,9 +3547,9 @@ public void UnitConverter_ConvertUnits_therm_to_Btu_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_therm_to_mJ_Test () { UnitConverter target = new UnitConverter (); @@ -3591,9 +3562,9 @@ public void UnitConverter_ConvertUnits_therm_to_mJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_therm_to_mJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -3606,9 +3577,9 @@ public void UnitConverter_ConvertUnits_therm_to_mJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_therm_to_Megajoule_Test () { UnitConverter target = new UnitConverter (); @@ -3621,9 +3592,9 @@ public void UnitConverter_ConvertUnits_therm_to_Megajoule_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_therm_to_Megajoule_Test2 () { UnitConverter target = new UnitConverter (); @@ -3636,9 +3607,9 @@ public void UnitConverter_ConvertUnits_therm_to_Megajoule_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_therm_to_kJ_Test () { UnitConverter target = new UnitConverter (); @@ -3651,9 +3622,9 @@ public void UnitConverter_ConvertUnits_therm_to_kJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_therm_to_kJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -3666,9 +3637,9 @@ public void UnitConverter_ConvertUnits_therm_to_kJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_therm_to_GJ_Test () { UnitConverter target = new UnitConverter (); @@ -3681,9 +3652,9 @@ public void UnitConverter_ConvertUnits_therm_to_GJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_therm_to_GJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -3696,9 +3667,9 @@ public void UnitConverter_ConvertUnits_therm_to_GJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_therm_to_µJ_Test () { UnitConverter target = new UnitConverter (); @@ -3711,9 +3682,9 @@ public void UnitConverter_ConvertUnits_therm_to_µJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_therm_to_µJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -3726,9 +3697,9 @@ public void UnitConverter_ConvertUnits_therm_to_µJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_therm_to_nJ_Test () { UnitConverter target = new UnitConverter (); @@ -3741,9 +3712,9 @@ public void UnitConverter_ConvertUnits_therm_to_nJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_therm_to_nJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -3758,9 +3729,9 @@ public void UnitConverter_ConvertUnits_therm_to_nJ_Test2 () #endregion #region "Source as Millijoules (mJ)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mJ_to_J_Test () { UnitConverter target = new UnitConverter (); @@ -3773,9 +3744,9 @@ public void UnitConverter_ConvertUnits_mJ_to_J_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mJ_to_J_Test2 () { UnitConverter target = new UnitConverter (); @@ -3789,9 +3760,9 @@ public void UnitConverter_ConvertUnits_mJ_to_J_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mJ_to_erg_Test () { UnitConverter target = new UnitConverter (); @@ -3804,9 +3775,9 @@ public void UnitConverter_ConvertUnits_mJ_to_erg_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mJ_to_erg_Test2 () { UnitConverter target = new UnitConverter (); @@ -3819,9 +3790,9 @@ public void UnitConverter_ConvertUnits_mJ_to_erg_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mJ_to_cal_Test () { UnitConverter target = new UnitConverter (); @@ -3834,9 +3805,9 @@ public void UnitConverter_ConvertUnits_mJ_to_cal_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mJ_to_cal_Test2 () { UnitConverter target = new UnitConverter (); @@ -3849,9 +3820,9 @@ public void UnitConverter_ConvertUnits_mJ_to_cal_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mJ_to_Btu_Test () { UnitConverter target = new UnitConverter (); @@ -3864,9 +3835,9 @@ public void UnitConverter_ConvertUnits_mJ_to_Btu_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mJ_to_Btu_Test2 () { UnitConverter target = new UnitConverter (); @@ -3879,9 +3850,9 @@ public void UnitConverter_ConvertUnits_mJ_to_Btu_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mJ_to_therm_Test () { UnitConverter target = new UnitConverter (); @@ -3894,9 +3865,9 @@ public void UnitConverter_ConvertUnits_mJ_to_therm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mJ_to_therm_Test2 () { UnitConverter target = new UnitConverter (); @@ -3909,9 +3880,9 @@ public void UnitConverter_ConvertUnits_mJ_to_therm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mJ_to_Megajoule_Test () { UnitConverter target = new UnitConverter (); @@ -3924,9 +3895,9 @@ public void UnitConverter_ConvertUnits_mJ_to_Megajoule_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mJ_to_Megajoule_Test2 () { UnitConverter target = new UnitConverter (); @@ -3940,9 +3911,9 @@ public void UnitConverter_ConvertUnits_mJ_to_Megajoule_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mJ_to_kJ_Test () { UnitConverter target = new UnitConverter (); @@ -3955,9 +3926,9 @@ public void UnitConverter_ConvertUnits_mJ_to_kJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mJ_to_kJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -3970,9 +3941,9 @@ public void UnitConverter_ConvertUnits_mJ_to_kJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mJ_to_GJ_Test () { UnitConverter target = new UnitConverter (); @@ -3985,9 +3956,9 @@ public void UnitConverter_ConvertUnits_mJ_to_GJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mJ_to_GJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -4001,9 +3972,9 @@ public void UnitConverter_ConvertUnits_mJ_to_GJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mJ_to_µJ_Test () { UnitConverter target = new UnitConverter (); @@ -4016,9 +3987,9 @@ public void UnitConverter_ConvertUnits_mJ_to_µJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mJ_to_µJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -4031,9 +4002,9 @@ public void UnitConverter_ConvertUnits_mJ_to_µJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mJ_to_nJ_Test () { UnitConverter target = new UnitConverter (); @@ -4046,9 +4017,9 @@ public void UnitConverter_ConvertUnits_mJ_to_nJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mJ_to_nJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -4063,9 +4034,9 @@ public void UnitConverter_ConvertUnits_mJ_to_nJ_Test2 () #endregion #region "Source as Megajoules (MJ)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megajoule_to_J_Test () { UnitConverter target = new UnitConverter (); @@ -4078,9 +4049,9 @@ public void UnitConverter_ConvertUnits_Megajoule_to_J_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megajoule_to_J_Test2 () { UnitConverter target = new UnitConverter (); @@ -4093,9 +4064,9 @@ public void UnitConverter_ConvertUnits_Megajoule_to_J_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megajoule_to_erg_Test () { UnitConverter target = new UnitConverter (); @@ -4108,9 +4079,9 @@ public void UnitConverter_ConvertUnits_Megajoule_to_erg_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megajoule_to_erg_Test2 () { UnitConverter target = new UnitConverter (); @@ -4123,9 +4094,9 @@ public void UnitConverter_ConvertUnits_Megajoule_to_erg_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megajoule_to_cal_Test () { UnitConverter target = new UnitConverter (); @@ -4138,9 +4109,9 @@ public void UnitConverter_ConvertUnits_Megajoule_to_cal_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megajoule_to_cal_Test2 () { UnitConverter target = new UnitConverter (); @@ -4153,9 +4124,9 @@ public void UnitConverter_ConvertUnits_Megajoule_to_cal_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megajoule_to_Btu_Test () { UnitConverter target = new UnitConverter (); @@ -4168,9 +4139,9 @@ public void UnitConverter_ConvertUnits_Megajoule_to_Btu_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megajoule_to_Btu_Test2 () { UnitConverter target = new UnitConverter (); @@ -4183,9 +4154,9 @@ public void UnitConverter_ConvertUnits_Megajoule_to_Btu_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megajoule_to_therm_Test () { UnitConverter target = new UnitConverter (); @@ -4198,9 +4169,9 @@ public void UnitConverter_ConvertUnits_Megajoule_to_therm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megajoule_to_therm_Test2 () { UnitConverter target = new UnitConverter (); @@ -4213,9 +4184,9 @@ public void UnitConverter_ConvertUnits_Megajoule_to_therm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megajoule_to_mJ_Test () { UnitConverter target = new UnitConverter (); @@ -4228,9 +4199,9 @@ public void UnitConverter_ConvertUnits_Megajoule_to_mJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megajoule_to_mJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -4243,9 +4214,9 @@ public void UnitConverter_ConvertUnits_Megajoule_to_mJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megajoule_to_kJ_Test () { UnitConverter target = new UnitConverter (); @@ -4258,9 +4229,9 @@ public void UnitConverter_ConvertUnits_Megajoule_to_kJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megajoule_to_kJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -4273,9 +4244,9 @@ public void UnitConverter_ConvertUnits_Megajoule_to_kJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megajoule_to_GJ_Test () { UnitConverter target = new UnitConverter (); @@ -4288,9 +4259,9 @@ public void UnitConverter_ConvertUnits_Megajoule_to_GJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megajoule_to_GJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -4303,9 +4274,9 @@ public void UnitConverter_ConvertUnits_Megajoule_to_GJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megajoule_to_µJ_Test () { UnitConverter target = new UnitConverter (); @@ -4318,9 +4289,9 @@ public void UnitConverter_ConvertUnits_Megajoule_to_µJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megajoule_to_µJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -4333,9 +4304,9 @@ public void UnitConverter_ConvertUnits_Megajoule_to_µJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megajoule_to_nJ_Test () { UnitConverter target = new UnitConverter (); @@ -4348,9 +4319,9 @@ public void UnitConverter_ConvertUnits_Megajoule_to_nJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Megajoule_to_nJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -4365,9 +4336,9 @@ public void UnitConverter_ConvertUnits_Megajoule_to_nJ_Test2 () #endregion #region "Source as Kilojoules (kJ)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kJ_to_J_Test () { UnitConverter target = new UnitConverter (); @@ -4380,9 +4351,9 @@ public void UnitConverter_ConvertUnits_kJ_to_J_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kJ_to_J_Test2 () { UnitConverter target = new UnitConverter (); @@ -4395,9 +4366,9 @@ public void UnitConverter_ConvertUnits_kJ_to_J_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kJ_to_erg_Test () { UnitConverter target = new UnitConverter (); @@ -4410,9 +4381,9 @@ public void UnitConverter_ConvertUnits_kJ_to_erg_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kJ_to_erg_Test2 () { UnitConverter target = new UnitConverter (); @@ -4425,9 +4396,9 @@ public void UnitConverter_ConvertUnits_kJ_to_erg_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kJ_to_cal_Test () { UnitConverter target = new UnitConverter (); @@ -4440,9 +4411,9 @@ public void UnitConverter_ConvertUnits_kJ_to_cal_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kJ_to_cal_Test2 () { UnitConverter target = new UnitConverter (); @@ -4455,9 +4426,9 @@ public void UnitConverter_ConvertUnits_kJ_to_cal_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kJ_to_Btu_Test () { UnitConverter target = new UnitConverter (); @@ -4470,9 +4441,9 @@ public void UnitConverter_ConvertUnits_kJ_to_Btu_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kJ_to_Btu_Test2 () { UnitConverter target = new UnitConverter (); @@ -4485,9 +4456,9 @@ public void UnitConverter_ConvertUnits_kJ_to_Btu_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kJ_to_therm_Test () { UnitConverter target = new UnitConverter (); @@ -4500,9 +4471,9 @@ public void UnitConverter_ConvertUnits_kJ_to_therm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kJ_to_therm_Test2 () { UnitConverter target = new UnitConverter (); @@ -4515,9 +4486,9 @@ public void UnitConverter_ConvertUnits_kJ_to_therm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kJ_to_mJ_Test () { UnitConverter target = new UnitConverter (); @@ -4530,9 +4501,9 @@ public void UnitConverter_ConvertUnits_kJ_to_mJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kJ_to_mJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -4545,9 +4516,9 @@ public void UnitConverter_ConvertUnits_kJ_to_mJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kJ_to_Megajoule_Test () { UnitConverter target = new UnitConverter (); @@ -4560,9 +4531,9 @@ public void UnitConverter_ConvertUnits_kJ_to_Megajoule_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kJ_to_Megajoule_Test2 () { UnitConverter target = new UnitConverter (); @@ -4575,9 +4546,9 @@ public void UnitConverter_ConvertUnits_kJ_to_Megajoule_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kJ_to_GJ_Test () { UnitConverter target = new UnitConverter (); @@ -4590,9 +4561,9 @@ public void UnitConverter_ConvertUnits_kJ_to_GJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kJ_to_GJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -4605,9 +4576,9 @@ public void UnitConverter_ConvertUnits_kJ_to_GJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kJ_to_µJ_Test () { UnitConverter target = new UnitConverter (); @@ -4620,9 +4591,9 @@ public void UnitConverter_ConvertUnits_kJ_to_µJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kJ_to_µJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -4635,9 +4606,9 @@ public void UnitConverter_ConvertUnits_kJ_to_µJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kJ_to_nJ_Test () { UnitConverter target = new UnitConverter (); @@ -4650,9 +4621,9 @@ public void UnitConverter_ConvertUnits_kJ_to_nJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kJ_to_nJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -4667,9 +4638,9 @@ public void UnitConverter_ConvertUnits_kJ_to_nJ_Test2 () #endregion #region "Source as Gigajoules (GJ)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GJ_to_J_Test () { UnitConverter target = new UnitConverter (); @@ -4682,9 +4653,9 @@ public void UnitConverter_ConvertUnits_GJ_to_J_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GJ_to_J_Test2 () { UnitConverter target = new UnitConverter (); @@ -4697,9 +4668,9 @@ public void UnitConverter_ConvertUnits_GJ_to_J_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GJ_to_erg_Test () { UnitConverter target = new UnitConverter (); @@ -4712,9 +4683,9 @@ public void UnitConverter_ConvertUnits_GJ_to_erg_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GJ_to_erg_Test2 () { UnitConverter target = new UnitConverter (); @@ -4727,9 +4698,9 @@ public void UnitConverter_ConvertUnits_GJ_to_erg_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GJ_to_cal_Test () { UnitConverter target = new UnitConverter (); @@ -4742,9 +4713,9 @@ public void UnitConverter_ConvertUnits_GJ_to_cal_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GJ_to_cal_Test2 () { UnitConverter target = new UnitConverter (); @@ -4757,9 +4728,9 @@ public void UnitConverter_ConvertUnits_GJ_to_cal_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GJ_to_Btu_Test () { UnitConverter target = new UnitConverter (); @@ -4772,9 +4743,9 @@ public void UnitConverter_ConvertUnits_GJ_to_Btu_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GJ_to_Btu_Test2 () { UnitConverter target = new UnitConverter (); @@ -4787,9 +4758,9 @@ public void UnitConverter_ConvertUnits_GJ_to_Btu_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GJ_to_therm_Test () { UnitConverter target = new UnitConverter (); @@ -4802,9 +4773,9 @@ public void UnitConverter_ConvertUnits_GJ_to_therm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GJ_to_therm_Test2 () { UnitConverter target = new UnitConverter (); @@ -4817,9 +4788,9 @@ public void UnitConverter_ConvertUnits_GJ_to_therm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GJ_to_mJ_Test () { UnitConverter target = new UnitConverter (); @@ -4832,9 +4803,9 @@ public void UnitConverter_ConvertUnits_GJ_to_mJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GJ_to_mJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -4847,9 +4818,9 @@ public void UnitConverter_ConvertUnits_GJ_to_mJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GJ_to_Megajoule_Test () { UnitConverter target = new UnitConverter (); @@ -4862,9 +4833,9 @@ public void UnitConverter_ConvertUnits_GJ_to_Megajoule_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GJ_to_Megajoule_Test2 () { UnitConverter target = new UnitConverter (); @@ -4877,9 +4848,9 @@ public void UnitConverter_ConvertUnits_GJ_to_Megajoule_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GJ_to_kJ_Test () { UnitConverter target = new UnitConverter (); @@ -4892,9 +4863,9 @@ public void UnitConverter_ConvertUnits_GJ_to_kJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GJ_to_kJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -4907,9 +4878,9 @@ public void UnitConverter_ConvertUnits_GJ_to_kJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GJ_to_µJ_Test () { UnitConverter target = new UnitConverter (); @@ -4922,9 +4893,9 @@ public void UnitConverter_ConvertUnits_GJ_to_µJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GJ_to_µJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -4937,9 +4908,9 @@ public void UnitConverter_ConvertUnits_GJ_to_µJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GJ_to_nJ_Test () { UnitConverter target = new UnitConverter (); @@ -4952,9 +4923,9 @@ public void UnitConverter_ConvertUnits_GJ_to_nJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_GJ_to_nJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -4969,9 +4940,9 @@ public void UnitConverter_ConvertUnits_GJ_to_nJ_Test2 () #endregion #region "Source as Microjoules (µJ)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µJ_to_J_Test () { UnitConverter target = new UnitConverter (); @@ -4984,9 +4955,9 @@ public void UnitConverter_ConvertUnits_µJ_to_J_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µJ_to_J_Test2 () { UnitConverter target = new UnitConverter (); @@ -4999,9 +4970,9 @@ public void UnitConverter_ConvertUnits_µJ_to_J_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µJ_to_erg_Test () { UnitConverter target = new UnitConverter (); @@ -5014,9 +4985,9 @@ public void UnitConverter_ConvertUnits_µJ_to_erg_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µJ_to_erg_Test2 () { UnitConverter target = new UnitConverter (); @@ -5029,9 +5000,9 @@ public void UnitConverter_ConvertUnits_µJ_to_erg_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µJ_to_cal_Test () { UnitConverter target = new UnitConverter (); @@ -5044,9 +5015,9 @@ public void UnitConverter_ConvertUnits_µJ_to_cal_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µJ_to_cal_Test2 () { UnitConverter target = new UnitConverter (); @@ -5059,9 +5030,9 @@ public void UnitConverter_ConvertUnits_µJ_to_cal_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µJ_to_Btu_Test () { UnitConverter target = new UnitConverter (); @@ -5074,9 +5045,9 @@ public void UnitConverter_ConvertUnits_µJ_to_Btu_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µJ_to_Btu_Test2 () { UnitConverter target = new UnitConverter (); @@ -5089,9 +5060,9 @@ public void UnitConverter_ConvertUnits_µJ_to_Btu_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µJ_to_therm_Test () { UnitConverter target = new UnitConverter (); @@ -5104,9 +5075,9 @@ public void UnitConverter_ConvertUnits_µJ_to_therm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µJ_to_therm_Test2 () { UnitConverter target = new UnitConverter (); @@ -5119,9 +5090,9 @@ public void UnitConverter_ConvertUnits_µJ_to_therm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µJ_to_mJ_Test () { UnitConverter target = new UnitConverter (); @@ -5134,9 +5105,9 @@ public void UnitConverter_ConvertUnits_µJ_to_mJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µJ_to_mJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -5149,9 +5120,9 @@ public void UnitConverter_ConvertUnits_µJ_to_mJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µJ_to_Megajoule_Test () { UnitConverter target = new UnitConverter (); @@ -5164,9 +5135,9 @@ public void UnitConverter_ConvertUnits_µJ_to_Megajoule_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µJ_to_Megajoule_Test2 () { UnitConverter target = new UnitConverter (); @@ -5180,9 +5151,9 @@ public void UnitConverter_ConvertUnits_µJ_to_Megajoule_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µJ_to_kJ_Test () { UnitConverter target = new UnitConverter (); @@ -5195,9 +5166,9 @@ public void UnitConverter_ConvertUnits_µJ_to_kJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µJ_to_kJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -5211,9 +5182,9 @@ public void UnitConverter_ConvertUnits_µJ_to_kJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µJ_to_GJ_Test () { UnitConverter target = new UnitConverter (); @@ -5226,9 +5197,9 @@ public void UnitConverter_ConvertUnits_µJ_to_GJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µJ_to_GJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -5242,9 +5213,9 @@ public void UnitConverter_ConvertUnits_µJ_to_GJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µJ_to_nJ_Test () { UnitConverter target = new UnitConverter (); @@ -5257,9 +5228,9 @@ public void UnitConverter_ConvertUnits_µJ_to_nJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µJ_to_nJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -5274,9 +5245,9 @@ public void UnitConverter_ConvertUnits_µJ_to_nJ_Test2 () #endregion #region "Source as Nanojoules (nJ)" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nJ_to_J_Test () { UnitConverter target = new UnitConverter (); @@ -5289,9 +5260,9 @@ public void UnitConverter_ConvertUnits_nJ_to_J_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nJ_to_J_Test2 () { UnitConverter target = new UnitConverter (); @@ -5305,9 +5276,9 @@ public void UnitConverter_ConvertUnits_nJ_to_J_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nJ_to_erg_Test () { UnitConverter target = new UnitConverter (); @@ -5320,9 +5291,9 @@ public void UnitConverter_ConvertUnits_nJ_to_erg_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nJ_to_erg_Test2 () { UnitConverter target = new UnitConverter (); @@ -5335,9 +5306,9 @@ public void UnitConverter_ConvertUnits_nJ_to_erg_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nJ_to_cal_Test () { UnitConverter target = new UnitConverter (); @@ -5350,9 +5321,9 @@ public void UnitConverter_ConvertUnits_nJ_to_cal_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nJ_to_cal_Test2 () { UnitConverter target = new UnitConverter (); @@ -5365,9 +5336,9 @@ public void UnitConverter_ConvertUnits_nJ_to_cal_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nJ_to_Btu_Test () { UnitConverter target = new UnitConverter (); @@ -5380,9 +5351,9 @@ public void UnitConverter_ConvertUnits_nJ_to_Btu_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nJ_to_Btu_Test2 () { UnitConverter target = new UnitConverter (); @@ -5395,9 +5366,9 @@ public void UnitConverter_ConvertUnits_nJ_to_Btu_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nJ_to_therm_Test () { UnitConverter target = new UnitConverter (); @@ -5411,9 +5382,9 @@ public void UnitConverter_ConvertUnits_nJ_to_therm_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nJ_to_therm_Test2 () { UnitConverter target = new UnitConverter (); @@ -5427,9 +5398,9 @@ public void UnitConverter_ConvertUnits_nJ_to_therm_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nJ_to_mJ_Test () { UnitConverter target = new UnitConverter (); @@ -5442,9 +5413,9 @@ public void UnitConverter_ConvertUnits_nJ_to_mJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nJ_to_mJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -5457,9 +5428,9 @@ public void UnitConverter_ConvertUnits_nJ_to_mJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nJ_to_Megajoule_Test () { UnitConverter target = new UnitConverter (); @@ -5472,9 +5443,9 @@ public void UnitConverter_ConvertUnits_nJ_to_Megajoule_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nJ_to_Megajoule_Test2 () { UnitConverter target = new UnitConverter (); @@ -5488,9 +5459,9 @@ public void UnitConverter_ConvertUnits_nJ_to_Megajoule_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nJ_to_kJ_Test () { UnitConverter target = new UnitConverter (); @@ -5503,9 +5474,9 @@ public void UnitConverter_ConvertUnits_nJ_to_kJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nJ_to_kJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -5519,9 +5490,9 @@ public void UnitConverter_ConvertUnits_nJ_to_kJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nJ_to_GJ_Test () { UnitConverter target = new UnitConverter (); @@ -5535,9 +5506,9 @@ public void UnitConverter_ConvertUnits_nJ_to_GJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nJ_to_GJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -5551,9 +5522,9 @@ public void UnitConverter_ConvertUnits_nJ_to_GJ_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nJ_to_µJ_Test () { UnitConverter target = new UnitConverter (); @@ -5566,9 +5537,9 @@ public void UnitConverter_ConvertUnits_nJ_to_µJ_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_nJ_to_µJ_Test2 () { UnitConverter target = new UnitConverter (); @@ -5587,9 +5558,9 @@ public void UnitConverter_ConvertUnits_nJ_to_µJ_Test2 () #region "Source as Radians" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_rad_to_deg_Test () { UnitConverter target = new UnitConverter (); @@ -5602,9 +5573,9 @@ public void UnitConverter_ConvertUnits_rad_to_deg_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_rad_to_deg_Test2 () { UnitConverter target = new UnitConverter (); @@ -5617,9 +5588,9 @@ public void UnitConverter_ConvertUnits_rad_to_deg_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_rad_to_grad_Test () { UnitConverter target = new UnitConverter (); @@ -5632,9 +5603,9 @@ public void UnitConverter_ConvertUnits_rad_to_grad_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_rad_to_grad_Test2 () { UnitConverter target = new UnitConverter (); @@ -5647,9 +5618,9 @@ public void UnitConverter_ConvertUnits_rad_to_grad_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_rad_to_rev_Test () { UnitConverter target = new UnitConverter (); @@ -5662,9 +5633,9 @@ public void UnitConverter_ConvertUnits_rad_to_rev_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_rad_to_rev_Test2 () { UnitConverter target = new UnitConverter (); @@ -5680,9 +5651,9 @@ public void UnitConverter_ConvertUnits_rad_to_rev_Test2 () #region "Source as Degrees" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_deg_to_rad_Test () { UnitConverter target = new UnitConverter (); @@ -5695,9 +5666,9 @@ public void UnitConverter_ConvertUnits_deg_to_rad_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_deg_to_rad_Test2 () { UnitConverter target = new UnitConverter (); @@ -5710,9 +5681,9 @@ public void UnitConverter_ConvertUnits_deg_to_rad_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_deg_to_grad_Test () { UnitConverter target = new UnitConverter (); @@ -5725,9 +5696,9 @@ public void UnitConverter_ConvertUnits_deg_to_grad_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_deg_to_grad_Test2 () { UnitConverter target = new UnitConverter (); @@ -5740,9 +5711,9 @@ public void UnitConverter_ConvertUnits_deg_to_grad_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_deg_to_rev_Test () { UnitConverter target = new UnitConverter (); @@ -5755,9 +5726,9 @@ public void UnitConverter_ConvertUnits_deg_to_rev_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_deg_to_rev_Test2 () { UnitConverter target = new UnitConverter (); @@ -5773,9 +5744,9 @@ public void UnitConverter_ConvertUnits_deg_to_rev_Test2 () #region "Source as Gradians" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_grad_to_rad_Test () { UnitConverter target = new UnitConverter (); @@ -5788,9 +5759,9 @@ public void UnitConverter_ConvertUnits_grad_to_rad_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_grad_to_rad_Test2 () { UnitConverter target = new UnitConverter (); @@ -5803,9 +5774,9 @@ public void UnitConverter_ConvertUnits_grad_to_rad_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_grad_to_deg_Test () { UnitConverter target = new UnitConverter (); @@ -5818,9 +5789,9 @@ public void UnitConverter_ConvertUnits_grad_to_deg_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_grad_to_deg_Test2 () { UnitConverter target = new UnitConverter (); @@ -5833,9 +5804,9 @@ public void UnitConverter_ConvertUnits_grad_to_deg_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_grad_to_rev_Test () { UnitConverter target = new UnitConverter (); @@ -5848,9 +5819,9 @@ public void UnitConverter_ConvertUnits_grad_to_rev_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_grad_to_rev_Test2 () { UnitConverter target = new UnitConverter (); @@ -5866,9 +5837,9 @@ public void UnitConverter_ConvertUnits_grad_to_rev_Test2 () #region "Source as Revolutions" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_rev_to_rad_Test () { UnitConverter target = new UnitConverter (); @@ -5881,9 +5852,9 @@ public void UnitConverter_ConvertUnits_rev_to_rad_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_rev_to_rad_Test2 () { UnitConverter target = new UnitConverter (); @@ -5896,9 +5867,9 @@ public void UnitConverter_ConvertUnits_rev_to_rad_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_rev_to_deg_Test () { UnitConverter target = new UnitConverter (); @@ -5911,9 +5882,9 @@ public void UnitConverter_ConvertUnits_rev_to_deg_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_rev_to_deg_Test2 () { UnitConverter target = new UnitConverter (); @@ -5926,9 +5897,9 @@ public void UnitConverter_ConvertUnits_rev_to_deg_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_rev_to_grad_Test () { UnitConverter target = new UnitConverter (); @@ -5941,9 +5912,9 @@ public void UnitConverter_ConvertUnits_rev_to_grad_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_rev_to_grad_Test2 () { UnitConverter target = new UnitConverter (); @@ -5962,9 +5933,9 @@ public void UnitConverter_ConvertUnits_rev_to_grad_Test2 () #region "Volume Tests" #region "Source as Cubic Inches" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in3_to_ft3_Test () { UnitConverter target = new UnitConverter (); @@ -5977,9 +5948,9 @@ public void UnitConverter_ConvertUnits_in3_to_ft3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in3_to_ft3_Test2 () { UnitConverter target = new UnitConverter (); @@ -5992,9 +5963,9 @@ public void UnitConverter_ConvertUnits_in3_to_ft3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in3_to_yd3_Test () { UnitConverter target = new UnitConverter (); @@ -6007,9 +5978,9 @@ public void UnitConverter_ConvertUnits_in3_to_yd3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in3_to_yd3_Test2 () { UnitConverter target = new UnitConverter (); @@ -6022,9 +5993,9 @@ public void UnitConverter_ConvertUnits_in3_to_yd3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in3_to_m3_Test () { UnitConverter target = new UnitConverter (); @@ -6037,9 +6008,9 @@ public void UnitConverter_ConvertUnits_in3_to_m3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in3_to_m3_Test2 () { UnitConverter target = new UnitConverter (); @@ -6052,9 +6023,9 @@ public void UnitConverter_ConvertUnits_in3_to_m3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in3_to_cc_Test () { UnitConverter target = new UnitConverter (); @@ -6067,9 +6038,9 @@ public void UnitConverter_ConvertUnits_in3_to_cc_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in3_to_cc_Test2 () { UnitConverter target = new UnitConverter (); @@ -6082,9 +6053,9 @@ public void UnitConverter_ConvertUnits_in3_to_cc_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in3_to_L_Test () { UnitConverter target = new UnitConverter (); @@ -6097,9 +6068,9 @@ public void UnitConverter_ConvertUnits_in3_to_L_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in3_to_L_Test2 () { UnitConverter target = new UnitConverter (); @@ -6112,9 +6083,9 @@ public void UnitConverter_ConvertUnits_in3_to_L_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in3_to_floz_Test () { UnitConverter target = new UnitConverter (); @@ -6127,9 +6098,9 @@ public void UnitConverter_ConvertUnits_in3_to_floz_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in3_to_floz_Test2 () { UnitConverter target = new UnitConverter (); @@ -6142,9 +6113,9 @@ public void UnitConverter_ConvertUnits_in3_to_floz_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in3_to_gal_Test () { UnitConverter target = new UnitConverter (); @@ -6157,9 +6128,9 @@ public void UnitConverter_ConvertUnits_in3_to_gal_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in3_to_gal_Test2 () { UnitConverter target = new UnitConverter (); @@ -6172,9 +6143,9 @@ public void UnitConverter_ConvertUnits_in3_to_gal_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in3_to_pt_Test () { UnitConverter target = new UnitConverter (); @@ -6187,9 +6158,9 @@ public void UnitConverter_ConvertUnits_in3_to_pt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in3_to_pt_Test2 () { UnitConverter target = new UnitConverter (); @@ -6202,9 +6173,9 @@ public void UnitConverter_ConvertUnits_in3_to_pt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in3_to_qt_Test () { UnitConverter target = new UnitConverter (); @@ -6217,9 +6188,9 @@ public void UnitConverter_ConvertUnits_in3_to_qt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in3_to_qt_Test2 () { UnitConverter target = new UnitConverter (); @@ -6235,9 +6206,9 @@ public void UnitConverter_ConvertUnits_in3_to_qt_Test2 () #region "Source as Cubic Feet" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft3_to_in3_Test () { UnitConverter target = new UnitConverter (); @@ -6250,9 +6221,9 @@ public void UnitConverter_ConvertUnits_ft3_to_in3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft3_to_in3_Test2 () { UnitConverter target = new UnitConverter (); @@ -6265,9 +6236,9 @@ public void UnitConverter_ConvertUnits_ft3_to_in3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft3_to_yd3_Test () { UnitConverter target = new UnitConverter (); @@ -6280,9 +6251,9 @@ public void UnitConverter_ConvertUnits_ft3_to_yd3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft3_to_yd3_Test2 () { UnitConverter target = new UnitConverter (); @@ -6295,9 +6266,9 @@ public void UnitConverter_ConvertUnits_ft3_to_yd3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft3_to_m3_Test () { UnitConverter target = new UnitConverter (); @@ -6310,9 +6281,9 @@ public void UnitConverter_ConvertUnits_ft3_to_m3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft3_to_m3_Test2 () { UnitConverter target = new UnitConverter (); @@ -6325,9 +6296,9 @@ public void UnitConverter_ConvertUnits_ft3_to_m3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft3_to_cc_Test () { UnitConverter target = new UnitConverter (); @@ -6340,9 +6311,9 @@ public void UnitConverter_ConvertUnits_ft3_to_cc_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft3_to_cc_Test2 () { UnitConverter target = new UnitConverter (); @@ -6355,9 +6326,9 @@ public void UnitConverter_ConvertUnits_ft3_to_cc_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft3_to_L_Test () { UnitConverter target = new UnitConverter (); @@ -6370,9 +6341,9 @@ public void UnitConverter_ConvertUnits_ft3_to_L_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft3_to_L_Test2 () { UnitConverter target = new UnitConverter (); @@ -6385,9 +6356,9 @@ public void UnitConverter_ConvertUnits_ft3_to_L_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft3_to_floz_Test () { UnitConverter target = new UnitConverter (); @@ -6400,9 +6371,9 @@ public void UnitConverter_ConvertUnits_ft3_to_floz_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft3_to_floz_Test2 () { UnitConverter target = new UnitConverter (); @@ -6415,9 +6386,9 @@ public void UnitConverter_ConvertUnits_ft3_to_floz_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft3_to_gal_Test () { UnitConverter target = new UnitConverter (); @@ -6430,9 +6401,9 @@ public void UnitConverter_ConvertUnits_ft3_to_gal_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft3_to_gal_Test2 () { UnitConverter target = new UnitConverter (); @@ -6445,9 +6416,9 @@ public void UnitConverter_ConvertUnits_ft3_to_gal_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft3_to_pt_Test () { UnitConverter target = new UnitConverter (); @@ -6460,9 +6431,9 @@ public void UnitConverter_ConvertUnits_ft3_to_pt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft3_to_pt_Test2 () { UnitConverter target = new UnitConverter (); @@ -6475,9 +6446,9 @@ public void UnitConverter_ConvertUnits_ft3_to_pt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft3_to_qt_Test () { UnitConverter target = new UnitConverter (); @@ -6490,9 +6461,9 @@ public void UnitConverter_ConvertUnits_ft3_to_qt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft3_to_qt_Test2 () { UnitConverter target = new UnitConverter (); @@ -6508,9 +6479,9 @@ public void UnitConverter_ConvertUnits_ft3_to_qt_Test2 () #region "Source as Cubic Yards" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd3_to_in3_Test () { UnitConverter target = new UnitConverter (); @@ -6523,9 +6494,9 @@ public void UnitConverter_ConvertUnits_yd3_to_in3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd3_to_in3_Test2 () { UnitConverter target = new UnitConverter (); @@ -6538,9 +6509,9 @@ public void UnitConverter_ConvertUnits_yd3_to_in3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd3_to_ft3_Test () { UnitConverter target = new UnitConverter (); @@ -6553,9 +6524,9 @@ public void UnitConverter_ConvertUnits_yd3_to_ft3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd3_to_ft3_Test2 () { UnitConverter target = new UnitConverter (); @@ -6568,9 +6539,9 @@ public void UnitConverter_ConvertUnits_yd3_to_ft3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd3_to_m3_Test () { UnitConverter target = new UnitConverter (); @@ -6583,9 +6554,9 @@ public void UnitConverter_ConvertUnits_yd3_to_m3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd3_to_m3_Test2 () { UnitConverter target = new UnitConverter (); @@ -6598,9 +6569,9 @@ public void UnitConverter_ConvertUnits_yd3_to_m3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd3_to_cc_Test () { UnitConverter target = new UnitConverter (); @@ -6613,9 +6584,9 @@ public void UnitConverter_ConvertUnits_yd3_to_cc_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd3_to_cc_Test2 () { UnitConverter target = new UnitConverter (); @@ -6628,9 +6599,9 @@ public void UnitConverter_ConvertUnits_yd3_to_cc_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd3_to_L_Test () { UnitConverter target = new UnitConverter (); @@ -6643,9 +6614,9 @@ public void UnitConverter_ConvertUnits_yd3_to_L_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd3_to_L_Test2 () { UnitConverter target = new UnitConverter (); @@ -6658,9 +6629,9 @@ public void UnitConverter_ConvertUnits_yd3_to_L_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd3_to_floz_Test () { UnitConverter target = new UnitConverter (); @@ -6673,9 +6644,9 @@ public void UnitConverter_ConvertUnits_yd3_to_floz_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd3_to_floz_Test2 () { UnitConverter target = new UnitConverter (); @@ -6688,9 +6659,9 @@ public void UnitConverter_ConvertUnits_yd3_to_floz_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd3_to_gal_Test () { UnitConverter target = new UnitConverter (); @@ -6703,9 +6674,9 @@ public void UnitConverter_ConvertUnits_yd3_to_gal_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd3_to_gal_Test2 () { UnitConverter target = new UnitConverter (); @@ -6718,9 +6689,9 @@ public void UnitConverter_ConvertUnits_yd3_to_gal_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd3_to_pt_Test () { UnitConverter target = new UnitConverter (); @@ -6733,9 +6704,9 @@ public void UnitConverter_ConvertUnits_yd3_to_pt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd3_to_pt_Test2 () { UnitConverter target = new UnitConverter (); @@ -6748,9 +6719,9 @@ public void UnitConverter_ConvertUnits_yd3_to_pt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd3_to_qt_Test () { UnitConverter target = new UnitConverter (); @@ -6763,9 +6734,9 @@ public void UnitConverter_ConvertUnits_yd3_to_qt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd3_to_qt_Test2 () { UnitConverter target = new UnitConverter (); @@ -6781,9 +6752,9 @@ public void UnitConverter_ConvertUnits_yd3_to_qt_Test2 () #region "Source as Cubic Meters" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m3_to_in3_Test () { UnitConverter target = new UnitConverter (); @@ -6796,9 +6767,9 @@ public void UnitConverter_ConvertUnits_m3_to_in3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m3_to_in3_Test2 () { UnitConverter target = new UnitConverter (); @@ -6811,9 +6782,9 @@ public void UnitConverter_ConvertUnits_m3_to_in3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m3_to_ft3_Test () { UnitConverter target = new UnitConverter (); @@ -6826,9 +6797,9 @@ public void UnitConverter_ConvertUnits_m3_to_ft3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m3_to_ft3_Test2 () { UnitConverter target = new UnitConverter (); @@ -6841,9 +6812,9 @@ public void UnitConverter_ConvertUnits_m3_to_ft3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m3_to_yd3_Test () { UnitConverter target = new UnitConverter (); @@ -6856,9 +6827,9 @@ public void UnitConverter_ConvertUnits_m3_to_yd3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m3_to_yd3_Test2 () { UnitConverter target = new UnitConverter (); @@ -6871,9 +6842,9 @@ public void UnitConverter_ConvertUnits_m3_to_yd3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m3_to_cc_Test () { UnitConverter target = new UnitConverter (); @@ -6886,9 +6857,9 @@ public void UnitConverter_ConvertUnits_m3_to_cc_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m3_to_cc_Test2 () { UnitConverter target = new UnitConverter (); @@ -6901,9 +6872,9 @@ public void UnitConverter_ConvertUnits_m3_to_cc_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m3_to_L_Test () { UnitConverter target = new UnitConverter (); @@ -6916,9 +6887,9 @@ public void UnitConverter_ConvertUnits_m3_to_L_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m3_to_L_Test2 () { UnitConverter target = new UnitConverter (); @@ -6931,9 +6902,9 @@ public void UnitConverter_ConvertUnits_m3_to_L_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m3_to_floz_Test () { UnitConverter target = new UnitConverter (); @@ -6946,9 +6917,9 @@ public void UnitConverter_ConvertUnits_m3_to_floz_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m3_to_floz_Test2 () { UnitConverter target = new UnitConverter (); @@ -6961,9 +6932,9 @@ public void UnitConverter_ConvertUnits_m3_to_floz_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m3_to_gal_Test () { UnitConverter target = new UnitConverter (); @@ -6976,9 +6947,9 @@ public void UnitConverter_ConvertUnits_m3_to_gal_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m3_to_gal_Test2 () { UnitConverter target = new UnitConverter (); @@ -6991,9 +6962,9 @@ public void UnitConverter_ConvertUnits_m3_to_gal_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m3_to_pt_Test () { UnitConverter target = new UnitConverter (); @@ -7006,9 +6977,9 @@ public void UnitConverter_ConvertUnits_m3_to_pt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m3_to_pt_Test2 () { UnitConverter target = new UnitConverter (); @@ -7021,9 +6992,9 @@ public void UnitConverter_ConvertUnits_m3_to_pt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m3_to_qt_Test () { UnitConverter target = new UnitConverter (); @@ -7036,9 +7007,9 @@ public void UnitConverter_ConvertUnits_m3_to_qt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m3_to_qt_Test2 () { UnitConverter target = new UnitConverter (); @@ -7054,9 +7025,9 @@ public void UnitConverter_ConvertUnits_m3_to_qt_Test2 () #region "Source as Cubic Centimeters" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cc_to_in3_Test () { UnitConverter target = new UnitConverter (); @@ -7069,9 +7040,9 @@ public void UnitConverter_ConvertUnits_cc_to_in3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cc_to_in3_Test2 () { UnitConverter target = new UnitConverter (); @@ -7084,9 +7055,9 @@ public void UnitConverter_ConvertUnits_cc_to_in3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cc_to_ft3_Test () { UnitConverter target = new UnitConverter (); @@ -7099,9 +7070,9 @@ public void UnitConverter_ConvertUnits_cc_to_ft3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cc_to_ft3_Test2 () { UnitConverter target = new UnitConverter (); @@ -7114,9 +7085,9 @@ public void UnitConverter_ConvertUnits_cc_to_ft3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cc_to_yd3_Test () { UnitConverter target = new UnitConverter (); @@ -7129,9 +7100,9 @@ public void UnitConverter_ConvertUnits_cc_to_yd3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cc_to_yd3_Test2 () { UnitConverter target = new UnitConverter (); @@ -7144,9 +7115,9 @@ public void UnitConverter_ConvertUnits_cc_to_yd3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cc_to_m3_Test () { UnitConverter target = new UnitConverter (); @@ -7159,9 +7130,9 @@ public void UnitConverter_ConvertUnits_cc_to_m3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cc_to_m3_Test2 () { UnitConverter target = new UnitConverter (); @@ -7174,9 +7145,9 @@ public void UnitConverter_ConvertUnits_cc_to_m3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cc_to_L_Test () { UnitConverter target = new UnitConverter (); @@ -7189,9 +7160,9 @@ public void UnitConverter_ConvertUnits_cc_to_L_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cc_to_L_Test2 () { UnitConverter target = new UnitConverter (); @@ -7204,9 +7175,9 @@ public void UnitConverter_ConvertUnits_cc_to_L_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cc_to_floz_Test () { UnitConverter target = new UnitConverter (); @@ -7219,9 +7190,9 @@ public void UnitConverter_ConvertUnits_cc_to_floz_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cc_to_floz_Test2 () { UnitConverter target = new UnitConverter (); @@ -7234,9 +7205,9 @@ public void UnitConverter_ConvertUnits_cc_to_floz_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cc_to_gal_Test () { UnitConverter target = new UnitConverter (); @@ -7249,9 +7220,9 @@ public void UnitConverter_ConvertUnits_cc_to_gal_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cc_to_gal_Test2 () { UnitConverter target = new UnitConverter (); @@ -7264,9 +7235,9 @@ public void UnitConverter_ConvertUnits_cc_to_gal_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cc_to_pt_Test () { UnitConverter target = new UnitConverter (); @@ -7279,9 +7250,9 @@ public void UnitConverter_ConvertUnits_cc_to_pt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cc_to_pt_Test2 () { UnitConverter target = new UnitConverter (); @@ -7294,9 +7265,9 @@ public void UnitConverter_ConvertUnits_cc_to_pt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cc_to_qt_Test () { UnitConverter target = new UnitConverter (); @@ -7309,9 +7280,9 @@ public void UnitConverter_ConvertUnits_cc_to_qt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cc_to_qt_Test2 () { UnitConverter target = new UnitConverter (); @@ -7327,9 +7298,9 @@ public void UnitConverter_ConvertUnits_cc_to_qt_Test2 () #region "Source as Liters" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_L_to_in3_Test () { UnitConverter target = new UnitConverter (); @@ -7342,9 +7313,9 @@ public void UnitConverter_ConvertUnits_L_to_in3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_L_to_in3_Test2 () { UnitConverter target = new UnitConverter (); @@ -7357,9 +7328,9 @@ public void UnitConverter_ConvertUnits_L_to_in3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_L_to_ft3_Test () { UnitConverter target = new UnitConverter (); @@ -7372,9 +7343,9 @@ public void UnitConverter_ConvertUnits_L_to_ft3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_L_to_ft3_Test2 () { UnitConverter target = new UnitConverter (); @@ -7387,9 +7358,9 @@ public void UnitConverter_ConvertUnits_L_to_ft3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_L_to_yd3_Test () { UnitConverter target = new UnitConverter (); @@ -7402,9 +7373,9 @@ public void UnitConverter_ConvertUnits_L_to_yd3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_L_to_yd3_Test2 () { UnitConverter target = new UnitConverter (); @@ -7417,9 +7388,9 @@ public void UnitConverter_ConvertUnits_L_to_yd3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_L_to_m3_Test () { UnitConverter target = new UnitConverter (); @@ -7432,9 +7403,9 @@ public void UnitConverter_ConvertUnits_L_to_m3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_L_to_m3_Test2 () { UnitConverter target = new UnitConverter (); @@ -7447,9 +7418,9 @@ public void UnitConverter_ConvertUnits_L_to_m3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_L_to_cc_Test () { UnitConverter target = new UnitConverter (); @@ -7462,9 +7433,9 @@ public void UnitConverter_ConvertUnits_L_to_cc_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_L_to_cc_Test2 () { UnitConverter target = new UnitConverter (); @@ -7477,9 +7448,9 @@ public void UnitConverter_ConvertUnits_L_to_cc_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_L_to_floz_Test () { UnitConverter target = new UnitConverter (); @@ -7492,9 +7463,9 @@ public void UnitConverter_ConvertUnits_L_to_floz_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_L_to_floz_Test2 () { UnitConverter target = new UnitConverter (); @@ -7507,9 +7478,9 @@ public void UnitConverter_ConvertUnits_L_to_floz_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_L_to_gal_Test () { UnitConverter target = new UnitConverter (); @@ -7522,9 +7493,9 @@ public void UnitConverter_ConvertUnits_L_to_gal_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_L_to_gal_Test2 () { UnitConverter target = new UnitConverter (); @@ -7537,9 +7508,9 @@ public void UnitConverter_ConvertUnits_L_to_gal_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_L_to_pt_Test () { UnitConverter target = new UnitConverter (); @@ -7552,9 +7523,9 @@ public void UnitConverter_ConvertUnits_L_to_pt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_L_to_pt_Test2 () { UnitConverter target = new UnitConverter (); @@ -7567,9 +7538,9 @@ public void UnitConverter_ConvertUnits_L_to_pt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_L_to_qt_Test () { UnitConverter target = new UnitConverter (); @@ -7582,9 +7553,9 @@ public void UnitConverter_ConvertUnits_L_to_qt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_L_to_qt_Test2 () { UnitConverter target = new UnitConverter (); @@ -7600,9 +7571,9 @@ public void UnitConverter_ConvertUnits_L_to_qt_Test2 () #region "Source as Fluid Ounces" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_floz_to_in3_Test () { UnitConverter target = new UnitConverter (); @@ -7615,9 +7586,9 @@ public void UnitConverter_ConvertUnits_floz_to_in3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_floz_to_in3_Test2 () { UnitConverter target = new UnitConverter (); @@ -7630,9 +7601,9 @@ public void UnitConverter_ConvertUnits_floz_to_in3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_floz_to_ft3_Test () { UnitConverter target = new UnitConverter (); @@ -7646,9 +7617,9 @@ public void UnitConverter_ConvertUnits_floz_to_ft3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_floz_to_ft3_Test2 () { UnitConverter target = new UnitConverter (); @@ -7661,9 +7632,9 @@ public void UnitConverter_ConvertUnits_floz_to_ft3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_floz_to_yd3_Test () { UnitConverter target = new UnitConverter (); @@ -7676,9 +7647,9 @@ public void UnitConverter_ConvertUnits_floz_to_yd3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_floz_to_yd3_Test2 () { UnitConverter target = new UnitConverter (); @@ -7691,9 +7662,9 @@ public void UnitConverter_ConvertUnits_floz_to_yd3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_floz_to_m3_Test () { UnitConverter target = new UnitConverter (); @@ -7706,9 +7677,9 @@ public void UnitConverter_ConvertUnits_floz_to_m3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_floz_to_m3_Test2 () { UnitConverter target = new UnitConverter (); @@ -7721,9 +7692,9 @@ public void UnitConverter_ConvertUnits_floz_to_m3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_floz_to_cc_Test () { UnitConverter target = new UnitConverter (); @@ -7736,9 +7707,9 @@ public void UnitConverter_ConvertUnits_floz_to_cc_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_floz_to_cc_Test2 () { UnitConverter target = new UnitConverter (); @@ -7751,9 +7722,9 @@ public void UnitConverter_ConvertUnits_floz_to_cc_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_floz_to_L_Test () { UnitConverter target = new UnitConverter (); @@ -7766,9 +7737,9 @@ public void UnitConverter_ConvertUnits_floz_to_L_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_floz_to_L_Test2 () { UnitConverter target = new UnitConverter (); @@ -7781,9 +7752,9 @@ public void UnitConverter_ConvertUnits_floz_to_L_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_floz_to_gal_Test () { UnitConverter target = new UnitConverter (); @@ -7796,9 +7767,9 @@ public void UnitConverter_ConvertUnits_floz_to_gal_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_floz_to_gal_Test2 () { UnitConverter target = new UnitConverter (); @@ -7811,9 +7782,9 @@ public void UnitConverter_ConvertUnits_floz_to_gal_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_floz_to_pt_Test () { UnitConverter target = new UnitConverter (); @@ -7826,9 +7797,9 @@ public void UnitConverter_ConvertUnits_floz_to_pt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_floz_to_pt_Test2 () { UnitConverter target = new UnitConverter (); @@ -7841,9 +7812,9 @@ public void UnitConverter_ConvertUnits_floz_to_pt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_floz_to_qt_Test () { UnitConverter target = new UnitConverter (); @@ -7856,9 +7827,9 @@ public void UnitConverter_ConvertUnits_floz_to_qt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_floz_to_qt_Test2 () { UnitConverter target = new UnitConverter (); @@ -7874,9 +7845,9 @@ public void UnitConverter_ConvertUnits_floz_to_qt_Test2 () #region "Source as Gallons" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_gal_to_in3_Test () { UnitConverter target = new UnitConverter (); @@ -7889,9 +7860,9 @@ public void UnitConverter_ConvertUnits_gal_to_in3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_gal_to_in3_Test2 () { UnitConverter target = new UnitConverter (); @@ -7904,9 +7875,9 @@ public void UnitConverter_ConvertUnits_gal_to_in3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_gal_to_ft3_Test () { UnitConverter target = new UnitConverter (); @@ -7920,9 +7891,9 @@ public void UnitConverter_ConvertUnits_gal_to_ft3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_gal_to_ft3_Test2 () { UnitConverter target = new UnitConverter (); @@ -7935,9 +7906,9 @@ public void UnitConverter_ConvertUnits_gal_to_ft3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_gal_to_yd3_Test () { UnitConverter target = new UnitConverter (); @@ -7950,9 +7921,9 @@ public void UnitConverter_ConvertUnits_gal_to_yd3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_gal_to_yd3_Test2 () { UnitConverter target = new UnitConverter (); @@ -7965,9 +7936,9 @@ public void UnitConverter_ConvertUnits_gal_to_yd3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_gal_to_m3_Test () { UnitConverter target = new UnitConverter (); @@ -7980,9 +7951,9 @@ public void UnitConverter_ConvertUnits_gal_to_m3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_gal_to_m3_Test2 () { UnitConverter target = new UnitConverter (); @@ -7995,9 +7966,9 @@ public void UnitConverter_ConvertUnits_gal_to_m3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_gal_to_cc_Test () { UnitConverter target = new UnitConverter (); @@ -8010,9 +7981,9 @@ public void UnitConverter_ConvertUnits_gal_to_cc_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_gal_to_cc_Test2 () { UnitConverter target = new UnitConverter (); @@ -8025,9 +7996,9 @@ public void UnitConverter_ConvertUnits_gal_to_cc_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_gal_to_L_Test () { UnitConverter target = new UnitConverter (); @@ -8040,9 +8011,9 @@ public void UnitConverter_ConvertUnits_gal_to_L_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_gal_to_L_Test2 () { UnitConverter target = new UnitConverter (); @@ -8055,9 +8026,9 @@ public void UnitConverter_ConvertUnits_gal_to_L_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_gal_to_floz_Test () { UnitConverter target = new UnitConverter (); @@ -8070,9 +8041,9 @@ public void UnitConverter_ConvertUnits_gal_to_floz_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_gal_to_floz_Test2 () { UnitConverter target = new UnitConverter (); @@ -8085,9 +8056,9 @@ public void UnitConverter_ConvertUnits_gal_to_floz_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_gal_to_pt_Test () { UnitConverter target = new UnitConverter (); @@ -8100,9 +8071,9 @@ public void UnitConverter_ConvertUnits_gal_to_pt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_gal_to_pt_Test2 () { UnitConverter target = new UnitConverter (); @@ -8115,9 +8086,9 @@ public void UnitConverter_ConvertUnits_gal_to_pt_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_gal_to_qt_Test () { UnitConverter target = new UnitConverter (); @@ -8130,9 +8101,9 @@ public void UnitConverter_ConvertUnits_gal_to_qt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_gal_to_qt_Test2 () { UnitConverter target = new UnitConverter (); @@ -8148,9 +8119,9 @@ public void UnitConverter_ConvertUnits_gal_to_qt_Test2 () #region "Source as Pints" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_pt_to_in3_Test () { UnitConverter target = new UnitConverter (); @@ -8163,9 +8134,9 @@ public void UnitConverter_ConvertUnits_pt_to_in3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_pt_to_in3_Test2 () { UnitConverter target = new UnitConverter (); @@ -8178,9 +8149,9 @@ public void UnitConverter_ConvertUnits_pt_to_in3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_pt_to_ft3_Test () { UnitConverter target = new UnitConverter (); @@ -8194,9 +8165,9 @@ public void UnitConverter_ConvertUnits_pt_to_ft3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_pt_to_ft3_Test2 () { UnitConverter target = new UnitConverter (); @@ -8209,9 +8180,9 @@ public void UnitConverter_ConvertUnits_pt_to_ft3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_pt_to_yd3_Test () { UnitConverter target = new UnitConverter (); @@ -8224,9 +8195,9 @@ public void UnitConverter_ConvertUnits_pt_to_yd3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_pt_to_yd3_Test2 () { UnitConverter target = new UnitConverter (); @@ -8239,9 +8210,9 @@ public void UnitConverter_ConvertUnits_pt_to_yd3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_pt_to_m3_Test () { UnitConverter target = new UnitConverter (); @@ -8254,9 +8225,9 @@ public void UnitConverter_ConvertUnits_pt_to_m3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_pt_to_m3_Test2 () { UnitConverter target = new UnitConverter (); @@ -8269,9 +8240,9 @@ public void UnitConverter_ConvertUnits_pt_to_m3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_pt_to_cc_Test () { UnitConverter target = new UnitConverter (); @@ -8284,9 +8255,9 @@ public void UnitConverter_ConvertUnits_pt_to_cc_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_pt_to_cc_Test2 () { UnitConverter target = new UnitConverter (); @@ -8299,9 +8270,9 @@ public void UnitConverter_ConvertUnits_pt_to_cc_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_pt_to_L_Test () { UnitConverter target = new UnitConverter (); @@ -8314,9 +8285,9 @@ public void UnitConverter_ConvertUnits_pt_to_L_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_pt_to_L_Test2 () { UnitConverter target = new UnitConverter (); @@ -8329,9 +8300,9 @@ public void UnitConverter_ConvertUnits_pt_to_L_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_pt_to_floz_Test () { UnitConverter target = new UnitConverter (); @@ -8344,9 +8315,9 @@ public void UnitConverter_ConvertUnits_pt_to_floz_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_pt_to_floz_Test2 () { UnitConverter target = new UnitConverter (); @@ -8359,9 +8330,9 @@ public void UnitConverter_ConvertUnits_pt_to_floz_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_pt_to_gal_Test () { UnitConverter target = new UnitConverter (); @@ -8374,9 +8345,9 @@ public void UnitConverter_ConvertUnits_pt_to_gal_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_pt_to_gal_Test2 () { UnitConverter target = new UnitConverter (); @@ -8389,9 +8360,9 @@ public void UnitConverter_ConvertUnits_pt_to_gal_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_pt_to_qt_Test () { UnitConverter target = new UnitConverter (); @@ -8404,9 +8375,9 @@ public void UnitConverter_ConvertUnits_pt_to_qt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_pt_to_qt_Test2 () { UnitConverter target = new UnitConverter (); @@ -8422,9 +8393,9 @@ public void UnitConverter_ConvertUnits_pt_to_qt_Test2 () #region "Source as Quarts" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_qt_to_in3_Test () { UnitConverter target = new UnitConverter (); @@ -8437,9 +8408,9 @@ public void UnitConverter_ConvertUnits_qt_to_in3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_qt_to_in3_Test2 () { UnitConverter target = new UnitConverter (); @@ -8452,9 +8423,9 @@ public void UnitConverter_ConvertUnits_qt_to_in3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_qt_to_ft3_Test () { UnitConverter target = new UnitConverter (); @@ -8468,9 +8439,9 @@ public void UnitConverter_ConvertUnits_qt_to_ft3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_qt_to_ft3_Test2 () { UnitConverter target = new UnitConverter (); @@ -8483,9 +8454,9 @@ public void UnitConverter_ConvertUnits_qt_to_ft3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_qt_to_yd3_Test () { UnitConverter target = new UnitConverter (); @@ -8498,9 +8469,9 @@ public void UnitConverter_ConvertUnits_qt_to_yd3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_qt_to_yd3_Test2 () { UnitConverter target = new UnitConverter (); @@ -8513,9 +8484,9 @@ public void UnitConverter_ConvertUnits_qt_to_yd3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_qt_to_m3_Test () { UnitConverter target = new UnitConverter (); @@ -8528,9 +8499,9 @@ public void UnitConverter_ConvertUnits_qt_to_m3_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_qt_to_m3_Test2 () { UnitConverter target = new UnitConverter (); @@ -8543,9 +8514,9 @@ public void UnitConverter_ConvertUnits_qt_to_m3_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_qt_to_cc_Test () { UnitConverter target = new UnitConverter (); @@ -8558,9 +8529,9 @@ public void UnitConverter_ConvertUnits_qt_to_cc_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_qt_to_cc_Test2 () { UnitConverter target = new UnitConverter (); @@ -8573,9 +8544,9 @@ public void UnitConverter_ConvertUnits_qt_to_cc_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_qt_to_L_Test () { UnitConverter target = new UnitConverter (); @@ -8588,9 +8559,9 @@ public void UnitConverter_ConvertUnits_qt_to_L_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_qt_to_L_Test2 () { UnitConverter target = new UnitConverter (); @@ -8603,9 +8574,9 @@ public void UnitConverter_ConvertUnits_qt_to_L_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_qt_to_floz_Test () { UnitConverter target = new UnitConverter (); @@ -8618,9 +8589,9 @@ public void UnitConverter_ConvertUnits_qt_to_floz_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_qt_to_floz_Test2 () { UnitConverter target = new UnitConverter (); @@ -8633,9 +8604,9 @@ public void UnitConverter_ConvertUnits_qt_to_floz_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_qt_to_gal_Test () { UnitConverter target = new UnitConverter (); @@ -8648,9 +8619,9 @@ public void UnitConverter_ConvertUnits_qt_to_gal_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_qt_to_gal_Test2 () { UnitConverter target = new UnitConverter (); @@ -8663,9 +8634,9 @@ public void UnitConverter_ConvertUnits_qt_to_gal_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_qt_to_pt_Test () { UnitConverter target = new UnitConverter (); @@ -8678,9 +8649,9 @@ public void UnitConverter_ConvertUnits_qt_to_pt_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_qt_to_pt_Test2 () { UnitConverter target = new UnitConverter (); diff --git a/Cubico.Tests/UnitConverterTest4.cs b/Cubico.Tests/UnitConverterTest4.cs index bd6336f..37fa844 100644 --- a/Cubico.Tests/UnitConverterTest4.cs +++ b/Cubico.Tests/UnitConverterTest4.cs @@ -1,57 +1,28 @@ using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using NUnit.Framework; using Cubico; namespace Cubico.Tests { - [TestClass()] + [TestFixture] public class UnitConverterTest4 { - private TestContext testContextInstance; - private UnitProvider unitPro = new UnitProvider (); - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// + TestContext testContextInstance; + UnitProvider unitPro = new UnitProvider (); + + // Gets or sets the test context which provides information about and functionality for the current test run. public TestContext TestContext { get { return testContextInstance; } set { testContextInstance = value; } } - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ _ - //Public Sub MyTestCleanup() - //End Sub - // - - #endregion #region "UnitConverter.ConvertUnits" - #region "Area Tests" #region "Source as Square Meters" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m2_to_ft2_Test () { UnitConverter target = new UnitConverter (); @@ -64,9 +35,9 @@ public void UnitConverter_ConvertUnits_m2_to_ft2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m2_to_ft2_Test2 () { UnitConverter target = new UnitConverter (); @@ -79,9 +50,9 @@ public void UnitConverter_ConvertUnits_m2_to_ft2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m2_to_mi2_Test () { UnitConverter target = new UnitConverter (); @@ -94,9 +65,9 @@ public void UnitConverter_ConvertUnits_m2_to_mi2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m2_to_mi2_Test2 () { UnitConverter target = new UnitConverter (); @@ -109,9 +80,9 @@ public void UnitConverter_ConvertUnits_m2_to_mi2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m2_to_acre_Test () { UnitConverter target = new UnitConverter (); @@ -124,9 +95,9 @@ public void UnitConverter_ConvertUnits_m2_to_acre_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m2_to_acre_Test2 () { UnitConverter target = new UnitConverter (); @@ -139,9 +110,9 @@ public void UnitConverter_ConvertUnits_m2_to_acre_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m2_to_in2_Test () { UnitConverter target = new UnitConverter (); @@ -154,9 +125,9 @@ public void UnitConverter_ConvertUnits_m2_to_in2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m2_to_in2_Test2 () { UnitConverter target = new UnitConverter (); @@ -169,9 +140,9 @@ public void UnitConverter_ConvertUnits_m2_to_in2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m2_to_cm2_Test () { UnitConverter target = new UnitConverter (); @@ -184,9 +155,9 @@ public void UnitConverter_ConvertUnits_m2_to_cm2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m2_to_cm2_Test2 () { UnitConverter target = new UnitConverter (); @@ -199,9 +170,9 @@ public void UnitConverter_ConvertUnits_m2_to_cm2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m2_to_yd2_Test () { UnitConverter target = new UnitConverter (); @@ -214,9 +185,9 @@ public void UnitConverter_ConvertUnits_m2_to_yd2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m2_to_yd2_Test2 () { UnitConverter target = new UnitConverter (); @@ -229,9 +200,9 @@ public void UnitConverter_ConvertUnits_m2_to_yd2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m2_to_km2_Test () { UnitConverter target = new UnitConverter (); @@ -244,9 +215,9 @@ public void UnitConverter_ConvertUnits_m2_to_km2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m2_to_km2_Test2 () { UnitConverter target = new UnitConverter (); @@ -259,9 +230,9 @@ public void UnitConverter_ConvertUnits_m2_to_km2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m2_to_ha_Test () { UnitConverter target = new UnitConverter (); @@ -274,9 +245,9 @@ public void UnitConverter_ConvertUnits_m2_to_ha_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_m2_to_ha_Test2 () { UnitConverter target = new UnitConverter (); @@ -292,9 +263,9 @@ public void UnitConverter_ConvertUnits_m2_to_ha_Test2 () #region "Source as Square Feet" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft2_to_m2_Test () { UnitConverter target = new UnitConverter (); @@ -307,9 +278,9 @@ public void UnitConverter_ConvertUnits_ft2_to_m2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft2_to_m2_Test2 () { UnitConverter target = new UnitConverter (); @@ -322,9 +293,9 @@ public void UnitConverter_ConvertUnits_ft2_to_m2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft2_to_mi2_Test () { UnitConverter target = new UnitConverter (); @@ -337,9 +308,9 @@ public void UnitConverter_ConvertUnits_ft2_to_mi2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft2_to_mi2_Test2 () { UnitConverter target = new UnitConverter (); @@ -352,9 +323,9 @@ public void UnitConverter_ConvertUnits_ft2_to_mi2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft2_to_acre_Test () { UnitConverter target = new UnitConverter (); @@ -367,9 +338,9 @@ public void UnitConverter_ConvertUnits_ft2_to_acre_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft2_to_acre_Test2 () { UnitConverter target = new UnitConverter (); @@ -382,9 +353,9 @@ public void UnitConverter_ConvertUnits_ft2_to_acre_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft2_to_in2_Test () { UnitConverter target = new UnitConverter (); @@ -397,9 +368,9 @@ public void UnitConverter_ConvertUnits_ft2_to_in2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft2_to_in2_Test2 () { UnitConverter target = new UnitConverter (); @@ -412,9 +383,9 @@ public void UnitConverter_ConvertUnits_ft2_to_in2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft2_to_cm2_Test () { UnitConverter target = new UnitConverter (); @@ -427,9 +398,9 @@ public void UnitConverter_ConvertUnits_ft2_to_cm2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft2_to_cm2_Test2 () { UnitConverter target = new UnitConverter (); @@ -442,9 +413,9 @@ public void UnitConverter_ConvertUnits_ft2_to_cm2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft2_to_yd2_Test () { UnitConverter target = new UnitConverter (); @@ -457,9 +428,9 @@ public void UnitConverter_ConvertUnits_ft2_to_yd2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft2_to_yd2_Test2 () { UnitConverter target = new UnitConverter (); @@ -472,9 +443,9 @@ public void UnitConverter_ConvertUnits_ft2_to_yd2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft2_to_km2_Test () { UnitConverter target = new UnitConverter (); @@ -487,9 +458,9 @@ public void UnitConverter_ConvertUnits_ft2_to_km2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft2_to_km2_Test2 () { UnitConverter target = new UnitConverter (); @@ -502,9 +473,9 @@ public void UnitConverter_ConvertUnits_ft2_to_km2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft2_to_ha_Test () { UnitConverter target = new UnitConverter (); @@ -517,9 +488,9 @@ public void UnitConverter_ConvertUnits_ft2_to_ha_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ft2_to_ha_Test2 () { UnitConverter target = new UnitConverter (); @@ -535,9 +506,9 @@ public void UnitConverter_ConvertUnits_ft2_to_ha_Test2 () #region "Source as Square Miles" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mi2_to_m2_Test () { UnitConverter target = new UnitConverter (); @@ -550,9 +521,9 @@ public void UnitConverter_ConvertUnits_mi2_to_m2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mi2_to_m2_Test2 () { UnitConverter target = new UnitConverter (); @@ -565,9 +536,9 @@ public void UnitConverter_ConvertUnits_mi2_to_m2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mi2_to_ft2_Test () { UnitConverter target = new UnitConverter (); @@ -580,9 +551,9 @@ public void UnitConverter_ConvertUnits_mi2_to_ft2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mi2_to_ft2_Test2 () { UnitConverter target = new UnitConverter (); @@ -595,9 +566,9 @@ public void UnitConverter_ConvertUnits_mi2_to_ft2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mi2_to_acre_Test () { UnitConverter target = new UnitConverter (); @@ -610,9 +581,9 @@ public void UnitConverter_ConvertUnits_mi2_to_acre_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mi2_to_acre_Test2 () { UnitConverter target = new UnitConverter (); @@ -625,9 +596,9 @@ public void UnitConverter_ConvertUnits_mi2_to_acre_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mi2_to_in2_Test () { UnitConverter target = new UnitConverter (); @@ -640,9 +611,9 @@ public void UnitConverter_ConvertUnits_mi2_to_in2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mi2_to_in2_Test2 () { UnitConverter target = new UnitConverter (); @@ -655,9 +626,9 @@ public void UnitConverter_ConvertUnits_mi2_to_in2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mi2_to_cm2_Test () { UnitConverter target = new UnitConverter (); @@ -670,9 +641,9 @@ public void UnitConverter_ConvertUnits_mi2_to_cm2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mi2_to_cm2_Test2 () { UnitConverter target = new UnitConverter (); @@ -685,9 +656,9 @@ public void UnitConverter_ConvertUnits_mi2_to_cm2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mi2_to_yd2_Test () { UnitConverter target = new UnitConverter (); @@ -700,9 +671,9 @@ public void UnitConverter_ConvertUnits_mi2_to_yd2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mi2_to_yd2_Test2 () { UnitConverter target = new UnitConverter (); @@ -715,9 +686,9 @@ public void UnitConverter_ConvertUnits_mi2_to_yd2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mi2_to_km2_Test () { UnitConverter target = new UnitConverter (); @@ -730,9 +701,9 @@ public void UnitConverter_ConvertUnits_mi2_to_km2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mi2_to_km2_Test2 () { UnitConverter target = new UnitConverter (); @@ -745,9 +716,9 @@ public void UnitConverter_ConvertUnits_mi2_to_km2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mi2_to_ha_Test () { UnitConverter target = new UnitConverter (); @@ -761,9 +732,9 @@ public void UnitConverter_ConvertUnits_mi2_to_ha_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mi2_to_ha_Test2 () { UnitConverter target = new UnitConverter (); @@ -779,9 +750,9 @@ public void UnitConverter_ConvertUnits_mi2_to_ha_Test2 () #region "Source as Acres" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_acre_to_m2_Test () { UnitConverter target = new UnitConverter (); @@ -794,9 +765,9 @@ public void UnitConverter_ConvertUnits_acre_to_m2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_acre_to_m2_Test2 () { UnitConverter target = new UnitConverter (); @@ -809,9 +780,9 @@ public void UnitConverter_ConvertUnits_acre_to_m2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_acre_to_ft2_Test () { UnitConverter target = new UnitConverter (); @@ -824,9 +795,9 @@ public void UnitConverter_ConvertUnits_acre_to_ft2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_acre_to_ft2_Test2 () { UnitConverter target = new UnitConverter (); @@ -839,9 +810,9 @@ public void UnitConverter_ConvertUnits_acre_to_ft2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_acre_to_mi2_Test () { UnitConverter target = new UnitConverter (); @@ -854,9 +825,9 @@ public void UnitConverter_ConvertUnits_acre_to_mi2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_acre_to_mi2_Test2 () { UnitConverter target = new UnitConverter (); @@ -869,9 +840,9 @@ public void UnitConverter_ConvertUnits_acre_to_mi2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_acre_to_in2_Test () { UnitConverter target = new UnitConverter (); @@ -884,9 +855,9 @@ public void UnitConverter_ConvertUnits_acre_to_in2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_acre_to_in2_Test2 () { UnitConverter target = new UnitConverter (); @@ -899,9 +870,9 @@ public void UnitConverter_ConvertUnits_acre_to_in2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_acre_to_cm2_Test () { UnitConverter target = new UnitConverter (); @@ -914,9 +885,9 @@ public void UnitConverter_ConvertUnits_acre_to_cm2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_acre_to_cm2_Test2 () { UnitConverter target = new UnitConverter (); @@ -929,9 +900,9 @@ public void UnitConverter_ConvertUnits_acre_to_cm2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_acre_to_yd2_Test () { UnitConverter target = new UnitConverter (); @@ -944,9 +915,9 @@ public void UnitConverter_ConvertUnits_acre_to_yd2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_acre_to_yd2_Test2 () { UnitConverter target = new UnitConverter (); @@ -959,9 +930,9 @@ public void UnitConverter_ConvertUnits_acre_to_yd2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_acre_to_km2_Test () { UnitConverter target = new UnitConverter (); @@ -974,9 +945,9 @@ public void UnitConverter_ConvertUnits_acre_to_km2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_acre_to_km2_Test2 () { UnitConverter target = new UnitConverter (); @@ -989,9 +960,9 @@ public void UnitConverter_ConvertUnits_acre_to_km2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_acre_to_ha_Test () { UnitConverter target = new UnitConverter (); @@ -999,15 +970,15 @@ public void UnitConverter_ConvertUnits_acre_to_ha_Test () string currentUnitName = "acre"; string targetUnitName = "ha"; Measurement expected = new Measurement (Convert.ToDouble(40.468564224), "ha"); - //should be 40.468564224, .net conversion bug + //should be 40.468564224, .net conversion bug Measurement actual = default(Measurement); actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_acre_to_ha_Test2 () { UnitConverter target = new UnitConverter (); @@ -1023,9 +994,9 @@ public void UnitConverter_ConvertUnits_acre_to_ha_Test2 () #region "Source as Square Inches" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in2_to_m2_Test () { UnitConverter target = new UnitConverter (); @@ -1038,9 +1009,9 @@ public void UnitConverter_ConvertUnits_in2_to_m2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in2_to_m2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1053,9 +1024,9 @@ public void UnitConverter_ConvertUnits_in2_to_m2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in2_to_ft2_Test () { UnitConverter target = new UnitConverter (); @@ -1068,9 +1039,9 @@ public void UnitConverter_ConvertUnits_in2_to_ft2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in2_to_ft2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1083,9 +1054,9 @@ public void UnitConverter_ConvertUnits_in2_to_ft2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in2_to_mi2_Test () { UnitConverter target = new UnitConverter (); @@ -1098,9 +1069,9 @@ public void UnitConverter_ConvertUnits_in2_to_mi2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in2_to_mi2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1113,9 +1084,9 @@ public void UnitConverter_ConvertUnits_in2_to_mi2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in2_to_acre_Test () { UnitConverter target = new UnitConverter (); @@ -1128,9 +1099,9 @@ public void UnitConverter_ConvertUnits_in2_to_acre_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in2_to_acre_Test2 () { UnitConverter target = new UnitConverter (); @@ -1143,9 +1114,9 @@ public void UnitConverter_ConvertUnits_in2_to_acre_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in2_to_cm2_Test () { UnitConverter target = new UnitConverter (); @@ -1158,9 +1129,9 @@ public void UnitConverter_ConvertUnits_in2_to_cm2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in2_to_cm2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1173,9 +1144,9 @@ public void UnitConverter_ConvertUnits_in2_to_cm2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in2_to_yd2_Test () { UnitConverter target = new UnitConverter (); @@ -1188,9 +1159,9 @@ public void UnitConverter_ConvertUnits_in2_to_yd2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in2_to_yd2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1203,9 +1174,9 @@ public void UnitConverter_ConvertUnits_in2_to_yd2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in2_to_km2_Test () { UnitConverter target = new UnitConverter (); @@ -1218,9 +1189,9 @@ public void UnitConverter_ConvertUnits_in2_to_km2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in2_to_km2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1233,9 +1204,9 @@ public void UnitConverter_ConvertUnits_in2_to_km2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in2_to_ha_Test () { UnitConverter target = new UnitConverter (); @@ -1248,9 +1219,9 @@ public void UnitConverter_ConvertUnits_in2_to_ha_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_in2_to_ha_Test2 () { UnitConverter target = new UnitConverter (); @@ -1266,9 +1237,9 @@ public void UnitConverter_ConvertUnits_in2_to_ha_Test2 () #region "Source as Square Centimeters" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm2_to_ft2_Test () { UnitConverter target = new UnitConverter (); @@ -1281,9 +1252,9 @@ public void UnitConverter_ConvertUnits_cm2_to_ft2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm2_to_ft2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1296,9 +1267,9 @@ public void UnitConverter_ConvertUnits_cm2_to_ft2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm2_to_mi2_Test () { UnitConverter target = new UnitConverter (); @@ -1311,9 +1282,9 @@ public void UnitConverter_ConvertUnits_cm2_to_mi2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm2_to_mi2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1326,9 +1297,9 @@ public void UnitConverter_ConvertUnits_cm2_to_mi2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm2_to_acre_Test () { UnitConverter target = new UnitConverter (); @@ -1341,9 +1312,9 @@ public void UnitConverter_ConvertUnits_cm2_to_acre_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm2_to_acre_Test2 () { UnitConverter target = new UnitConverter (); @@ -1356,9 +1327,9 @@ public void UnitConverter_ConvertUnits_cm2_to_acre_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm2_to_in2_Test () { UnitConverter target = new UnitConverter (); @@ -1371,9 +1342,9 @@ public void UnitConverter_ConvertUnits_cm2_to_in2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm2_to_in2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1386,9 +1357,9 @@ public void UnitConverter_ConvertUnits_cm2_to_in2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm2_to_m2_Test () { UnitConverter target = new UnitConverter (); @@ -1401,9 +1372,9 @@ public void UnitConverter_ConvertUnits_cm2_to_m2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm2_to_m2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1416,9 +1387,9 @@ public void UnitConverter_ConvertUnits_cm2_to_m2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm2_to_yd2_Test () { UnitConverter target = new UnitConverter (); @@ -1431,9 +1402,9 @@ public void UnitConverter_ConvertUnits_cm2_to_yd2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm2_to_yd2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1446,9 +1417,9 @@ public void UnitConverter_ConvertUnits_cm2_to_yd2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm2_to_km2_Test () { UnitConverter target = new UnitConverter (); @@ -1461,9 +1432,9 @@ public void UnitConverter_ConvertUnits_cm2_to_km2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm2_to_km2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1476,9 +1447,9 @@ public void UnitConverter_ConvertUnits_cm2_to_km2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm2_to_ha_Test () { UnitConverter target = new UnitConverter (); @@ -1491,9 +1462,9 @@ public void UnitConverter_ConvertUnits_cm2_to_ha_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cm2_to_ha_Test2 () { UnitConverter target = new UnitConverter (); @@ -1509,9 +1480,9 @@ public void UnitConverter_ConvertUnits_cm2_to_ha_Test2 () #region "Source as Square Yards" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd2_to_m2_Test () { UnitConverter target = new UnitConverter (); @@ -1524,9 +1495,9 @@ public void UnitConverter_ConvertUnits_yd2_to_m2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd2_to_m2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1539,9 +1510,9 @@ public void UnitConverter_ConvertUnits_yd2_to_m2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd2_to_ft2_Test () { UnitConverter target = new UnitConverter (); @@ -1554,9 +1525,9 @@ public void UnitConverter_ConvertUnits_yd2_to_ft2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd2_to_ft2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1569,9 +1540,9 @@ public void UnitConverter_ConvertUnits_yd2_to_ft2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd2_to_mi2_Test () { UnitConverter target = new UnitConverter (); @@ -1584,9 +1555,9 @@ public void UnitConverter_ConvertUnits_yd2_to_mi2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd2_to_mi2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1599,9 +1570,9 @@ public void UnitConverter_ConvertUnits_yd2_to_mi2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd2_to_acre_Test () { UnitConverter target = new UnitConverter (); @@ -1614,9 +1585,9 @@ public void UnitConverter_ConvertUnits_yd2_to_acre_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd2_to_acre_Test2 () { UnitConverter target = new UnitConverter (); @@ -1629,9 +1600,9 @@ public void UnitConverter_ConvertUnits_yd2_to_acre_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd2_to_in2_Test () { UnitConverter target = new UnitConverter (); @@ -1644,9 +1615,9 @@ public void UnitConverter_ConvertUnits_yd2_to_in2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd2_to_in2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1659,9 +1630,9 @@ public void UnitConverter_ConvertUnits_yd2_to_in2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd2_to_cm2_Test () { UnitConverter target = new UnitConverter (); @@ -1675,9 +1646,9 @@ public void UnitConverter_ConvertUnits_yd2_to_cm2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd2_to_cm2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1690,9 +1661,9 @@ public void UnitConverter_ConvertUnits_yd2_to_cm2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd2_to_km2_Test () { UnitConverter target = new UnitConverter (); @@ -1705,9 +1676,9 @@ public void UnitConverter_ConvertUnits_yd2_to_km2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd2_to_km2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1720,9 +1691,9 @@ public void UnitConverter_ConvertUnits_yd2_to_km2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd2_to_ha_Test () { UnitConverter target = new UnitConverter (); @@ -1735,9 +1706,9 @@ public void UnitConverter_ConvertUnits_yd2_to_ha_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_yd2_to_ha_Test2 () { UnitConverter target = new UnitConverter (); @@ -1753,9 +1724,9 @@ public void UnitConverter_ConvertUnits_yd2_to_ha_Test2 () #region "Source as Square Kilometers" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km2_to_m2_Test () { UnitConverter target = new UnitConverter (); @@ -1768,9 +1739,9 @@ public void UnitConverter_ConvertUnits_km2_to_m2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km2_to_m2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1783,9 +1754,9 @@ public void UnitConverter_ConvertUnits_km2_to_m2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km2_to_ft2_Test () { UnitConverter target = new UnitConverter (); @@ -1798,9 +1769,9 @@ public void UnitConverter_ConvertUnits_km2_to_ft2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km2_to_ft2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1813,9 +1784,9 @@ public void UnitConverter_ConvertUnits_km2_to_ft2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km2_to_mi2_Test () { UnitConverter target = new UnitConverter (); @@ -1828,9 +1799,9 @@ public void UnitConverter_ConvertUnits_km2_to_mi2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km2_to_mi2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1843,9 +1814,9 @@ public void UnitConverter_ConvertUnits_km2_to_mi2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km2_to_acre_Test () { UnitConverter target = new UnitConverter (); @@ -1858,9 +1829,9 @@ public void UnitConverter_ConvertUnits_km2_to_acre_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km2_to_acre_Test2 () { UnitConverter target = new UnitConverter (); @@ -1874,9 +1845,9 @@ public void UnitConverter_ConvertUnits_km2_to_acre_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km2_to_in2_Test () { UnitConverter target = new UnitConverter (); @@ -1889,9 +1860,9 @@ public void UnitConverter_ConvertUnits_km2_to_in2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km2_to_in2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1904,9 +1875,9 @@ public void UnitConverter_ConvertUnits_km2_to_in2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km2_to_cm2_Test () { UnitConverter target = new UnitConverter (); @@ -1919,9 +1890,9 @@ public void UnitConverter_ConvertUnits_km2_to_cm2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km2_to_cm2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1934,9 +1905,9 @@ public void UnitConverter_ConvertUnits_km2_to_cm2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km2_to_yd2_Test () { UnitConverter target = new UnitConverter (); @@ -1949,9 +1920,9 @@ public void UnitConverter_ConvertUnits_km2_to_yd2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km2_to_yd2_Test2 () { UnitConverter target = new UnitConverter (); @@ -1964,9 +1935,9 @@ public void UnitConverter_ConvertUnits_km2_to_yd2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km2_to_ha_Test () { UnitConverter target = new UnitConverter (); @@ -1979,9 +1950,9 @@ public void UnitConverter_ConvertUnits_km2_to_ha_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_km2_to_ha_Test2 () { UnitConverter target = new UnitConverter (); @@ -1997,9 +1968,9 @@ public void UnitConverter_ConvertUnits_km2_to_ha_Test2 () #region "Source as Hectares" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ha_to_m2_Test () { UnitConverter target = new UnitConverter (); @@ -2012,9 +1983,9 @@ public void UnitConverter_ConvertUnits_ha_to_m2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ha_to_m2_Test2 () { UnitConverter target = new UnitConverter (); @@ -2027,9 +1998,9 @@ public void UnitConverter_ConvertUnits_ha_to_m2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ha_to_ft2_Test () { UnitConverter target = new UnitConverter (); @@ -2042,9 +2013,9 @@ public void UnitConverter_ConvertUnits_ha_to_ft2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ha_to_ft2_Test2 () { UnitConverter target = new UnitConverter (); @@ -2057,9 +2028,9 @@ public void UnitConverter_ConvertUnits_ha_to_ft2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ha_to_mi2_Test () { UnitConverter target = new UnitConverter (); @@ -2072,9 +2043,9 @@ public void UnitConverter_ConvertUnits_ha_to_mi2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ha_to_mi2_Test2 () { UnitConverter target = new UnitConverter (); @@ -2087,9 +2058,9 @@ public void UnitConverter_ConvertUnits_ha_to_mi2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ha_to_acre_Test () { UnitConverter target = new UnitConverter (); @@ -2102,9 +2073,9 @@ public void UnitConverter_ConvertUnits_ha_to_acre_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ha_to_acre_Test2 () { UnitConverter target = new UnitConverter (); @@ -2117,9 +2088,9 @@ public void UnitConverter_ConvertUnits_ha_to_acre_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ha_to_in2_Test () { UnitConverter target = new UnitConverter (); @@ -2132,9 +2103,9 @@ public void UnitConverter_ConvertUnits_ha_to_in2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ha_to_in2_Test2 () { UnitConverter target = new UnitConverter (); @@ -2147,9 +2118,9 @@ public void UnitConverter_ConvertUnits_ha_to_in2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ha_to_cm2_Test () { UnitConverter target = new UnitConverter (); @@ -2162,9 +2133,9 @@ public void UnitConverter_ConvertUnits_ha_to_cm2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ha_to_cm2_Test2 () { UnitConverter target = new UnitConverter (); @@ -2177,9 +2148,9 @@ public void UnitConverter_ConvertUnits_ha_to_cm2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ha_to_yd2_Test () { UnitConverter target = new UnitConverter (); @@ -2192,9 +2163,9 @@ public void UnitConverter_ConvertUnits_ha_to_yd2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ha_to_yd2_Test2 () { UnitConverter target = new UnitConverter (); @@ -2207,9 +2178,9 @@ public void UnitConverter_ConvertUnits_ha_to_yd2_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ha_to_km2_Test () { UnitConverter target = new UnitConverter (); @@ -2222,9 +2193,9 @@ public void UnitConverter_ConvertUnits_ha_to_km2_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_ha_to_km2_Test2 () { UnitConverter target = new UnitConverter (); @@ -2242,9 +2213,9 @@ public void UnitConverter_ConvertUnits_ha_to_km2_Test2 () #region "Absorbed Radiation Dose Tests" #region "Source as Gray" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gy_to_cGy_Test () { UnitConverter target = new UnitConverter (); @@ -2257,9 +2228,9 @@ public void UnitConverter_ConvertUnits_Gy_to_cGy_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gy_to_cGy_Test2 () { UnitConverter target = new UnitConverter (); @@ -2272,9 +2243,9 @@ public void UnitConverter_ConvertUnits_Gy_to_cGy_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gy_to_mGy_Test () { UnitConverter target = new UnitConverter (); @@ -2287,9 +2258,9 @@ public void UnitConverter_ConvertUnits_Gy_to_mGy_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gy_to_mGy_Test2 () { UnitConverter target = new UnitConverter (); @@ -2302,9 +2273,9 @@ public void UnitConverter_ConvertUnits_Gy_to_mGy_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gy_to_µGy_Test () { UnitConverter target = new UnitConverter (); @@ -2317,9 +2288,9 @@ public void UnitConverter_ConvertUnits_Gy_to_µGy_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gy_to_µGy_Test2 () { UnitConverter target = new UnitConverter (); @@ -2332,9 +2303,9 @@ public void UnitConverter_ConvertUnits_Gy_to_µGy_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gy_to_kGy_Test () { UnitConverter target = new UnitConverter (); @@ -2347,9 +2318,9 @@ public void UnitConverter_ConvertUnits_Gy_to_kGy_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_Gy_to_kGy_Test2 () { UnitConverter target = new UnitConverter (); @@ -2365,9 +2336,9 @@ public void UnitConverter_ConvertUnits_Gy_to_kGy_Test2 () #region "Source as Centigray" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cGy_to_Gy_Test () { UnitConverter target = new UnitConverter (); @@ -2380,9 +2351,9 @@ public void UnitConverter_ConvertUnits_cGy_to_Gy_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cGy_to_Gy_Test2 () { UnitConverter target = new UnitConverter (); @@ -2395,9 +2366,9 @@ public void UnitConverter_ConvertUnits_cGy_to_Gy_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cGy_to_mGy_Test () { UnitConverter target = new UnitConverter (); @@ -2410,9 +2381,9 @@ public void UnitConverter_ConvertUnits_cGy_to_mGy_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cGy_to_mGy_Test2 () { UnitConverter target = new UnitConverter (); @@ -2425,9 +2396,9 @@ public void UnitConverter_ConvertUnits_cGy_to_mGy_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cGy_to_µGy_Test () { UnitConverter target = new UnitConverter (); @@ -2440,9 +2411,9 @@ public void UnitConverter_ConvertUnits_cGy_to_µGy_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cGy_to_µGy_Test2 () { UnitConverter target = new UnitConverter (); @@ -2455,9 +2426,9 @@ public void UnitConverter_ConvertUnits_cGy_to_µGy_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cGy_to_kGy_Test () { UnitConverter target = new UnitConverter (); @@ -2470,9 +2441,9 @@ public void UnitConverter_ConvertUnits_cGy_to_kGy_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_cGy_to_kGy_Test2 () { UnitConverter target = new UnitConverter (); @@ -2488,9 +2459,9 @@ public void UnitConverter_ConvertUnits_cGy_to_kGy_Test2 () #region "Source as Milligray" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mGy_to_Gy_Test () { UnitConverter target = new UnitConverter (); @@ -2503,9 +2474,9 @@ public void UnitConverter_ConvertUnits_mGy_to_Gy_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mGy_to_Gy_Test2 () { UnitConverter target = new UnitConverter (); @@ -2518,9 +2489,9 @@ public void UnitConverter_ConvertUnits_mGy_to_Gy_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mGy_to_cGy_Test () { UnitConverter target = new UnitConverter (); @@ -2533,9 +2504,9 @@ public void UnitConverter_ConvertUnits_mGy_to_cGy_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mGy_to_cGy_Test2 () { UnitConverter target = new UnitConverter (); @@ -2548,9 +2519,9 @@ public void UnitConverter_ConvertUnits_mGy_to_cGy_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mGy_to_µGy_Test () { UnitConverter target = new UnitConverter (); @@ -2563,9 +2534,9 @@ public void UnitConverter_ConvertUnits_mGy_to_µGy_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mGy_to_µGy_Test2 () { UnitConverter target = new UnitConverter (); @@ -2578,9 +2549,9 @@ public void UnitConverter_ConvertUnits_mGy_to_µGy_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mGy_to_kGy_Test () { UnitConverter target = new UnitConverter (); @@ -2593,9 +2564,9 @@ public void UnitConverter_ConvertUnits_mGy_to_kGy_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_mGy_to_kGy_Test2 () { UnitConverter target = new UnitConverter (); @@ -2611,9 +2582,9 @@ public void UnitConverter_ConvertUnits_mGy_to_kGy_Test2 () #region "Source as Microgray" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µGy_to_Gy_Test () { UnitConverter target = new UnitConverter (); @@ -2626,9 +2597,9 @@ public void UnitConverter_ConvertUnits_µGy_to_Gy_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µGy_to_Gy_Test2 () { UnitConverter target = new UnitConverter (); @@ -2641,9 +2612,9 @@ public void UnitConverter_ConvertUnits_µGy_to_Gy_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µGy_to_cGy_Test () { UnitConverter target = new UnitConverter (); @@ -2656,9 +2627,9 @@ public void UnitConverter_ConvertUnits_µGy_to_cGy_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µGy_to_cGy_Test2 () { UnitConverter target = new UnitConverter (); @@ -2671,9 +2642,9 @@ public void UnitConverter_ConvertUnits_µGy_to_cGy_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µGy_to_mGy_Test () { UnitConverter target = new UnitConverter (); @@ -2686,9 +2657,9 @@ public void UnitConverter_ConvertUnits_µGy_to_mGy_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µGy_to_mGy_Test2 () { UnitConverter target = new UnitConverter (); @@ -2701,9 +2672,9 @@ public void UnitConverter_ConvertUnits_µGy_to_mGy_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µGy_to_kGy_Test () { UnitConverter target = new UnitConverter (); @@ -2716,9 +2687,9 @@ public void UnitConverter_ConvertUnits_µGy_to_kGy_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_µGy_to_kGy_Test2 () { UnitConverter target = new UnitConverter (); @@ -2734,9 +2705,9 @@ public void UnitConverter_ConvertUnits_µGy_to_kGy_Test2 () #region "Source as Kilogray" - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kGy_to_Gy_Test () { UnitConverter target = new UnitConverter (); @@ -2749,9 +2720,9 @@ public void UnitConverter_ConvertUnits_kGy_to_Gy_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kGy_to_Gy_Test2 () { UnitConverter target = new UnitConverter (); @@ -2764,9 +2735,9 @@ public void UnitConverter_ConvertUnits_kGy_to_Gy_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kGy_to_cGy_Test () { UnitConverter target = new UnitConverter (); @@ -2779,9 +2750,9 @@ public void UnitConverter_ConvertUnits_kGy_to_cGy_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kGy_to_cGy_Test2 () { UnitConverter target = new UnitConverter (); @@ -2794,9 +2765,9 @@ public void UnitConverter_ConvertUnits_kGy_to_cGy_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kGy_to_mGy_Test () { UnitConverter target = new UnitConverter (); @@ -2809,9 +2780,9 @@ public void UnitConverter_ConvertUnits_kGy_to_mGy_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kGy_to_mGy_Test2 () { UnitConverter target = new UnitConverter (); @@ -2824,9 +2795,9 @@ public void UnitConverter_ConvertUnits_kGy_to_mGy_Test2 () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kGy_to_µGy_Test () { UnitConverter target = new UnitConverter (); @@ -2839,9 +2810,9 @@ public void UnitConverter_ConvertUnits_kGy_to_µGy_Test () Assert.AreEqual (expected.Value, actual.Value); } - [TestMethod()] - [TestCategory(UnitTestCategory.Integration)] - [TestCategory(UnitTestCategory.UnitConversion)] + [Test] + [TestCase(UnitTestCategory.Integration)] + [TestCase(UnitTestCategory.UnitConversion)] public void UnitConverter_ConvertUnits_kGy_to_µGy_Test2 () { UnitConverter target = new UnitConverter (); @@ -2853,28 +2824,26 @@ public void UnitConverter_ConvertUnits_kGy_to_µGy_Test2 () actual = target.ConvertUnits (value, currentUnitName, targetUnitName); Assert.AreEqual (expected.Value, actual.Value); } + #endregion #endregion - #endregion - #region "UnitConverter.UnitConverter()" - /// - ///A test for UnitConverter Constructor - /// - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] + + // A test for UnitConverter Constructor + [Test] + [TestCase(UnitTestCategory.Unit)] public void UnitConverterConstructorTest () { UnitConverter target = new UnitConverter (); Assert.IsNotNull (target); } - #endregion + #endregion #region "Empty and Null Tests" - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] + [Test] + [TestCase(UnitTestCategory.Unit)] public void UnitConverter_ConvertUnitsNullTest () { UnitConverter target = new UnitConverter (); @@ -2885,8 +2854,8 @@ public void UnitConverter_ConvertUnitsNullTest () Assert.AreEqual (expected.ConversionResult, actual.ConversionResult); } - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] + [Test] + [TestCase(UnitTestCategory.Unit)] public void UnitConverter_ConvertUnitsNullTest2 () { UnitConverter target = new UnitConverter (); @@ -2897,8 +2866,8 @@ public void UnitConverter_ConvertUnitsNullTest2 () Assert.AreEqual (expected.ConversionResult, actual.ConversionResult); } - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] + [Test] + [TestCase(UnitTestCategory.Unit)] public void UnitConverter_ConvertUnitsNullTest3 () { UnitConverter target = new UnitConverter (); @@ -2909,8 +2878,8 @@ public void UnitConverter_ConvertUnitsNullTest3 () Assert.AreEqual (expected.ConversionResult, actual.ConversionResult); } - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] + [Test] + [TestCase(UnitTestCategory.Unit)] public void UnitConverter_ConvertUnitsEmptyTest () { UnitConverter target = new UnitConverter (); @@ -2921,8 +2890,8 @@ public void UnitConverter_ConvertUnitsEmptyTest () Assert.AreEqual (expected.ConversionResult, actual.ConversionResult); } - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] + [Test] + [TestCase(UnitTestCategory.Unit)] public void UnitConverter_ConvertUnitsEmptyTest2 () { UnitConverter target = new UnitConverter (); @@ -2933,8 +2902,8 @@ public void UnitConverter_ConvertUnitsEmptyTest2 () Assert.AreEqual (expected.ConversionResult, actual.ConversionResult); } - [TestMethod()] - [TestCategory(UnitTestCategory.Unit)] + [Test] + [TestCase(UnitTestCategory.Unit)] public void UnitConverter_ConvertUnitsEmptyTest3 () { UnitConverter target = new UnitConverter (); @@ -2944,6 +2913,7 @@ public void UnitConverter_ConvertUnitsEmptyTest3 () Assert.AreNotEqual (expected, actual); Assert.AreEqual (expected.ConversionResult, actual.ConversionResult); } + #endregion } -} +} \ No newline at end of file diff --git a/Cubico.Tests/UnitProviderTest.cs b/Cubico.Tests/UnitProviderTest.cs index 5a2694d..9130b33 100644 --- a/Cubico.Tests/UnitProviderTest.cs +++ b/Cubico.Tests/UnitProviderTest.cs @@ -3,86 +3,52 @@ using NUnit.Framework; using Cubico; -/// -///This is a test class for UnitProvider and is intended -///to contain all UnitProvider Unit Tests -/// -[TestClass()] -public class UnitProviderTest +namespace Cubico.Tests { - - private TestContext testContextInstance; - private UnitProvider unitPro = new UnitProvider (); - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext { - get { return testContextInstance; } - set { testContextInstance = value; } - } - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ - //Public Sub MyTestCleanup() - //End Sub - // - #endregion - - - /// - ///A test for UnitTypes - /// - [TestMethod()] - public void UnitTypesTest () - { - Dictionary actual = default(Dictionary); - actual = unitPro.UnitTypes; - - Assert.IsNotNull (actual); - Assert.IsTrue (actual.Count > 0); - } - /// - ///A test for Units - /// - [TestMethod()] - public void UnitsTest () - { - Dictionary actual = default(Dictionary); - actual = unitPro.Units; - - Assert.IsNotNull (actual); - Assert.IsTrue (actual.Count > 0); - } - /// - ///A test for Symbols - /// - [TestMethod()] - public void SymbolsTest () + // This is a test class for UnitProvider and is intended to contain all UnitProvider Unit Tests + [TestFixture] + public class UnitProviderTest { - Dictionary actual = default(Dictionary); - actual = unitPro.Symbols; - - Assert.IsNotNull (actual); - Assert.IsTrue (actual.Count > 0); + TestContext testContextInstance; + UnitProvider unitPro = new UnitProvider (); + + // Gets or sets the test context which provides information about and functionality for the current test run. + public TestContext TestContext { + get { return testContextInstance; } + set { testContextInstance = value; } + } + + // A test for UnitTypes + [Test] + public void UnitTypesTest () + { + Dictionary actual = default(Dictionary); + actual = unitPro.UnitTypes; + + Assert.IsNotNull (actual); + Assert.IsTrue (actual.Count > 0); + } + + // A test for Units + [Test] + public void UnitsTest () + { + Dictionary actual = default(Dictionary); + actual = unitPro.Units; + + Assert.IsNotNull (actual); + Assert.IsTrue (actual.Count > 0); + } + + // A test for Symbols + [Test] + public void SymbolsTest () + { + Dictionary actual = default(Dictionary); + actual = unitPro.Symbols; + + Assert.IsNotNull (actual); + Assert.IsTrue (actual.Count > 0); + } } -} - +} \ No newline at end of file diff --git a/Cubico.Tests/UnitTest.cs b/Cubico.Tests/UnitTest.cs index b4ef8df..538c291 100644 --- a/Cubico.Tests/UnitTest.cs +++ b/Cubico.Tests/UnitTest.cs @@ -4,52 +4,21 @@ using NUnit.Framework; using System.Collections.ObjectModel; -/// -///This is a test class for UnitTest and is intended -///to contain all UnitTest Unit Tests -/// -[TestClass()] +[TestFixture] public class UnitTest { + TestContext testContextInstance; + UnitProvider unitPro = new UnitProvider (); - private TestContext testContextInstance; - private UnitProvider unitPro = new UnitProvider (); - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// + // Gets or sets the test context which provides information about and functionality for the current test run. public TestContext TestContext { get { return testContextInstance; } set { testContextInstance = value; } } - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ - //Public Sub MyTestCleanup() - //End Sub - // - #endregion #region "Unit.Unit()" - [TestMethod()] + + [Test] public void UnitNewTest () { Unit testObj = new Unit (); @@ -64,10 +33,11 @@ public void UnitNewTest () Assert.IsTrue (testObj.Modifiers.Count == 0); Assert.IsTrue (string.IsNullOrEmpty(testObj.Name)); } - #endregion + #endregion #region "Unit.Unit(UnitType)" - [TestMethod()] + + [Test] [ExpectedException(typeof(ArgumentNullException))] public void UnitNewEfUnitUnitTypeNullTest () { @@ -76,7 +46,7 @@ public void UnitNewEfUnitUnitTypeNullTest () Assert.Fail ("Constructor should cause a ContractException. Nulls are not allowed"); } - [TestMethod()] + [Test] public void UnitNewEfUnitUnitTypeTest () { UnitType testunittype = new UnitType { @@ -88,7 +58,7 @@ public void UnitNewEfUnitUnitTypeTest () Assert.IsNotNull (testObj); Assert.IsNotNull (testObj.UnitType); Assert.IsTrue (testObj.UnitTypeID == 99); - Assert.AreEqual (testunittype.Name, testObj.UnitType.Name); + Assert.AreEqual (testunittype.Name, testObj.UnitType.Name); Assert.IsNotNull (testObj.Symbols); Assert.IsTrue (testObj.Symbols.Count == 0); @@ -97,10 +67,11 @@ public void UnitNewEfUnitUnitTypeTest () Assert.IsTrue (testObj.Modifiers.Count == 0); // Assert.IsTrue(testUnit.UnitModifiers(0).Value = testObj.Modifiers(0).Value) } - #endregion + #endregion #region "Unit.ParentType" - [TestMethod()] + + [Test] public void UnitParentTypeTest () { UnitType testUnitType = new UnitType { @@ -113,11 +84,11 @@ public void UnitParentTypeTest () testObj.UnitType = testUnitType; Assert.IsNotNull (testObj.UnitType); - Assert.AreEqual (testUnitType.ID, testObj.UnitType.ID); - Assert.AreEqual (testUnitType.Name, testObj.UnitType.Name); + Assert.AreEqual (testUnitType.ID, testObj.UnitType.ID); + Assert.AreEqual (testUnitType.Name, testObj.UnitType.Name); } - [TestMethod()] + [Test] public void UnitParentTypeNullTest () { Unit testObj = new Unit (); @@ -126,74 +97,37 @@ public void UnitParentTypeNullTest () Assert.IsNull (testObj.UnitType); } - #endregion + #endregion #region "Unit.ID" - [TestMethod()] + + [Test] public void UnitIDTest () { Unit testObj = new Unit (); testObj.ID = 99; - Assert.AreEqual (99, testObj.ID); + Assert.AreEqual (99, testObj.ID); } - //[TestMethod()] - //public void UnitIDNullTest() - //{ - // Unit testObj = new Unit(); - - // testObj.ID = null; - - // Assert.AreEqual(null, testObj.ID); - //} - //[TestMethod()] - //public void UnitIDNegativeTest() - //{ - // Unit testObj = new Unit(); - - // testObj.ID = -1; - - // Assert.IsTrue(testObj.ID == -1); - - // List data = Validation.DataAnnotationValidator.GetErrors(testObj).ToList; - - // Assert.IsNotNull(data); - // Assert.IsTrue(data.Count > 0); - // Assert.IsTrue(data(0).PropertyName == "ID"); - //} #endregion - #region "Unit.Name" - [TestMethod()] + + [Test] public void UnitNameTest () { Unit testObj = new Unit (); testObj.Name = "Test Name"; - Assert.AreEqual ("Test Name", testObj.Name); + Assert.AreEqual ("Test Name", testObj.Name); } - //[TestMethod()] - //public void UnitNameNullTest() - //{ - // Unit testObj = new Unit(); - - // testObj.Name = null; - // Assert.IsTrue(string.IsNullOrWhiteSpace(testObj.Name)); - - // List data = Validation.DataAnnotationValidator.GetErrors(testObj).ToList; - - // Assert.IsNotNull(data); - // Assert.IsTrue(data.Count > 0); - // Assert.IsTrue(data(0).PropertyName == "Name"); - //} #endregion - #region "IEquatable" - [TestMethod()] + + [Test] public void Unit_EqualityTest () { Unit expected = unitPro.Units ["Feet"]; @@ -202,7 +136,7 @@ public void Unit_EqualityTest () Assert.IsTrue (expected == target); } - [TestMethod()] + [Test] public void Unit_EqualityTest2 () { Unit expected = unitPro.Units ["Feet"]; @@ -211,7 +145,7 @@ public void Unit_EqualityTest2 () Assert.IsFalse (expected == target); } - [TestMethod()] + [Test] public void Unit_EqualityTest3 () { Unit expected = null; @@ -220,7 +154,7 @@ public void Unit_EqualityTest3 () Assert.IsFalse (expected == target); } - [TestMethod()] + [Test] public void Unit_EqualityTest4 () { Unit expected = unitPro.Units ["Inch"]; @@ -229,7 +163,7 @@ public void Unit_EqualityTest4 () Assert.IsFalse (expected == target); } - [TestMethod()] + [Test] public void Unit_EqualityTest5 () { Unit expected = null; @@ -238,7 +172,7 @@ public void Unit_EqualityTest5 () Assert.IsTrue (expected == target); } - [TestMethod()] + [Test] public void Unit_EqualityTest6 () { Unit expected = unitPro.Units ["Feet"]; @@ -247,7 +181,7 @@ public void Unit_EqualityTest6 () Assert.IsTrue (expected != target); } - [TestMethod()] + [Test] public void Unit_EqualityTest7 () { Unit expected = unitPro.Units ["Feet"]; @@ -256,7 +190,7 @@ public void Unit_EqualityTest7 () Assert.IsTrue (expected != target); } - [TestMethod()] + [Test] public void Unit_EqualityTest8 () { Unit expected = null; @@ -265,7 +199,7 @@ public void Unit_EqualityTest8 () Assert.IsTrue (expected != target); } - [TestMethod()] + [Test] public void Unit_EqualityTest8_1 () { Unit expected = null; @@ -274,7 +208,7 @@ public void Unit_EqualityTest8_1 () Assert.IsFalse (expected != target); } - [TestMethod()] + [Test] public void Unit_EqualityTest9 () { Unit expected = unitPro.Units ["Inch"]; @@ -283,7 +217,7 @@ public void Unit_EqualityTest9 () Assert.IsFalse (expected.Equals(target)); } - [TestMethod()] + [Test] public void Unit_EqualityTest10 () { Unit expected = unitPro.Units ["Feet"]; @@ -292,7 +226,7 @@ public void Unit_EqualityTest10 () Assert.IsTrue (expected.Equals(target)); } - [TestMethod()] + [Test] public void Unit_EqualityTest11 () { Unit expected = unitPro.Units ["Feet"]; @@ -301,7 +235,7 @@ public void Unit_EqualityTest11 () Assert.IsFalse (expected.Equals(target)); } - [TestMethod()] + [Test] public void Unit_EqualityTest12 () { Unit expected = unitPro.Units ["Feet"]; @@ -310,7 +244,7 @@ public void Unit_EqualityTest12 () Assert.IsFalse (expected.Equals(target)); } - [TestMethod()] + [Test] public void Unit_EqualityTest13 () { Unit expected = unitPro.Units ["Feet"]; @@ -319,7 +253,7 @@ public void Unit_EqualityTest13 () Assert.IsTrue (expected.Equals((object)target)); } - [TestMethod()] + [Test] public void Unit_EqualityTest14 () { Unit expected = unitPro.Units ["Feet"]; @@ -328,7 +262,7 @@ public void Unit_EqualityTest14 () Assert.IsFalse (expected.Equals((object)target)); } - [TestMethod()] + [Test] public void Unit_EqualityTest154 () { Unit expected = unitPro.Units ["Feet"]; @@ -337,84 +271,13 @@ public void Unit_EqualityTest154 () Assert.IsFalse (expected.Equals((object)target)); } - [TestMethod()] + [Test] public void Unit_EqualityTest15 () { Unit expected = unitPro.Units ["Feet"]; Assert.IsTrue (expected.GetHashCode() == expected.Name.GetHashCode()); } - #endregion - //#region "Serialization" - //[TestMethod()] - //public void Unit_BinarySerializationTest() - //{ - // Unit expected = unitPro.Units["Feet"]; - // Unit actual = default(Unit); - - // byte[] data = Utility.BinarySerialize(expected); - // actual = (Unit)Utility.BinaryDeserialize(data); - - // Assert.IsNotNull(actual); - // Assert.AreEqual(expected.ID, actual.ID); - // Assert.AreEqual(expected.Name, actual.Name); - // Assert.AreEqual(expected.DefaultSymbol, actual.DefaultSymbol); - // Assert.AreEqual(expected.IsDefault, actual.IsDefault); - // Assert.AreEqual(expected.Modifiers.Count, actual.Modifiers.Count); - // Assert.AreEqual(expected.Symbols.Count, actual.Symbols.Count); - // Assert.AreEqual(expected.UnitTypeID, actual.UnitTypeID); - //} - - //[TestMethod()] - //public void Unit_DataContractSerializationTest() - //{ - // Unit expected = unitPro.Units["Feet"]; - // Unit actual = default(Unit); - - // string data = Utility.DataContractSerialize(expected); - // actual = (Unit)Utility.DataContractDeserialize(data, typeof(Unit)); - - // Assert.IsNotNull(actual); - // Assert.AreEqual(expected.ID, actual.ID); - // Assert.AreEqual(expected.Name, actual.Name); - // Assert.AreEqual(expected.DefaultSymbol, actual.DefaultSymbol); - // Assert.AreEqual(expected.IsDefault, actual.IsDefault); - // Assert.AreEqual(expected.Modifiers.Count, actual.Modifiers.Count); - // Assert.AreEqual(expected.Symbols.Count, actual.Symbols.Count); - // Assert.AreEqual(expected.UnitTypeID, actual.UnitTypeID); - //} - //#endregion - - //Private Function InitEfObjects() As EFUnitType - //Dim efUnitTypeObj As New EFUnitType - //efUnitTypeObj.ID = 10 - //efUnitTypeObj.Name = "Test Type" - //efUnitTypeObj.Description = "Test Desc" - - //Dim efUnitObj As New EFUnit - //efUnitObj.ID = 2 - //efUnitObj.Name = "Test Unit" - //efUnitObj.UnitType = efUnitTypeObj - - //Dim efUnitModifierObj As New EFUnitModifier - //efUnitModifierObj.ID = 2 - //efUnitModifierObj.ModifierID = 2 - //efUnitModifierObj.Order = 1 - //efUnitModifierObj.Value = 0.5 - - //Dim efUnitSymbolObj As New EFUnitSymbol - //efUnitSymbolObj.ID = 3 - //efUnitSymbolObj.IsDefault = True - //efUnitSymbolObj.Symbol = "Tst" - - //efUnitModifierObj.Unit = efUnitObj - //efUnitSymbolObj.Unit = efUnitObj - - //efUnitTypeObj.Unit.Add(efUnitObj) - //efUnitObj.UnitModifiers.Add(efUnitModifierObj) - //efUnitObj.UnitSymbol.Add(efUnitSymbolObj) - - //Return efUnitTypeObj - //End Function -} + #endregion +} \ No newline at end of file diff --git a/Cubico.Tests/UnitTest1.cs b/Cubico.Tests/UnitTest1.cs deleted file mode 100644 index c19dc0f..0000000 --- a/Cubico.Tests/UnitTest1.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using NUnit.Framework; -using Cubico; - -namespace Units.Test -{ - [TestClass] - public class UnitTest1 - { - //[TestMethod] - //public void TestMethod1() - //{ - // UnitProvider up = new UnitProvider(); - // //int i = 0; - - // var fiveft = new Measurement(5, "ft"); - // var twoinch = new Measurement(2, "inch"); - - // fiveft.GetValueAs("inch"); - - // var result = fiveft + twoinch; - //} - } - //public class Observer : IObserver - //{ - - // public void OnNext(int i) - // { - - // } - - // public void OnCompleted() - // { - - // } - - // public void OnError(Exception ex) - // { - - // } - - //} - - //public class Observable : IObservable - //{ - - // public IDisposable Subscribe(IObserver obj) - // { - // return null; - // } - - //} -} diff --git a/Cubico.Tests/UnitTypeTest.cs b/Cubico.Tests/UnitTypeTest.cs index 7cb7a4e..c7fe0b6 100644 --- a/Cubico.Tests/UnitTypeTest.cs +++ b/Cubico.Tests/UnitTypeTest.cs @@ -1,54 +1,22 @@ using System; -using System.Diagnostics.Contracts; using Cubico; using NUnit.Framework; -/// -///This is a test class for UnitTest and is intended -///to contain all UnitTest Unit Tests -/// -[TestClass()] +[TestFixture] public class UnitTypeTest { + TestContext testContextInstance; + UnitProvider unitPro = new UnitProvider (); - private TestContext testContextInstance; - private UnitProvider unitPro = new UnitProvider (); - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// + // Gets or sets the test context which provides information about and functionality for the current test run. public TestContext TestContext { get { return testContextInstance; } set { testContextInstance = value; } } - #region "Additional test attributes" - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - // _ - //Public Shared Sub MyClassInitialize(ByVal testContext As TestContext) - //End Sub - // - //Use ClassCleanup to run code after all tests in a class have run - // _ - //Public Shared Sub MyClassCleanup() - //End Sub - // - //Use TestInitialize to run code before running each test - // _ - //Public Sub MyTestInitialize() - //End Sub - // - //Use TestCleanup to run code after each test has run - // _ - //Public Sub MyTestCleanup() - //End Sub - // - #endregion #region "UnitType.UnitType()" - [TestMethod()] + + [Test] public void UnitTypeNewTest () { UnitType testObj = new UnitType (); @@ -59,74 +27,37 @@ public void UnitTypeNewTest () Assert.IsTrue (testObj.Units.Count == 0); Assert.IsTrue (string.IsNullOrEmpty(testObj.Name)); } - #endregion + #endregion #region "UnitType.ID" - [TestMethod()] + + [Test] public void UnitTypeIDTest () { UnitType testObj = new UnitType (); testObj.ID = 99; - Assert.AreEqual (99, testObj.ID); + Assert.AreEqual (99, testObj.ID); } - //[TestMethod()] - //public void UnitTypeIDNullTest() - //{ - // UnitType testObj = new UnitType(); - - // testObj.ID = null; - - // Assert.AreEqual(null, testObj.ID); - //} - - //[TestMethod()] - //public void UnitTypeIDNegativeTest() - //{ - // UnitType testObj = new UnitType(); - - // testObj.ID = -1; - - // Assert.IsTrue(testObj.ID == -1); - // List data = Validation.DataAnnotationValidator.GetErrors(testObj).ToList; - - // Assert.IsNotNull(data); - // Assert.IsTrue(data.Count > 0); - // Assert.IsTrue(data(0).PropertyName == "ID"); - //} #endregion - #region "UnitType.Name" - [TestMethod()] + + [Test] public void UnitTypeNameTest () { UnitType testObj = new UnitType (); testObj.Name = "Test Name"; - Assert.AreEqual ("Test Name", testObj.Name); + Assert.AreEqual ("Test Name", testObj.Name); } - //[TestMethod()] - //public void UnitTypeNameNullTest() - //{ - // UnitType testObj = new UnitType(); - - // testObj.Name = null; - - // Assert.IsTrue(string.IsNullOrWhiteSpace(testObj.Name)); - // List data = Validation.DataAnnotationValidator.GetErrors(testObj).ToList; - - // Assert.IsNotNull(data); - // Assert.IsTrue(data.Count > 0); - // Assert.IsTrue(data(0).PropertyName == "Name"); - //} #endregion - #region "IEquatable" - [TestMethod()] + + [Test] public void UnitType_EqualityTest () { UnitType expected = unitPro.UnitTypes ["Length"]; @@ -135,7 +66,7 @@ public void UnitType_EqualityTest () Assert.IsTrue (expected == target); } - [TestMethod()] + [Test] public void UnitType_EqualityTest2 () { UnitType expected = unitPro.UnitTypes ["Length"]; @@ -144,7 +75,7 @@ public void UnitType_EqualityTest2 () Assert.IsFalse (expected == target); } - [TestMethod()] + [Test] public void UnitType_EqualityTest3 () { UnitType expected = null; @@ -153,7 +84,7 @@ public void UnitType_EqualityTest3 () Assert.IsFalse (expected == target); } - [TestMethod()] + [Test] public void UnitType_EqualityTest4 () { UnitType expected = unitPro.UnitTypes ["Mass"]; @@ -162,7 +93,7 @@ public void UnitType_EqualityTest4 () Assert.IsFalse (expected == target); } - [TestMethod()] + [Test] public void UnitType_EqualityTest5 () { UnitType expected = null; @@ -171,7 +102,7 @@ public void UnitType_EqualityTest5 () Assert.IsTrue (expected == target); } - [TestMethod()] + [Test] public void UnitType_EqualityTest6 () { UnitType expected = unitPro.UnitTypes ["Length"]; @@ -180,7 +111,7 @@ public void UnitType_EqualityTest6 () Assert.IsTrue (expected != target); } - [TestMethod()] + [Test] public void UnitType_EqualityTest7 () { UnitType expected = unitPro.UnitTypes ["Length"]; @@ -189,7 +120,7 @@ public void UnitType_EqualityTest7 () Assert.IsTrue (expected != target); } - [TestMethod()] + [Test] public void UnitType_EqualityTest8 () { UnitType expected = null; @@ -198,7 +129,7 @@ public void UnitType_EqualityTest8 () Assert.IsTrue (expected != target); } - [TestMethod()] + [Test] public void UnitType_EqualityTest8_1 () { UnitType expected = null; @@ -207,7 +138,7 @@ public void UnitType_EqualityTest8_1 () Assert.IsFalse (expected != target); } - [TestMethod()] + [Test] public void UnitType_EqualityTest9 () { UnitType expected = unitPro.UnitTypes ["Mass"]; @@ -216,7 +147,7 @@ public void UnitType_EqualityTest9 () Assert.IsFalse (expected.Equals(target)); } - [TestMethod()] + [Test] public void UnitType_EqualityTest10 () { UnitType expected = unitPro.UnitTypes ["Length"]; @@ -225,7 +156,7 @@ public void UnitType_EqualityTest10 () Assert.IsTrue (expected.Equals(target)); } - [TestMethod()] + [Test] public void UnitType_EqualityTest11 () { UnitType expected = unitPro.UnitTypes ["Length"]; @@ -234,7 +165,7 @@ public void UnitType_EqualityTest11 () Assert.IsFalse (expected.Equals(target)); } - [TestMethod()] + [Test] public void UnitType_EqualityTest12 () { UnitType expected = unitPro.UnitTypes ["Length"]; @@ -243,7 +174,7 @@ public void UnitType_EqualityTest12 () Assert.IsFalse (expected.Equals(target)); } - [TestMethod()] + [Test] public void UnitType_EqualityTest13 () { UnitType expected = unitPro.UnitTypes ["Length"]; @@ -252,7 +183,7 @@ public void UnitType_EqualityTest13 () Assert.IsTrue (expected.Equals((object)target)); } - [TestMethod()] + [Test] public void UnitType_EqualityTest14 () { UnitType expected = unitPro.UnitTypes ["Length"]; @@ -261,7 +192,7 @@ public void UnitType_EqualityTest14 () Assert.IsFalse (expected.Equals((object)target)); } - [TestMethod()] + [Test] public void UnitType_EqualityTest154 () { UnitType expected = unitPro.UnitTypes ["Length"]; @@ -270,47 +201,13 @@ public void UnitType_EqualityTest154 () Assert.IsFalse (expected.Equals((object)target)); } - [TestMethod()] + [Test] public void UnitType_EqualityTest15 () { UnitType expected = unitPro.UnitTypes ["Length"]; Assert.IsTrue (expected.GetHashCode() == expected.Name.GetHashCode()); } - #endregion - #region "Serialization" - //[TestMethod()] - //public void UnitType_BinarySerializationTest() - //{ - // UnitType expected = unitPro.UnitTypes["Length"]; - // UnitType actual = default(UnitType); - - // byte[] data = Utility.BinarySerialize(expected); - // actual = (UnitType)Utility.BinaryDeserialize(data); - - // Assert.IsNotNull(actual); - // Assert.AreEqual(expected.ID, actual.ID); - // Assert.AreEqual(expected.Name, actual.Name); - // Assert.AreEqual(expected.Description, actual.Description); - // Assert.AreEqual(expected.Units.Count, actual.Units.Count); - //} - - //[TestMethod()] - //public void UnitType_DataContractSerializationTest() - //{ - // UnitType expected = unitPro.UnitTypes["Length"]; - // UnitType actual = default(UnitType); - - // string data = Utility.DataContractSerialize(expected); - // actual = (UnitType)Utility.DataContractDeserialize(data, typeof(UnitType)); - - // Assert.IsNotNull(actual); - // Assert.AreEqual(expected.ID, actual.ID); - // Assert.AreEqual(expected.Name, actual.Name); - // Assert.AreEqual(expected.Description, actual.Description); - // Assert.AreEqual(expected.Units.Count, actual.Units.Count); - //} #endregion -} - +} \ No newline at end of file diff --git a/Cubico.userprefs b/Cubico.userprefs index 7a419c9..0e663a0 100644 --- a/Cubico.userprefs +++ b/Cubico.userprefs @@ -1,20 +1,6 @@  - - - - - - - - - - - - - - - + From ad26c66ef7f17387b87c2c43145415f99bf4a325 Mon Sep 17 00:00:00 2001 From: Taylor Shuler Date: Wed, 19 Jun 2013 12:04:41 -0700 Subject: [PATCH 3/3] Pushed project version --- CHANGELOG.txt | 8 ++++++-- Cubico.Tests/Cubico.Tests.csproj | 1 + Cubico.Tests/Properties/AssemblyInfo.cs | 26 +++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 Cubico.Tests/Properties/AssemblyInfo.cs diff --git a/CHANGELOG.txt b/CHANGELOG.txt index da9046d..4d853b2 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,4 +1,8 @@ -README +CHANGELOG + +Version 0.2 +- Added number string parser +- Converted tests to run against NUnit Version 0.1 -A .Net based Unit Conversion API that is web service friendly and comprehensive, yet easy to program against. \ No newline at end of file +- Initial project \ No newline at end of file diff --git a/Cubico.Tests/Cubico.Tests.csproj b/Cubico.Tests/Cubico.Tests.csproj index fb8b468..d5acfee 100644 --- a/Cubico.Tests/Cubico.Tests.csproj +++ b/Cubico.Tests/Cubico.Tests.csproj @@ -40,6 +40,7 @@ + diff --git a/Cubico.Tests/Properties/AssemblyInfo.cs b/Cubico.Tests/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..5d21599 --- /dev/null +++ b/Cubico.Tests/Properties/AssemblyInfo.cs @@ -0,0 +1,26 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle("Cubico.Tests")] +[assembly: AssemblyDescription("Tests for Cubico")] +//[assembly: AssemblyConfiguration("")] +//[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Cubico.Tests")] +//[assembly: AssemblyCopyright("")] +//[assembly: AssemblyTrademark("")] +//[assembly: AssemblyCulture("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +//[assembly: AssemblyVersion("1.0.*")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] \ No newline at end of file