diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index 412eeda..0000000
--- a/.gitattributes
+++ /dev/null
@@ -1,22 +0,0 @@
-# Auto detect text files and perform LF normalization
-* text=auto
-
-# Custom for Visual Studio
-*.cs diff=csharp
-*.sln merge=union
-*.csproj merge=union
-*.vbproj merge=union
-*.fsproj merge=union
-*.dbproj merge=union
-
-# Standard to msysgit
-*.doc diff=astextplain
-*.DOC diff=astextplain
-*.docx diff=astextplain
-*.DOCX diff=astextplain
-*.dot diff=astextplain
-*.DOT diff=astextplain
-*.pdf diff=astextplain
-*.PDF diff=astextplain
-*.rtf diff=astextplain
-*.RTF diff=astextplain
diff --git a/.gitignore b/.gitignore
index aa8811c..59b2335 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,51 +1,20 @@
+## Ignore Visual Studio temporary files, build results, and files generated by popular Visual Studio add-ons.
-#################
-## Eclipse
-#################
-
-*.pydevproject
-.project
-.metadata
-bin/**
-tmp/**
-tmp/**/*
-*.tmp
-*.bak
-*.swp
-*~.nib
-local.properties
-.classpath
-.settings/
-.loadpath
-
-# External tool builders
-.externalToolBuilders/
-
-# Locally stored "Eclipse launch configurations"
-*.launch
-
-# CDT-specific
-.cproject
-
-# PDT-specific
-.buildpath
-
-
-#################
-## Visual Studio
-#################
-
-## Ignore Visual Studio temporary files, build results, and
-## files generated by popular Visual Studio add-ons.
+# OS generated files
+.DS_Store
# User-specific files
+*.sln.docstates
*.suo
*.user
-*.sln.docstates
+*.userprefs
# Build results
-**/[Dd]ebug/
-**/[Rr]elease/
+[Bb]in
+[Oo]bj
+[Dd]ebug/
+[Rr]elease/
+x64/
*_i.c
*_p.c
*.ilk
@@ -57,16 +26,15 @@ local.properties
*.pgd
*.rsp
*.sbr
+[Tt]est-[Rr]esults/*
*.tlb
*.tli
*.tlh
*.tmp
+*.log
*.vspscc
+*.vssscc
.builds
-**/*.dotCover
-
-## TODO: If you have NuGet Package Restore enabled, uncomment this
-#**/packages/
# Visual C++ cache files
ipch/
@@ -78,10 +46,18 @@ ipch/
# Visual Studio profiler
*.psess
*.vsp
+*.vspx
+
+# Guidance Automation Toolkit
+*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*
+# NCrunch
+*.ncrunch*
+.*crunch*.local.xml
+
# Installshield output folder
[Ee]xpress
@@ -98,68 +74,19 @@ DocProject/Help/html
# Click-Once directory
publish
+# Publish Web Output
+*.Publish.xml
+
# Others
-[Bb]in
-[Oo]bj
sql
-TestResults
*.Cache
ClientBin
-stylecop.*
+[Ss]tyle[Cc]op.*
~$*
*.dbmdl
Generated_Code #added for RIA/Silverlight projects
-# Backup & report files from converting an old project file to a newer
-# Visual Studio version. Backup files are not needed, because we have git ;-)
+# Backup & report files from converting an old project file to a newer Visual Studio version.
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
-
-
-
-############
-## Windows
-############
-
-# Windows image file caches
-Thumbs.db
-
-# Folder config file
-Desktop.ini
-
-
-#############
-## Python
-#############
-
-*.py[co]
-
-# Packages
-*.egg
-*.egg-info
-dist
-build
-eggs
-parts
-bin
-var
-sdist
-develop-eggs
-.installed.cfg
-
-# Installer logs
-pip-log.txt
-
-# Unit test / coverage reports
-.coverage
-.tox
-
-#Translations
-*.mo
-
-#Mr Developer
-.mr.developer.cfg
-
-# Mac crap
-.DS_Store
diff --git a/Cubico.Tests/ConversionResultTest.cs b/Cubico.Tests/ConversionResultTest.cs
index 0143e54..8c8ec9a 100644
--- a/Cubico.Tests/ConversionResultTest.cs
+++ b/Cubico.Tests/ConversionResultTest.cs
@@ -8,15 +8,12 @@ namespace Cubico.Tests
public class ConversionResultTest
{
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 "ConversionResult.ConversionResult()"
-
[Test]
public void ConversionResultConstructorTest ()
{
@@ -27,10 +24,8 @@ public void ConversionResultConstructorTest ()
Assert.AreEqual (Result.NoError, res.Result);
Assert.AreEqual (null, res.Symbol);
}
-
#endregion
#region "ConversionResult.ConversionResult(Double)"
-
[Test]
public void ConversionResultConstructorDoubleTest ()
{
@@ -52,10 +47,8 @@ public void ConversionResultConstructorDoubleZeroTest ()
Assert.AreEqual (Result.NoError, res.Result);
Assert.AreEqual (null, res.Symbol);
}
-
#endregion
#region "ConversionResult.ConversionResult(Double, String)"
-
[Test]
public void ConversionResultConstructorDoubleStringTest ()
{
@@ -99,10 +92,8 @@ public void ConversionResultConstructorDoubleStringZeroTest3 ()
Assert.AreEqual (Result.NoError, res.Result);
Assert.AreEqual ("lb", res.Symbol);
}
-
#endregion
#region "ConversionResult.ConversionResult(Double, Result)"
-
[Test]
public void ConversionResultConstructorDoubleResultTest ()
{
@@ -146,10 +137,8 @@ public void ConversionResultConstructorDoubleResultNullTest3 ()
Assert.AreEqual (Result.GenericError, res.Result);
Assert.AreEqual (null, res.Symbol);
}
-
#endregion
#region "ConversionResult.ConversionResult(Result)"
-
[Test]
public void ConversionResultConstructorResultTest ()
{
@@ -171,10 +160,8 @@ public void ConversionResultConstructorResultNullTest ()
Assert.AreEqual (Result.NoError, res.Result);
Assert.AreEqual (null, res.Symbol);
}
-
#endregion
#region "ConversionResult.Result"
-
[Test]
public void ConversionResultResultTest ()
{
@@ -200,10 +187,8 @@ public void ConversionResultResultNullTest ()
Assert.AreEqual (Result.NoError, res.Result);
}
-
#endregion
#region "ConversionResult.Value"
-
[Test]
public void ConversionResultValueTest ()
{
@@ -229,10 +214,8 @@ public void ConversionResultValueNullTest ()
Assert.AreEqual (0, res.Value);
}
-
#endregion
#region "ConversionResult.Symbol"
-
[Test]
public void ConversionResultSymbolTest ()
{
@@ -258,7 +241,6 @@ public void ConversionResultSymbolNullTest ()
Assert.AreEqual (null, res.Symbol);
}
-
#endregion
}
}
\ No newline at end of file
diff --git a/Cubico.Tests/MeasurementTests.cs b/Cubico.Tests/MeasurementTests.cs
index 01e7773..ff8da50 100644
--- a/Cubico.Tests/MeasurementTests.cs
+++ b/Cubico.Tests/MeasurementTests.cs
@@ -9,15 +9,12 @@ public class MeasurementTests
{
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 "Measurement.Value"
-
[Test]
public void MeasurementValueTest ()
{
@@ -28,10 +25,8 @@ public void MeasurementValueTest ()
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.Unit"
-
[Test]
public void MeasurementUnitTest ()
{
@@ -42,10 +37,8 @@ public void MeasurementUnitTest ()
Assert.AreEqual (expected.Name, actual.Name);
}
-
#endregion
#region "Measurement.Symbol"
-
[Test]
public void MeasurementSymbolTest ()
{
@@ -66,10 +59,8 @@ public void MeasurementSymbolNullTest ()
actual = target.Symbol;
}
-
#endregion
#region "Measurement.IsValid"
-
[Test]
public void MeasurementIsValidTest ()
{
@@ -91,7 +82,6 @@ public void MeasurementIsValidNullTest ()
Assert.AreEqual (expected, actual);
}
-
//[Test]
//public void MeasurementIsValidNullTest2()
//{
@@ -99,12 +89,10 @@ public void MeasurementIsValidNullTest ()
// Measurement target = null;
// bool actual = false;
// actual = target.IsValid;
-
// Assert.AreEqual(expected, actual);
// Assert.IsTrue(target == null);
// Assert.IsFalse(target != null);
//}
-
[Test]
public void MeasurementIsValidBadUnitTest ()
{
@@ -115,10 +103,8 @@ public void MeasurementIsValidBadUnitTest ()
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.FullValue"
-
[Test]
public void MeasurementFullValueTest ()
{
@@ -129,10 +115,8 @@ public void MeasurementFullValueTest ()
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.Flags"
-
[Test]
public void MeasurementFlagsTest ()
{
@@ -143,10 +127,8 @@ public void MeasurementFlagsTest ()
actual = target.Flags;
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.Converter"
-
[Test]
public void MeasurementConverterTest ()
{
@@ -156,10 +138,8 @@ public void MeasurementConverterTest ()
Assert.IsNotNull (actual);
}
-
#endregion
#region "Measurement.ConversionResult"
-
[Test]
public void MeasurementConversionResultTest ()
{
@@ -183,10 +163,8 @@ public void MeasurementConversionResultNullTest ()
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.ValidateEntry(Value,Symbol)"
-
[Test]
public void MeasurementValidateEntryValueSymbolTest ()
{
@@ -238,10 +216,8 @@ public void MeasurementValidateEntryValueSymbolMinTest ()
actual = target.ValidateEntry (value, symbol);
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.ValidateEntry(entry)"
-
[Test]
public void MeasurementValidateEntrySymbolTest ()
{
@@ -289,10 +265,8 @@ public void MeasurementValidateEntrySymbolMinTest ()
actual = target.ValidateEntry (entry);
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.ToString"
-
[Test]
public void MeasurementToStringTest ()
{
@@ -302,10 +276,8 @@ public void MeasurementToStringTest ()
actual = target.ToString ();
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.SetValue(measurementString)"
-
[Test]
public void MeasurementSetValueStringTest ()
{
@@ -373,10 +345,8 @@ public void MeasurementSetValueStringEmptyTest ()
actual = target.SetValue (string.Empty);
Assert.Fail ();
}
-
#endregion
#region "Measurement.SetValue(value)"
-
[Test]
public void MeasurementSetValueTest ()
{
@@ -387,10 +357,8 @@ public void MeasurementSetValueTest ()
actual = target.SetValue (value);
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.SetUnit(symbol)"
-
[Test]
public void MeasurementSetUnitTest ()
{
@@ -436,10 +404,8 @@ public void MeasurementSetUnitEmptyTest ()
actual = target.SetUnit (string.Empty);
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.SetMinBound"
-
[Test]
public void MeasurementSetMinBoundTest ()
{
@@ -483,10 +449,8 @@ public void MeasurementSetMinBoundEmptyTest ()
actual = target.SetMinBound (1, string.Empty);
Assert.Fail ();
}
-
#endregion
#region "Measurement.SetMaxBound"
-
[Test]
public void MeasurementSetMaxBoundTest ()
{
@@ -530,10 +494,8 @@ public void MeasurementSetMaxBoundEmptyTest ()
actual = target.SetMinBound (1, string.Empty);
Assert.Fail ();
}
-
#endregion
#region "Measurement.Operator -"
-
[Test]
public void Measurementop_SubtractionTest ()
{
@@ -555,10 +517,8 @@ public void Measurementop_SubtractionDiffUnitTest ()
actual = (d1 - d2);
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.Operator *"
-
[Test]
public void Measurementop_MultiplyTest ()
{
@@ -580,10 +540,8 @@ public void Measurementop_MultiplyDiffUnitTest ()
actual = (d1 * d2);
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.Operator <="
-
[Test]
public void Measurementop_LessThanOrEqualTest ()
{
@@ -649,10 +607,8 @@ public void Measurementop_LessThanOrEqualFalseDiffUnitTest ()
actual = (left <= right);
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.Operator <"
-
[Test]
public void Measurementop_LessThanTest ()
{
@@ -696,10 +652,8 @@ public void Measurementop_LessThanFalseDiffUnitTest ()
actual = (left < right);
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.Operator <>"
-
[Test]
public void Measurementop_InequalityTest ()
{
@@ -743,10 +697,8 @@ public void Measurementop_InequalityDiffUnitFalseTest ()
actual = (left != right);
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.Operator >="
-
[Test]
public void Measurementop_GreaterThanOrEqualTest ()
{
@@ -812,10 +764,8 @@ public void Measurementop_GreaterThanOrEqualDiffUnitFalseTest ()
actual = (left >= right);
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.Operator >"
-
[Test]
public void Measurementop_GreaterThanTest ()
{
@@ -859,10 +809,8 @@ public void Measurementop_GreaterThanDiffUnitFalseTest ()
actual = (left > right);
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.Operator ="
-
[Test]
public void Measurementop_EqualityTest ()
{
@@ -906,10 +854,8 @@ public void Measurementop_EqualityDiffUnitFalseTest ()
actual = (left == right);
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.Operator /"
-
[Test]
public void Measurementop_DivisionTest ()
{
@@ -931,10 +877,8 @@ public void Measurementop_DivisionDiffUnitTest ()
actual = (d1 / d2);
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.Operator +"
-
[Test]
public void Measurementop_AdditionTest ()
{
@@ -956,20 +900,18 @@ public void Measurementop_AdditionDiffUnitTest ()
actual = (d1 + d2);
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.GetValueAs(unitSymbol)"
-
[Test]
- public void MeasurementGetValueAsTest()
+ 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);
+ 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]
@@ -984,10 +926,8 @@ public void MeasurementGetValueAsInvalidUnitSymbolTest ()
Assert.IsTrue (actual.Value == 0);
Assert.IsTrue (actual.Value == 0);
}
-
#endregion
#region "Measurement.GetStringValueAs(unitSymbol)"
-
[Test]
public void MeasurementGetStringValueAsTest ()
{
@@ -1009,10 +949,8 @@ public void MeasurementGetStringValueAsInvalidUnitSymbolTest ()
actual = target.GetStringValueAs (unitSymbol);
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.GetHashCode"
-
[Test]
public void MeasurementGetHashCodeTest ()
{
@@ -1033,10 +971,8 @@ public void MeasurementGetHashCodeTest ()
actual = target.GetHashCode ();
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.Equals(Of Measurement)"
-
[Test]
public void MeasurementEqualsOfTest ()
{
@@ -1080,10 +1016,8 @@ public void MeasurementEqualsOfInvalidUnitTest ()
actual = target.Equals (other);
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.Equals(obj)"
-
[Test]
public void MeasurementEqualsTest ()
{
@@ -1138,10 +1072,8 @@ public void MeasurementEqualsInvalidTypeTest ()
actual = target.Equals (obj);
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.CompareTo"
-
[Test]
public void MeasurementCompareToTest ()
{
@@ -1196,10 +1128,8 @@ public void MeasurementCompareToGreaterLessUnitTest ()
actual = target.CompareTo (other);
Assert.AreEqual (expected, actual);
}
-
#endregion
#region "Measurement.Measurement(Value, UnitSymbol)"
-
[Test]
public void MeasurementConstructorValueUnitSymbolTest ()
{
@@ -1261,10 +1191,8 @@ public void MeasurementConstructorValueUnitSymbolEmptyTest ()
Assert.AreEqual (null, target.Unit);
Assert.AreEqual (10, target.Value);
}
-
#endregion
#region "Measurement.Measurement(unitSymbol)"
-
[Test]
public void MeasurementConstructorUnitSymbolTest ()
{
@@ -1301,10 +1229,8 @@ public void MeasurementConstructorUnitSymbolEmptyTest ()
Assert.AreEqual (null, target.Unit);
Assert.AreEqual (0, target.Value);
}
-
#endregion
#region "Measurement.Measurement(Value, UnitSymbol, ConversionResult)"
-
[Test]
public void MeasurementConstructorValueUnitSymbolResultTest ()
{
@@ -1334,10 +1260,8 @@ public void MeasurementConstructorValueUnitSymbolResultTest2 ()
Assert.AreEqual ("Feet", target.Unit.Name);
Assert.AreEqual (10, target.Value);
}
-
#endregion
#region "Measurement.Measurement(Value,Unit,ConversionResult)"
-
// A test for Measurement Constructor
[Test]
public void MeasurementConstructorValueUnitConversionResultTest ()
@@ -1365,10 +1289,8 @@ public void MeasurementConstructorValueUnitConversionResultNullTest ()
Assert.IsNull (target.Unit);
Assert.AreEqual (0, target.Value);
}
-
#endregion
#region "Measurement.Measurement(Value,Result)"
-
// A test for Measurement Constructor
[Test]
public void MeasurementConstructorValueResultTest ()
@@ -1395,7 +1317,6 @@ public void MeasurementConstructorValueResultNullTest ()
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
index fb56344..cf58478 100644
--- a/Cubico.Tests/ModifierTest.cs
+++ b/Cubico.Tests/ModifierTest.cs
@@ -8,15 +8,12 @@ namespace Cubico.Tests
public class ModifierTest
{
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 "Modifier.Modifier()"
-
[Test]
public void ModifierNewTest ()
{
@@ -27,10 +24,8 @@ public void ModifierNewTest ()
Assert.IsTrue (testObj.Value == 0);
Assert.IsNull (testObj.ParentUnit);
}
-
#endregion
#region "Modifier.ID"
-
[Test]
public void ModifierIDTest ()
{
@@ -39,10 +34,8 @@ public void ModifierIDTest ()
Assert.AreEqual (99, testObj.ID);
}
-
#endregion
#region "Modifier.ParentUnit"
-
[Test]
public void ModifierParentUnitTest ()
{
@@ -67,22 +60,18 @@ public void ModifierParentUnitNullTest ()
Assert.IsNull (testObj.ParentUnit);
}
-
#endregion
#region "Modifier.Value"
-
[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
#region "Modifier.Order"
-
[Test]
public void ModifierOrderTest ()
{
@@ -91,10 +80,8 @@ public void ModifierOrderTest ()
Assert.AreEqual (10, testObj.Order);
}
-
#endregion
#region "Modifier.ModifierType"
-
[Test]
public void ModifierTypeTest ()
{
@@ -103,7 +90,6 @@ public void ModifierTypeTest ()
Assert.AreEqual (ModifierType.Multiply, testObj.ModifierType);
}
-
#endregion
}
}
\ No newline at end of file
diff --git a/Cubico.Tests/SymbolTest.cs b/Cubico.Tests/SymbolTest.cs
index b09d6cc..843c54e 100644
--- a/Cubico.Tests/SymbolTest.cs
+++ b/Cubico.Tests/SymbolTest.cs
@@ -9,15 +9,12 @@ public class SymbolTest
{
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 "Symbol.Symbol()"
-
[Test]
public void SymbolNewTest ()
{
@@ -28,10 +25,8 @@ public void SymbolNewTest ()
Assert.IsTrue (testObj.Value == null);
Assert.IsNull (testObj.Unit);
}
-
#endregion
#region "Symbol.Symbol(Unit)"
-
[Test]
[ExpectedException(typeof(ArgumentNullException))]
public void SymbolNewEfUnitSymbolUnitNullTest ()
@@ -52,23 +47,21 @@ public void SymbolNewEfUnitSymbolUnitTest ()
Assert.IsNotNull (testObj);
- Assert.IsTrue (string.IsNullOrEmpty(testObj.Value));
+ Assert.IsTrue (string.IsNullOrEmpty (testObj.Value));
Assert.IsNotNull (testObj.Unit);
Assert.IsTrue (testObj.Unit.ID == unitObj.ID);
}
-
#endregion
#region "Symbol.ID"
-
[Test]
- public void SymbolIDNullTest()
+ public void SymbolIDNullTest ()
{
- Symbol testObj = new Symbol();
+ Symbol testObj = new Symbol ();
- testObj.Id = null;
+ testObj.Id = null;
- Assert.AreEqual(null, testObj.Id);
+ Assert.AreEqual (null, testObj.Id);
}
[Test]
@@ -80,10 +73,8 @@ public void SymbolIDTest ()
Assert.AreEqual (99, testObj.Id);
}
-
#endregion
#region "Symbol.ParentUnit"
-
[Test]
public void SymbolParentUnitTest ()
{
@@ -105,10 +96,8 @@ public void SymbolParentUnitNullTest ()
Assert.IsNull (testObj.Unit);
}
-
#endregion
#region "Symbol.Value"
-
[Test]
public void SymbolValueTest ()
{
@@ -118,10 +107,8 @@ public void SymbolValueTest ()
Assert.AreEqual ("Test Name", testObj.Value);
}
-
#endregion
#region "Symbol.IsDefault"
-
[Test]
public void SymbolIsDefaultTest ()
{
@@ -131,10 +118,8 @@ public void SymbolIsDefaultTest ()
Assert.AreEqual (true, testObj.IsDefault);
}
-
#endregion
#region "IEquatable"
-
[Test]
public void Symbol_EqualityTest ()
{
@@ -222,7 +207,7 @@ public void Unit_EqualityTest9 ()
Symbol expected = unitPro.Symbols ["in"].Symbols [0];
Symbol target = unitPro.Symbols ["ft"].Symbols [0];
- Assert.IsFalse (expected.Equals(target));
+ Assert.IsFalse (expected.Equals (target));
}
[Test]
@@ -231,7 +216,7 @@ public void Unit_EqualityTest10 ()
Symbol expected = unitPro.Symbols ["ft"].Symbols [0];
Symbol target = unitPro.Symbols ["ft"].Symbols [0];
- Assert.IsTrue (expected.Equals(target));
+ Assert.IsTrue (expected.Equals (target));
}
[Test]
@@ -240,7 +225,7 @@ public void Unit_EqualityTest11 ()
Symbol expected = unitPro.Symbols ["ft"].Symbols [0];
Symbol target = unitPro.Symbols ["in"].Symbols [0];
- Assert.IsFalse (expected.Equals(target));
+ Assert.IsFalse (expected.Equals (target));
}
[Test]
@@ -249,7 +234,7 @@ public void Unit_EqualityTest12 ()
Symbol expected = unitPro.Symbols ["ft"].Symbols [0];
Symbol target = null;
- Assert.IsFalse (expected.Equals(target));
+ Assert.IsFalse (expected.Equals (target));
}
[Test]
@@ -258,7 +243,7 @@ public void Unit_EqualityTest13 ()
Symbol expected = unitPro.Symbols ["ft"].Symbols [0];
Symbol target = unitPro.Symbols ["ft"].Symbols [0];
- Assert.IsTrue (expected.Equals((object)target));
+ Assert.IsTrue (expected.Equals ((object)target));
}
[Test]
@@ -267,7 +252,7 @@ public void Unit_EqualityTest14 ()
Symbol expected = unitPro.Symbols ["ft"].Symbols [0];
Symbol target = unitPro.Symbols ["in"].Symbols [0];
- Assert.IsFalse (expected.Equals((object)target));
+ Assert.IsFalse (expected.Equals ((object)target));
}
[Test]
@@ -276,7 +261,7 @@ public void Unit_EqualityTest154 ()
Symbol expected = unitPro.Symbols ["ft"].Symbols [0];
Symbol target = null;
- Assert.IsFalse (expected.Equals((object)target));
+ Assert.IsFalse (expected.Equals ((object)target));
}
[Test]
@@ -284,9 +269,8 @@ public void Unit_EqualityTest15 ()
{
Symbol expected = unitPro.Symbols ["ft"].Symbols [0];
- Assert.IsTrue (expected.GetHashCode() == expected.Value.GetHashCode());
+ Assert.IsTrue (expected.GetHashCode () == expected.Value.GetHashCode ());
}
-
#endregion
}
}
\ No newline at end of file
diff --git a/Cubico.Tests/UnitConverterTest.cs b/Cubico.Tests/UnitConverterTest.cs
index 41ff1d6..c0374b5 100644
--- a/Cubico.Tests/UnitConverterTest.cs
+++ b/Cubico.Tests/UnitConverterTest.cs
@@ -9,15 +9,12 @@ public class UnitConverterTest
{
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 "UnitConverter.ParseUnitString"
-
[Test]
[TestCase(UnitTestCategory.Unit)]
public void UnitConverter_ParseUnitStringTest ()
@@ -189,10 +186,8 @@ public void UnitConverter_ParseUnitStringEmptyTest ()
Assert.AreNotEqual (expected, actual);
Assert.AreEqual (expected.ConversionResult, actual.ConversionResult);
}
-
#endregion
#region "UnitConverter.IsCompatible"
-
[Test]
[TestCase(UnitTestCategory.Integration)]
public void UnitConverter_IsCompatibleTest ()
@@ -292,10 +287,8 @@ public void UnitConverter_IsCompatibleRightEmptyTest ()
Assert.Fail ();
}
-
#endregion
#region "UnitProvider.GetUnitBySymbol"
-
[Test]
[TestCase(UnitTestCategory.CRUD)]
public void UnitConverter_GetUnitBySymbol_Test ()
@@ -343,10 +336,8 @@ public void UnitConverter_GetUnitBySymbol_UnrecognizedSymbol_Test ()
actual = target.GetUnitByName (unitName);
Assert.Fail ();
}
-
#endregion
#region "UnitConverter.GetUnitByName"
-
[Test]
[TestCase(UnitTestCategory.CRUD)]
public void UnitConverter_GetUnitByName_Test ()
@@ -396,12 +387,10 @@ public void UnitConverter_GetUnitByName_UnrecognizedName_Test ()
actual = target.GetUnitByName (unitName);
Assert.Fail ();
}
-
#endregion
#region "UnitConverter.ConvertUnits"
#region "Temperature Tests"
#region "Source as Kelvin"
-
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -411,7 +400,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Celcius_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "K";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(-173.15), "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);
@@ -426,7 +415,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Celcius_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "K";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(-272.65), "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);
@@ -441,7 +430,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Celcius_Test3 ()
double value = Convert.ToDouble (0);
string currentUnitName = "K";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(-273.15), "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);
@@ -456,7 +445,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Fahrenheit_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "K";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(-279.67), "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);
@@ -471,7 +460,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Fahrenheit_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "K";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(-458.77), "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);
@@ -486,7 +475,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Fahrenheit_Test3 ()
double value = Convert.ToDouble (0);
string currentUnitName = "K";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(-459.67), "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);
@@ -501,7 +490,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Millikelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "K";
string targetUnitName = "mK";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -516,7 +505,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Millikelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "K";
string targetUnitName = "mK";
- Measurement expected = new Measurement (Convert.ToDouble(500), "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);
@@ -531,7 +520,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Microkelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "K";
string targetUnitName = "µK";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "µ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);
@@ -546,7 +535,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Microkelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "K";
string targetUnitName = "µK";
- Measurement expected = new Measurement (Convert.ToDouble(500000), "µ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);
@@ -561,7 +550,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_nK_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "K";
string targetUnitName = "nK";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "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);
@@ -576,7 +565,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_nK_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "K";
string targetUnitName = "nK";
- Measurement expected = new Measurement (Convert.ToDouble(500000000), "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);
@@ -591,7 +580,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_kK_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "K";
string targetUnitName = "kK";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -606,7 +595,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_kK_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "K";
string targetUnitName = "kK";
- Measurement expected = new Measurement (Convert.ToDouble(0.0005), "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);
@@ -621,7 +610,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Megakelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "K";
string targetUnitName = "MK";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -636,7 +625,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Megakelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "K";
string targetUnitName = "MK";
- Measurement expected = new Measurement (Convert.ToDouble(5E-07), "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);
@@ -651,7 +640,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Reaumur_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "K";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(-138.52), "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);
@@ -666,7 +655,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Reaumur_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "K";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(-218.12), "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);
@@ -681,7 +670,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Reaumur_Test3 ()
double value = Convert.ToDouble (0);
string currentUnitName = "K";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(-218.52), "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);
@@ -696,7 +685,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Rankine_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "K";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(180), "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);
@@ -711,7 +700,7 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Rankine_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "K";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(0.9), "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);
@@ -726,15 +715,13 @@ public void UnitConverter_ConvertUnits_Kelvin_to_Rankine_Test3 ()
double value = Convert.ToDouble (0);
string currentUnitName = "K";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(0), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -744,7 +731,7 @@ public void UnitConverter_ConvertUnits_Celcius_to_Kelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "C";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(373.15), "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);
@@ -759,7 +746,7 @@ public void UnitConverter_ConvertUnits_Celcius_to_Kelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "C";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(273.65), "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);
@@ -774,7 +761,7 @@ public void UnitConverter_ConvertUnits_Celcius_to_Kelvin_Test3 ()
double value = Convert.ToDouble (0);
string currentUnitName = "C";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(273.15), "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);
@@ -789,7 +776,7 @@ public void UnitConverter_ConvertUnits_Celsius_to_Fahrenheit_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "C";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(212), "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);
@@ -804,7 +791,7 @@ public void UnitConverter_ConvertUnits_Celsius_to_Fahrenheit_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "C";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(32.9), "F");
+ Measurement expected = new Measurement (Convert.ToDouble (32.9), "F");
Measurement actual;
actual = target.ConvertUnits (value, currentUnitName, targetUnitName);
Assert.AreEqual (expected.Value, actual.Value);
@@ -819,7 +806,7 @@ public void UnitConverter_ConvertUnits_Celsius_to_Fahrenheit_Test3 ()
double value = Convert.ToDouble (0);
string currentUnitName = "C";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(32), "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);
@@ -834,7 +821,7 @@ public void UnitConverter_ConvertUnits_Celsius_to_Millikelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "C";
string targetUnitName = "mK";
- Measurement expected = new Measurement (Convert.ToDouble(373150), "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);
@@ -849,7 +836,7 @@ public void UnitConverter_ConvertUnits_Celsius_to_Millikelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "C";
string targetUnitName = "mK";
- Measurement expected = new Measurement (Convert.ToDouble(273650), "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);
@@ -864,7 +851,7 @@ public void UnitConverter_ConvertUnits_Celsius_to_Microkelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "C";
string targetUnitName = "µK";
- Measurement expected = new Measurement (Convert.ToDouble(373150000), "µ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);
@@ -879,7 +866,7 @@ public void UnitConverter_ConvertUnits_Celsius_to_Microkelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "C";
string targetUnitName = "µK";
- Measurement expected = new Measurement (Convert.ToDouble(273650000), "µ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);
@@ -894,7 +881,7 @@ public void UnitConverter_ConvertUnits_Celsius_to_nK_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "C";
string targetUnitName = "nK";
- Measurement expected = new Measurement (Convert.ToDouble(373150000000L), "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);
@@ -909,7 +896,7 @@ public void UnitConverter_ConvertUnits_Celsius_to_nK_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "C";
string targetUnitName = "nK";
- Measurement expected = new Measurement (Convert.ToDouble(273650000000L), "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);
@@ -924,7 +911,7 @@ public void UnitConverter_ConvertUnits_Celsius_to_kK_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "C";
string targetUnitName = "kK";
- Measurement expected = new Measurement (Convert.ToDouble(0.37315), "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);
@@ -939,7 +926,7 @@ public void UnitConverter_ConvertUnits_Celsius_to_kK_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "C";
string targetUnitName = "kK";
- Measurement expected = new Measurement (Convert.ToDouble(0.27365), "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);
@@ -954,7 +941,7 @@ public void UnitConverter_ConvertUnits_Celsius_to_Megakelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "C";
string targetUnitName = "MK";
- Measurement expected = new Measurement (Convert.ToDouble(0.00037315), "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);
@@ -969,7 +956,7 @@ public void UnitConverter_ConvertUnits_Celsius_to_Megakelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "C";
string targetUnitName = "MK";
- Measurement expected = new Measurement (Convert.ToDouble(0.00027365), "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);
@@ -984,7 +971,7 @@ public void UnitConverter_ConvertUnits_Celsius_to_Reaumur_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "C";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(80), "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);
@@ -999,7 +986,7 @@ public void UnitConverter_ConvertUnits_Celsius_to_Reaumur_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "C";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(0.4), "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);
@@ -1014,7 +1001,7 @@ public void UnitConverter_ConvertUnits_Celsius_to_Reaumur_Test3 ()
double value = Convert.ToDouble (0);
string currentUnitName = "C";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(0), "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);
@@ -1029,7 +1016,7 @@ public void UnitConverter_ConvertUnits_Celsius_to_Rankine_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "C";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(671.67), "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);
@@ -1044,7 +1031,7 @@ public void UnitConverter_ConvertUnits_Celsius_to_Rankine_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "C";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(492.57), "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);
@@ -1059,15 +1046,13 @@ public void UnitConverter_ConvertUnits_Celsius_to_Rankine_Test3 ()
double value = Convert.ToDouble (0);
string currentUnitName = "C";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(491.67), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -1077,7 +1062,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Kelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "F";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(310.93), "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);
@@ -1092,7 +1077,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Kelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "F";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(255.65), "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);
@@ -1107,7 +1092,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Kelvin_Test3 ()
double value = Convert.ToDouble (0);
string currentUnitName = "F";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(255.37), "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);
@@ -1122,7 +1107,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Celsius_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "F";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(37.78), "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);
@@ -1137,7 +1122,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Celsius_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "F";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(-17.5), "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);
@@ -1152,7 +1137,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Celsius_Test3 ()
double value = Convert.ToDouble (0);
string currentUnitName = "F";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(-17.78), "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);
@@ -1167,7 +1152,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Millikelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "F";
string targetUnitName = "mK";
- Measurement expected = new Measurement (Convert.ToDouble(310927.78), "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);
@@ -1182,7 +1167,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Millikelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "F";
string targetUnitName = "mK";
- Measurement expected = new Measurement (Convert.ToDouble(255650), "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);
@@ -1197,7 +1182,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Microkelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "F";
string targetUnitName = "µK";
- Measurement expected = new Measurement (Convert.ToDouble(310927777.78), "µ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);
@@ -1212,7 +1197,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Microkelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "F";
string targetUnitName = "µK";
- Measurement expected = new Measurement (Convert.ToDouble(255650000), "µ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);
@@ -1227,7 +1212,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_nK_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "F";
string targetUnitName = "nK";
- Measurement expected = new Measurement (Convert.ToDouble(310927777777.78), "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);
@@ -1242,7 +1227,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_nK_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "F";
string targetUnitName = "nK";
- Measurement expected = new Measurement (Convert.ToDouble(255650000000L), "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);
@@ -1257,7 +1242,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_kK_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "F";
string targetUnitName = "kK";
- Measurement expected = new Measurement (Convert.ToDouble(0.310927777777778), "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);
@@ -1272,7 +1257,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_kK_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "F";
string targetUnitName = "kK";
- Measurement expected = new Measurement (Convert.ToDouble(0.25565), "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);
@@ -1287,7 +1272,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Megakelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "F";
string targetUnitName = "MK";
- Measurement expected = new Measurement (Convert.ToDouble(0.000310927777778), "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);
@@ -1302,7 +1287,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Megakelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "F";
string targetUnitName = "MK";
- Measurement expected = new Measurement (Convert.ToDouble(0.00025565), "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);
@@ -1317,7 +1302,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Reaumur_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "F";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(30.22), "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);
@@ -1332,7 +1317,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Reaumur_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "F";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(-14), "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);
@@ -1347,7 +1332,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Reaumur_Test3 ()
double value = Convert.ToDouble (0);
string currentUnitName = "F";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(-14.22), "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);
@@ -1362,7 +1347,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Rankine_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "F";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(559.67), "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);
@@ -1377,7 +1362,7 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Rankine_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "F";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(460.17), "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);
@@ -1392,15 +1377,13 @@ public void UnitConverter_ConvertUnits_Fahrenheit_to_Rankine_Test3 ()
double value = Convert.ToDouble (0);
string currentUnitName = "F";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(459.67), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -1410,7 +1393,7 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Kelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mK";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -1425,7 +1408,7 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Kelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "mK";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(0.0005), "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);
@@ -1440,7 +1423,7 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Celsius_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mK";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(-273.05), "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);
@@ -1455,7 +1438,7 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Celsius_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "mK";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(-273.15), "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);
@@ -1470,7 +1453,7 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Fahrenheit_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mK";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(-459.49), "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);
@@ -1485,7 +1468,7 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Fahrenheit_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "mK";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(-459.67), "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);
@@ -1500,7 +1483,7 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Microkelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mK";
string targetUnitName = "µK";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "µ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);
@@ -1515,7 +1498,7 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Microkelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "mK";
string targetUnitName = "µK";
- Measurement expected = new Measurement (Convert.ToDouble(500), "µ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);
@@ -1530,7 +1513,7 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_nK_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mK";
string targetUnitName = "nK";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -1545,7 +1528,7 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_nK_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "mK";
string targetUnitName = "nK";
- Measurement expected = new Measurement (Convert.ToDouble(500000), "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);
@@ -1560,7 +1543,7 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_kK_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mK";
string targetUnitName = "kK";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -1575,7 +1558,7 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_kK_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "mK";
string targetUnitName = "kK";
- Measurement expected = new Measurement (Convert.ToDouble(5E-07), "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);
@@ -1590,7 +1573,7 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Megakelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mK";
string targetUnitName = "MK";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -1605,7 +1588,7 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Megakelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "mK";
string targetUnitName = "MK";
- Measurement expected = new Measurement (Convert.ToDouble(5E-10), "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);
@@ -1620,7 +1603,7 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Reaumur_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mK";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(-218.44), "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);
@@ -1635,7 +1618,7 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Reaumur_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "mK";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(-218.52), "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);
@@ -1650,7 +1633,7 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Rankine_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mK";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(0.18), "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);
@@ -1665,15 +1648,13 @@ public void UnitConverter_ConvertUnits_Millikelvin_to_Rankine_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "mK";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(0.0009), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -1683,7 +1664,7 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Kelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µK";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -1698,7 +1679,7 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Kelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "µK";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(5E-07), "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);
@@ -1713,7 +1694,7 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Celsius_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µK";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(-273.15), "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);
@@ -1728,7 +1709,7 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Celsius_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "µK";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(-273.15), "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);
@@ -1743,7 +1724,7 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Fahrenheit_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µK";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(-459.67), "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);
@@ -1758,7 +1739,7 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Fahrenheit_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "µK";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(-459.67), "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);
@@ -1773,7 +1754,7 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Millikelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µK";
string targetUnitName = "mK";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -1788,7 +1769,7 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Millikelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "µK";
string targetUnitName = "mK";
- Measurement expected = new Measurement (Convert.ToDouble(0.0005), "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);
@@ -1803,7 +1784,7 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_nK_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µK";
string targetUnitName = "nK";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -1818,7 +1799,7 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_nK_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "µK";
string targetUnitName = "nK";
- Measurement expected = new Measurement (Convert.ToDouble(500), "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);
@@ -1833,7 +1814,7 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_kK_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µK";
string targetUnitName = "kK";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -1848,7 +1829,7 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_kK_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "µK";
string targetUnitName = "kK";
- Measurement expected = new Measurement (Convert.ToDouble(5E-10), "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);
@@ -1863,7 +1844,7 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Megakelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µK";
string targetUnitName = "MK";
- Measurement expected = new Measurement (Convert.ToDouble(1E-10), "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);
@@ -1878,7 +1859,7 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Megakelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "µK";
string targetUnitName = "MK";
- Measurement expected = new Measurement (Convert.ToDouble(5E-13), "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);
@@ -1893,7 +1874,7 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Reaumur_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µK";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(-218.52), "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);
@@ -1908,7 +1889,7 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Reaumur_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "µK";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(-218.52), "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);
@@ -1923,7 +1904,7 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Rankine_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µK";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(0.00018), "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);
@@ -1938,15 +1919,13 @@ public void UnitConverter_ConvertUnits_Microkelvin_to_Rankine_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "µK";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(9E-07), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -1956,7 +1935,7 @@ public void UnitConverter_ConvertUnits_nK_to_Kelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nK";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -1971,7 +1950,7 @@ public void UnitConverter_ConvertUnits_nK_to_Kelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "nK";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(5E-10), "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);
@@ -1986,7 +1965,7 @@ public void UnitConverter_ConvertUnits_nK_to_Celsius_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nK";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(-273.15), "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);
@@ -2001,7 +1980,7 @@ public void UnitConverter_ConvertUnits_nK_to_Celsius_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "nK";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(-273.15), "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);
@@ -2016,7 +1995,7 @@ public void UnitConverter_ConvertUnits_nK_to_Fahrenheit_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nK";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(-459.67), "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);
@@ -2031,7 +2010,7 @@ public void UnitConverter_ConvertUnits_nK_to_Fahrenheit_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "nK";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(-459.67), "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);
@@ -2046,7 +2025,7 @@ public void UnitConverter_ConvertUnits_nK_to_Millikelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nK";
string targetUnitName = "mK";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -2061,7 +2040,7 @@ public void UnitConverter_ConvertUnits_nK_to_Millikelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "nK";
string targetUnitName = "mK";
- Measurement expected = new Measurement (Convert.ToDouble(5E-07), "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);
@@ -2076,7 +2055,7 @@ public void UnitConverter_ConvertUnits_nK_to_Microkelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nK";
string targetUnitName = "µK";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "µ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);
@@ -2091,7 +2070,7 @@ public void UnitConverter_ConvertUnits_nK_to_Microkelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "nK";
string targetUnitName = "µK";
- Measurement expected = new Measurement (Convert.ToDouble(0.0005), "µ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);
@@ -2106,7 +2085,7 @@ public void UnitConverter_ConvertUnits_nK_to_kK_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nK";
string targetUnitName = "kK";
- Measurement expected = new Measurement (Convert.ToDouble(1E-10), "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);
@@ -2121,7 +2100,7 @@ public void UnitConverter_ConvertUnits_nK_to_kK_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "nK";
string targetUnitName = "kK";
- Measurement expected = new Measurement (Convert.ToDouble(5E-13), "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);
@@ -2136,7 +2115,7 @@ public void UnitConverter_ConvertUnits_nK_to_Megakelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nK";
string targetUnitName = "MK";
- Measurement expected = new Measurement (Convert.ToDouble(1E-13), "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);
@@ -2151,7 +2130,7 @@ public void UnitConverter_ConvertUnits_nK_to_Megakelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "nK";
string targetUnitName = "MK";
- Measurement expected = new Measurement (Convert.ToDouble(0), "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);
@@ -2167,7 +2146,7 @@ public void UnitConverter_ConvertUnits_nK_to_Reaumur_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nK";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(-218.52), "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);
@@ -2182,7 +2161,7 @@ public void UnitConverter_ConvertUnits_nK_to_Reaumur_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "nK";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(-218.52), "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);
@@ -2197,7 +2176,7 @@ public void UnitConverter_ConvertUnits_nK_to_Rankine_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nK";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(1.8E-07), "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);
@@ -2212,15 +2191,13 @@ public void UnitConverter_ConvertUnits_nK_to_Rankine_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "nK";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(9E-10), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -2230,7 +2207,7 @@ public void UnitConverter_ConvertUnits_kK_to_Kelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kK";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -2245,7 +2222,7 @@ public void UnitConverter_ConvertUnits_kK_to_Kelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "kK";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(500), "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);
@@ -2260,7 +2237,7 @@ public void UnitConverter_ConvertUnits_kK_to_Celsius_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kK";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(99726.85), "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);
@@ -2275,7 +2252,7 @@ public void UnitConverter_ConvertUnits_kK_to_Celsius_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "kK";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(226.85), "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);
@@ -2290,7 +2267,7 @@ public void UnitConverter_ConvertUnits_kK_to_Fahrenheit_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kK";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(179540.33), "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);
@@ -2305,7 +2282,7 @@ public void UnitConverter_ConvertUnits_kK_to_Fahrenheit_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "kK";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(440.33), "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);
@@ -2320,7 +2297,7 @@ public void UnitConverter_ConvertUnits_kK_to_Millikelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kK";
string targetUnitName = "mK";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -2335,7 +2312,7 @@ public void UnitConverter_ConvertUnits_kK_to_Millikelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "kK";
string targetUnitName = "mK";
- Measurement expected = new Measurement (Convert.ToDouble(500000), "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);
@@ -2350,7 +2327,7 @@ public void UnitConverter_ConvertUnits_kK_to_Microkelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kK";
string targetUnitName = "µK";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "µ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);
@@ -2365,7 +2342,7 @@ public void UnitConverter_ConvertUnits_kK_to_Microkelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "kK";
string targetUnitName = "µK";
- Measurement expected = new Measurement (Convert.ToDouble(500000000), "µ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);
@@ -2380,7 +2357,7 @@ public void UnitConverter_ConvertUnits_kK_to_nK_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kK";
string targetUnitName = "nK";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000L), "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);
@@ -2395,7 +2372,7 @@ public void UnitConverter_ConvertUnits_kK_to_nK_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "kK";
string targetUnitName = "nK";
- Measurement expected = new Measurement (Convert.ToDouble(500000000000L), "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);
@@ -2410,7 +2387,7 @@ public void UnitConverter_ConvertUnits_kK_to_Megakelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kK";
string targetUnitName = "MK";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -2425,7 +2402,7 @@ public void UnitConverter_ConvertUnits_kK_to_Megakelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "kK";
string targetUnitName = "MK";
- Measurement expected = new Measurement (Convert.ToDouble(0.0005), "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);
@@ -2440,7 +2417,7 @@ public void UnitConverter_ConvertUnits_kK_to_Reaumur_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kK";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(79781.48), "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);
@@ -2455,7 +2432,7 @@ public void UnitConverter_ConvertUnits_kK_to_Reaumur_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "kK";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(181.48), "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);
@@ -2470,7 +2447,7 @@ public void UnitConverter_ConvertUnits_kK_to_Rankine_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kK";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(180000), "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);
@@ -2485,15 +2462,13 @@ public void UnitConverter_ConvertUnits_kK_to_Rankine_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "kK";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(900), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -2503,7 +2478,7 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Kelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "MK";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -2518,7 +2493,7 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Kelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "MK";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(500000), "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);
@@ -2533,7 +2508,7 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Celsius_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "MK";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(99999726.85), "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);
@@ -2548,7 +2523,7 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Celsius_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "MK";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(499726.85), "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);
@@ -2563,7 +2538,7 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Fahrenheit_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "MK";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(179999540.33), "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);
@@ -2578,7 +2553,7 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Fahrenheit_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "MK";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(899540.33), "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);
@@ -2593,7 +2568,7 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Millikelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "MK";
string targetUnitName = "mK";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "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);
@@ -2608,7 +2583,7 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Millikelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "MK";
string targetUnitName = "mK";
- Measurement expected = new Measurement (Convert.ToDouble(500000000), "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);
@@ -2623,7 +2598,7 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Microkelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "MK";
string targetUnitName = "µK";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000L), "µ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);
@@ -2638,7 +2613,7 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Microkelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "MK";
string targetUnitName = "µK";
- Measurement expected = new Measurement (Convert.ToDouble(500000000000L), "µ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);
@@ -2653,7 +2628,7 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_nK_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "MK";
string targetUnitName = "nK";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000000L), "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);
@@ -2668,7 +2643,7 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_nK_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "MK";
string targetUnitName = "nK";
- Measurement expected = new Measurement (Convert.ToDouble(500000000000000L), "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);
@@ -2683,7 +2658,7 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_kK_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "MK";
string targetUnitName = "kK";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -2698,7 +2673,7 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_kK_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "MK";
string targetUnitName = "kK";
- Measurement expected = new Measurement (Convert.ToDouble(500), "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);
@@ -2713,7 +2688,7 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Reaumur_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "MK";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(79999781.48), "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);
@@ -2728,7 +2703,7 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Reaumur_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "MK";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(399781.48), "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);
@@ -2743,7 +2718,7 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Rankine_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "MK";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(180000000), "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);
@@ -2758,15 +2733,13 @@ public void UnitConverter_ConvertUnits_Megakelvin_to_Rankine_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "MK";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(900000), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -2776,7 +2749,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Kelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Re";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(398.15), "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);
@@ -2791,7 +2764,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Kelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "Re";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(273.77), "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);
@@ -2806,7 +2779,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Kelvin_Test3 ()
double value = Convert.ToDouble (0);
string currentUnitName = "Re";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(273.15), "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);
@@ -2821,7 +2794,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Fahrenheit_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Re";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(257), "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);
@@ -2836,7 +2809,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Fahrenheit_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "Re";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(33.12), "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);
@@ -2851,7 +2824,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Fahrenheit_Test3 ()
double value = Convert.ToDouble (0);
string currentUnitName = "Re";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(32), "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);
@@ -2866,7 +2839,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Millikelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Re";
string targetUnitName = "mK";
- Measurement expected = new Measurement (Convert.ToDouble(398150), "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);
@@ -2881,7 +2854,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Millikelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "Re";
string targetUnitName = "mK";
- Measurement expected = new Measurement (Convert.ToDouble(273775), "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);
@@ -2896,7 +2869,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Microkelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Re";
string targetUnitName = "µK";
- Measurement expected = new Measurement (Convert.ToDouble(398150000), "µ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);
@@ -2911,7 +2884,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Microkelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "Re";
string targetUnitName = "µK";
- Measurement expected = new Measurement (Convert.ToDouble(273775000), "µ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);
@@ -2926,7 +2899,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_nK_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Re";
string targetUnitName = "nK";
- Measurement expected = new Measurement (Convert.ToDouble(398150000000L), "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);
@@ -2941,7 +2914,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_nK_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "Re";
string targetUnitName = "nK";
- Measurement expected = new Measurement (Convert.ToDouble(273775000000L), "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);
@@ -2956,7 +2929,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_kK_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Re";
string targetUnitName = "kK";
- Measurement expected = new Measurement (Convert.ToDouble(0.39815), "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);
@@ -2971,7 +2944,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_kK_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "Re";
string targetUnitName = "kK";
- Measurement expected = new Measurement (Convert.ToDouble(0.273775), "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);
@@ -2986,7 +2959,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Megakelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Re";
string targetUnitName = "MK";
- Measurement expected = new Measurement (Convert.ToDouble(0.00039815), "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);
@@ -3001,7 +2974,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Megakelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "Re";
string targetUnitName = "MK";
- Measurement expected = new Measurement (Convert.ToDouble(0.000273775), "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);
@@ -3016,7 +2989,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Celsius_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Re";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(125), "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);
@@ -3031,7 +3004,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Celsius_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "Re";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(0.62), "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);
@@ -3046,7 +3019,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Celsius_Test3 ()
double value = Convert.ToDouble (0);
string currentUnitName = "Re";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(0), "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);
@@ -3061,7 +3034,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Rankine_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Re";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(716.67), "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);
@@ -3076,7 +3049,7 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Rankine_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "Re";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(492.8), "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);
@@ -3091,15 +3064,13 @@ public void UnitConverter_ConvertUnits_Reaumur_to_Rankine_Test3 ()
double value = Convert.ToDouble (0);
string currentUnitName = "Re";
string targetUnitName = "Ra";
- Measurement expected = new Measurement (Convert.ToDouble(491.67), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -3109,7 +3080,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_Kelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Ra";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(55.56), "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);
@@ -3124,7 +3095,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_Kelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "Ra";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(0.28), "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);
@@ -3139,7 +3110,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_Kelvin_Test3 ()
double value = Convert.ToDouble (0);
string currentUnitName = "Ra";
string targetUnitName = "K";
- Measurement expected = new Measurement (Convert.ToDouble(0), "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);
@@ -3154,7 +3125,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_Fahrenheit_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Ra";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(-359.67), "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);
@@ -3169,7 +3140,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_Fahrenheit_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "Ra";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(-459.17), "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);
@@ -3184,7 +3155,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_Fahrenheit_Test3 ()
double value = Convert.ToDouble (0);
string currentUnitName = "Ra";
string targetUnitName = "F";
- Measurement expected = new Measurement (Convert.ToDouble(-459.67), "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);
@@ -3199,7 +3170,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_Millikelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Ra";
string targetUnitName = "mK";
- Measurement expected = new Measurement (Convert.ToDouble(55555.56), "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);
@@ -3214,7 +3185,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_Millikelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "Ra";
string targetUnitName = "mK";
- Measurement expected = new Measurement (Convert.ToDouble(277.78), "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);
@@ -3229,7 +3200,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_Microkelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Ra";
string targetUnitName = "µK";
- Measurement expected = new Measurement (Convert.ToDouble(55555555.56), "µ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);
@@ -3244,7 +3215,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_Microkelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "Ra";
string targetUnitName = "µK";
- Measurement expected = new Measurement (Convert.ToDouble(277777.78), "µ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);
@@ -3259,7 +3230,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_nK_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Ra";
string targetUnitName = "nK";
- Measurement expected = new Measurement (Convert.ToDouble(55555555555.56), "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);
@@ -3274,7 +3245,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_nK_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "Ra";
string targetUnitName = "nK";
- Measurement expected = new Measurement (Convert.ToDouble(277777777.78), "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);
@@ -3289,7 +3260,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_kK_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Ra";
string targetUnitName = "kK";
- Measurement expected = new Measurement (Convert.ToDouble(0.055555555555556), "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);
@@ -3304,7 +3275,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_kK_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "Ra";
string targetUnitName = "kK";
- Measurement expected = new Measurement (Convert.ToDouble(0.000277777777778), "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);
@@ -3319,7 +3290,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_Megakelvin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Ra";
string targetUnitName = "MK";
- Measurement expected = new Measurement (Convert.ToDouble(5.5555555556E-05), "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);
@@ -3334,7 +3305,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_Megakelvin_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "Ra";
string targetUnitName = "MK";
- Measurement expected = new Measurement (Convert.ToDouble(2.77777778E-07), "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);
@@ -3349,7 +3320,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_Celsius_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Ra";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(-217.59), "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);
@@ -3364,7 +3335,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_Celsius_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "Ra";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(-272.87), "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);
@@ -3379,7 +3350,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_Celsius_Test3 ()
double value = Convert.ToDouble (0);
string currentUnitName = "Ra";
string targetUnitName = "C";
- Measurement expected = new Measurement (Convert.ToDouble(-273.15), "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);
@@ -3394,7 +3365,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_Reaumur_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Ra";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(-174.08), "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);
@@ -3409,7 +3380,7 @@ public void UnitConverter_ConvertUnits_Rankine_to_Reaumur_Test2 ()
double value = Convert.ToDouble (0.5);
string currentUnitName = "Ra";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(-218.3), "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);
@@ -3424,17 +3395,15 @@ public void UnitConverter_ConvertUnits_Rankine_to_Reaumur_Test3 ()
double value = Convert.ToDouble (0);
string currentUnitName = "Ra";
string targetUnitName = "Re";
- Measurement expected = new Measurement (Convert.ToDouble(-218.52), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -3444,7 +3413,7 @@ public void UnitConverter_ConvertUnits_kg_to_g_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kg";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -3459,7 +3428,7 @@ public void UnitConverter_ConvertUnits_kg_to_g_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kg";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -3474,7 +3443,7 @@ public void UnitConverter_ConvertUnits_kg_to_mg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kg";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -3489,7 +3458,7 @@ public void UnitConverter_ConvertUnits_kg_to_mg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kg";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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);
@@ -3504,7 +3473,7 @@ public void UnitConverter_ConvertUnits_kg_to_µg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kg";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "µ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);
@@ -3519,7 +3488,7 @@ public void UnitConverter_ConvertUnits_kg_to_µg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kg";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(999999999), "µ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);
@@ -3534,7 +3503,7 @@ public void UnitConverter_ConvertUnits_kg_to_ng_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kg";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000L), "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);
@@ -3549,7 +3518,7 @@ public void UnitConverter_ConvertUnits_kg_to_ng_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kg";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000L), "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);
@@ -3564,7 +3533,7 @@ public void UnitConverter_ConvertUnits_kg_to_Megagram_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kg";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -3579,7 +3548,7 @@ public void UnitConverter_ConvertUnits_kg_to_Megagram_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kg";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -3594,7 +3563,7 @@ public void UnitConverter_ConvertUnits_kg_to_Gg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kg";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -3609,7 +3578,7 @@ public void UnitConverter_ConvertUnits_kg_to_Gg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kg";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -3624,7 +3593,7 @@ public void UnitConverter_ConvertUnits_kg_to_tonne_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kg";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -3639,7 +3608,7 @@ public void UnitConverter_ConvertUnits_kg_to_tonne_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kg";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -3654,7 +3623,7 @@ public void UnitConverter_ConvertUnits_kg_to_ton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kg";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(0.110231131092439), "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);
@@ -3669,7 +3638,7 @@ public void UnitConverter_ConvertUnits_kg_to_ton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kg";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(0.001102311309822), "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);
@@ -3684,7 +3653,7 @@ public void UnitConverter_ConvertUnits_kg_to_stone_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kg";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(15.747304441777), "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);
@@ -3699,7 +3668,7 @@ public void UnitConverter_ConvertUnits_kg_to_stone_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kg";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(0.157473044260297), "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);
@@ -3714,7 +3683,7 @@ public void UnitConverter_ConvertUnits_kg_to_cwt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kg";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(2.20462262184878), "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);
@@ -3729,7 +3698,7 @@ public void UnitConverter_ConvertUnits_kg_to_cwt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kg";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(0.022046226196442), "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);
@@ -3744,7 +3713,7 @@ public void UnitConverter_ConvertUnits_kg_to_lb_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kg";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(220.462262184878), "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);
@@ -3759,7 +3728,7 @@ public void UnitConverter_ConvertUnits_kg_to_lb_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kg";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(2.20462261964415), "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);
@@ -3774,7 +3743,7 @@ public void UnitConverter_ConvertUnits_kg_to_oz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kg";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(3527.39619495804), "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);
@@ -3789,15 +3758,13 @@ public void UnitConverter_ConvertUnits_kg_to_oz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kg";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(35.2739619143064), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -3807,7 +3774,7 @@ public void UnitConverter_ConvertUnits_g_to_kg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "g";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -3822,7 +3789,7 @@ public void UnitConverter_ConvertUnits_g_to_kg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "g";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -3837,7 +3804,7 @@ public void UnitConverter_ConvertUnits_g_to_mg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "g";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -3852,7 +3819,7 @@ public void UnitConverter_ConvertUnits_g_to_mg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "g";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -3867,7 +3834,7 @@ public void UnitConverter_ConvertUnits_g_to_µg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "g";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "µ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);
@@ -3882,7 +3849,7 @@ public void UnitConverter_ConvertUnits_g_to_µg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "g";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "µ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);
@@ -3897,7 +3864,7 @@ public void UnitConverter_ConvertUnits_g_to_ng_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "g";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "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);
@@ -3912,7 +3879,7 @@ public void UnitConverter_ConvertUnits_g_to_ng_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "g";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(999999999), "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);
@@ -3927,7 +3894,7 @@ public void UnitConverter_ConvertUnits_g_to_Megagram_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "g";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -3942,7 +3909,7 @@ public void UnitConverter_ConvertUnits_g_to_Megagram_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "g";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -3957,7 +3924,7 @@ public void UnitConverter_ConvertUnits_g_to_Gg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "g";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -3972,7 +3939,7 @@ public void UnitConverter_ConvertUnits_g_to_Gg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "g";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -3987,7 +3954,7 @@ public void UnitConverter_ConvertUnits_g_to_tonne_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "g";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -4002,7 +3969,7 @@ public void UnitConverter_ConvertUnits_g_to_tonne_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "g";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -4017,7 +3984,7 @@ public void UnitConverter_ConvertUnits_g_to_ton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "g";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(0.000110231131092), "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);
@@ -4032,7 +3999,7 @@ public void UnitConverter_ConvertUnits_g_to_ton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "g";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(1.10231131E-06), "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);
@@ -4047,7 +4014,7 @@ public void UnitConverter_ConvertUnits_g_to_stone_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "g";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(0.015747304441777), "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);
@@ -4062,7 +4029,7 @@ public void UnitConverter_ConvertUnits_g_to_stone_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "g";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(0.00015747304426), "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);
@@ -4077,7 +4044,7 @@ public void UnitConverter_ConvertUnits_g_to_cwt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "g";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(0.002204622621849), "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);
@@ -4092,7 +4059,7 @@ public void UnitConverter_ConvertUnits_g_to_cwt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "g";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(2.2046226196E-05), "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);
@@ -4107,7 +4074,7 @@ public void UnitConverter_ConvertUnits_g_to_lb_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "g";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(0.220462262184878), "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);
@@ -4122,7 +4089,7 @@ public void UnitConverter_ConvertUnits_g_to_lb_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "g";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(0.002204622619644), "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);
@@ -4137,7 +4104,7 @@ public void UnitConverter_ConvertUnits_g_to_oz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "g";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(3.5273961949580408), "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);
@@ -4152,15 +4119,13 @@ public void UnitConverter_ConvertUnits_g_to_oz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "g";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(0.035273961914306), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -4170,7 +4135,7 @@ public void UnitConverter_ConvertUnits_mg_to_kg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mg";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -4185,7 +4150,7 @@ public void UnitConverter_ConvertUnits_mg_to_kg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mg";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -4200,7 +4165,7 @@ public void UnitConverter_ConvertUnits_mg_to_g_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mg";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -4215,7 +4180,7 @@ public void UnitConverter_ConvertUnits_mg_to_g_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mg";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -4230,7 +4195,7 @@ public void UnitConverter_ConvertUnits_mg_to_µg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mg";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "µ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);
@@ -4245,7 +4210,7 @@ public void UnitConverter_ConvertUnits_mg_to_µg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mg";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "µ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);
@@ -4260,7 +4225,7 @@ public void UnitConverter_ConvertUnits_mg_to_ng_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mg";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -4275,7 +4240,7 @@ public void UnitConverter_ConvertUnits_mg_to_ng_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mg";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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);
@@ -4290,7 +4255,7 @@ public void UnitConverter_ConvertUnits_mg_to_Megagram_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mg";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -4305,7 +4270,7 @@ public void UnitConverter_ConvertUnits_mg_to_Megagram_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mg";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -4321,7 +4286,7 @@ public void UnitConverter_ConvertUnits_mg_to_Gg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mg";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(1E-10), "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);
@@ -4336,7 +4301,7 @@ public void UnitConverter_ConvertUnits_mg_to_Gg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mg";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(1E-12), "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);
@@ -4352,7 +4317,7 @@ public void UnitConverter_ConvertUnits_mg_to_tonne_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mg";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -4367,7 +4332,7 @@ public void UnitConverter_ConvertUnits_mg_to_tonne_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mg";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -4383,7 +4348,7 @@ public void UnitConverter_ConvertUnits_mg_to_ton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mg";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(1.10231131E-07), "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);
@@ -4398,7 +4363,7 @@ public void UnitConverter_ConvertUnits_mg_to_ton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mg";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(1.102311E-09), "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);
@@ -4413,7 +4378,7 @@ public void UnitConverter_ConvertUnits_mg_to_stone_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mg";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(1.5747304442E-05), "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);
@@ -4428,7 +4393,7 @@ public void UnitConverter_ConvertUnits_mg_to_stone_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mg";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(1.57473044E-07), "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);
@@ -4443,7 +4408,7 @@ public void UnitConverter_ConvertUnits_mg_to_cwt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mg";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(2.204622622E-06), "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);
@@ -4458,7 +4423,7 @@ public void UnitConverter_ConvertUnits_mg_to_cwt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mg";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(2.2046226E-08), "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);
@@ -4473,7 +4438,7 @@ public void UnitConverter_ConvertUnits_mg_to_lb_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mg";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(0.000220462262185), "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);
@@ -4488,7 +4453,7 @@ public void UnitConverter_ConvertUnits_mg_to_lb_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mg";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(2.20462262E-06), "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);
@@ -4503,7 +4468,7 @@ public void UnitConverter_ConvertUnits_mg_to_oz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mg";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(0.003527396194958), "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);
@@ -4518,15 +4483,13 @@ public void UnitConverter_ConvertUnits_mg_to_oz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mg";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(3.5273961914E-05), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -4536,7 +4499,7 @@ public void UnitConverter_ConvertUnits_µg_to_kg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µg";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -4551,7 +4514,7 @@ public void UnitConverter_ConvertUnits_µg_to_kg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µg";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -4566,7 +4529,7 @@ public void UnitConverter_ConvertUnits_µg_to_g_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µg";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -4581,7 +4544,7 @@ public void UnitConverter_ConvertUnits_µg_to_g_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µg";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -4596,7 +4559,7 @@ public void UnitConverter_ConvertUnits_µg_to_mg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µg";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -4611,7 +4574,7 @@ public void UnitConverter_ConvertUnits_µg_to_mg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µg";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -4626,7 +4589,7 @@ public void UnitConverter_ConvertUnits_µg_to_ng_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µg";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -4641,7 +4604,7 @@ public void UnitConverter_ConvertUnits_µg_to_ng_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µg";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -4656,7 +4619,7 @@ public void UnitConverter_ConvertUnits_µg_to_Megagram_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µg";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(1E-10), "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);
@@ -4671,7 +4634,7 @@ public void UnitConverter_ConvertUnits_µg_to_Megagram_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µg";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(1E-12), "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);
@@ -4687,7 +4650,7 @@ public void UnitConverter_ConvertUnits_µg_to_Gg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µg";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(1E-13), "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);
@@ -4702,7 +4665,7 @@ public void UnitConverter_ConvertUnits_µg_to_Gg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µg";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(1E-15), "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);
@@ -4718,7 +4681,7 @@ public void UnitConverter_ConvertUnits_µg_to_tonne_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µg";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(1E-10), "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);
@@ -4733,7 +4696,7 @@ public void UnitConverter_ConvertUnits_µg_to_tonne_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µg";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(1E-12), "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);
@@ -4749,7 +4712,7 @@ public void UnitConverter_ConvertUnits_µg_to_ton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µg";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(1.10231E-10), "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);
@@ -4764,7 +4727,7 @@ public void UnitConverter_ConvertUnits_µg_to_ton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µg";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(1.102E-12), "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);
@@ -4779,7 +4742,7 @@ public void UnitConverter_ConvertUnits_µg_to_stone_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µg";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(1.5747304E-08), "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);
@@ -4794,7 +4757,7 @@ public void UnitConverter_ConvertUnits_µg_to_stone_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µg";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(1.57473E-10), "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);
@@ -4809,7 +4772,7 @@ public void UnitConverter_ConvertUnits_µg_to_cwt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µg";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(2.204623E-09), "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);
@@ -4824,7 +4787,7 @@ public void UnitConverter_ConvertUnits_µg_to_cwt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µg";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(2.2046E-11), "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);
@@ -4839,7 +4802,7 @@ public void UnitConverter_ConvertUnits_µg_to_lb_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µg";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(2.20462262E-07), "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);
@@ -4854,7 +4817,7 @@ public void UnitConverter_ConvertUnits_µg_to_lb_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µg";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(2.204623E-09), "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);
@@ -4869,7 +4832,7 @@ public void UnitConverter_ConvertUnits_µg_to_oz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µg";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(3.527396195E-06), "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);
@@ -4884,15 +4847,13 @@ public void UnitConverter_ConvertUnits_µg_to_oz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µg";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(3.5273962E-08), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -4902,7 +4863,7 @@ public void UnitConverter_ConvertUnits_ng_to_kg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ng";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(1E-10), "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);
@@ -4917,7 +4878,7 @@ public void UnitConverter_ConvertUnits_ng_to_kg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ng";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(1E-12), "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);
@@ -4933,7 +4894,7 @@ public void UnitConverter_ConvertUnits_ng_to_g_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ng";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -4948,7 +4909,7 @@ public void UnitConverter_ConvertUnits_ng_to_g_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ng";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -4964,7 +4925,7 @@ public void UnitConverter_ConvertUnits_ng_to_mg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ng";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -4979,7 +4940,7 @@ public void UnitConverter_ConvertUnits_ng_to_mg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ng";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -4994,7 +4955,7 @@ public void UnitConverter_ConvertUnits_ng_to_µg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ng";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "µ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);
@@ -5009,7 +4970,7 @@ public void UnitConverter_ConvertUnits_ng_to_µg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ng";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "µ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);
@@ -5024,7 +4985,7 @@ public void UnitConverter_ConvertUnits_ng_to_Megagram_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ng";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(1E-13), "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);
@@ -5039,7 +5000,7 @@ public void UnitConverter_ConvertUnits_ng_to_Megagram_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ng";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(1E-15), "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);
@@ -5055,7 +5016,7 @@ public void UnitConverter_ConvertUnits_ng_to_Gg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ng";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(0), "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);
@@ -5071,7 +5032,7 @@ public void UnitConverter_ConvertUnits_ng_to_Gg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ng";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(0.0), "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);
@@ -5087,7 +5048,7 @@ public void UnitConverter_ConvertUnits_ng_to_tonne_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ng";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(1E-13), "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);
@@ -5102,7 +5063,7 @@ public void UnitConverter_ConvertUnits_ng_to_tonne_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ng";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(1E-15), "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);
@@ -5117,7 +5078,7 @@ public void UnitConverter_ConvertUnits_ng_to_ton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ng";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(1.1E-13), "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);
@@ -5132,7 +5093,7 @@ public void UnitConverter_ConvertUnits_ng_to_ton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ng";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(1E-15), "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);
@@ -5147,7 +5108,7 @@ public void UnitConverter_ConvertUnits_ng_to_stone_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ng";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(1.5747E-11), "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);
@@ -5162,7 +5123,7 @@ public void UnitConverter_ConvertUnits_ng_to_stone_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ng";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(1.57E-13), "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);
@@ -5177,7 +5138,7 @@ public void UnitConverter_ConvertUnits_ng_to_cwt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ng";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(2.205E-12), "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);
@@ -5192,7 +5153,7 @@ public void UnitConverter_ConvertUnits_ng_to_cwt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ng";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(2.2E-14), "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);
@@ -5207,7 +5168,7 @@ public void UnitConverter_ConvertUnits_ng_to_lb_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ng";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(2.20462E-10), "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);
@@ -5222,7 +5183,7 @@ public void UnitConverter_ConvertUnits_ng_to_lb_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ng";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(2.205E-12), "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);
@@ -5237,7 +5198,7 @@ public void UnitConverter_ConvertUnits_ng_to_oz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ng";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(3.527396E-09), "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);
@@ -5252,15 +5213,13 @@ public void UnitConverter_ConvertUnits_ng_to_oz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ng";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(3.5274E-11), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -5270,7 +5229,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_kg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mg";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -5285,7 +5244,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_kg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mg";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -5300,7 +5259,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_g_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mg";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -5315,7 +5274,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_g_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mg";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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);
@@ -5330,7 +5289,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_µg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mg";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000L), "µ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);
@@ -5345,7 +5304,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_µg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mg";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000L), "µ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);
@@ -5360,7 +5319,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_ng_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mg";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000000L), "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);
@@ -5375,7 +5334,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_ng_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mg";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000000L), "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);
@@ -5390,7 +5349,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_mg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mg";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "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);
@@ -5405,7 +5364,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_mg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mg";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(999999999), "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);
@@ -5420,7 +5379,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_Gg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mg";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -5435,7 +5394,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_Gg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mg";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -5450,7 +5409,7 @@ public void UnitConverter_ConvertUnits_Megagrams_to_tonne_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mg";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(100), "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);
@@ -5465,7 +5424,7 @@ public void UnitConverter_ConvertUnits_Megagrams_to_tonne_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mg";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(0.999999999), "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);
@@ -5480,7 +5439,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_ton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mg";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(110.231131092439), "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);
@@ -5495,7 +5454,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_ton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mg";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(1.10231130982208), "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);
@@ -5510,7 +5469,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_stone_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mg";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(15747.304441777), "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);
@@ -5525,7 +5484,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_stone_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mg";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(157.473044260297), "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);
@@ -5540,7 +5499,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_cwt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mg";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(2204.62262184878), "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);
@@ -5555,7 +5514,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_cwt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mg";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(22.0462261964415), "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);
@@ -5570,7 +5529,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_lb_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mg";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(220462.262184878), "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);
@@ -5585,7 +5544,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_lb_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mg";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(2204.62261964415), "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);
@@ -5600,7 +5559,7 @@ public void UnitConverter_ConvertUnits_Megagram_to_oz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mg";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(3527396.194958), "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);
@@ -5615,15 +5574,13 @@ public void UnitConverter_ConvertUnits_Megagram_to_oz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mg";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(35273.961914306), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -5633,7 +5590,7 @@ public void UnitConverter_ConvertUnits_Gg_to_kg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gg";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -5648,7 +5605,7 @@ public void UnitConverter_ConvertUnits_Gg_to_kg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gg";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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);
@@ -5663,7 +5620,7 @@ public void UnitConverter_ConvertUnits_Gg_to_g_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gg";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "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);
@@ -5678,7 +5635,7 @@ public void UnitConverter_ConvertUnits_Gg_to_g_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gg";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(999999999), "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);
@@ -5693,7 +5650,7 @@ public void UnitConverter_ConvertUnits_Gg_to_mg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gg";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000.0), "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);
@@ -5708,7 +5665,7 @@ public void UnitConverter_ConvertUnits_Gg_to_mg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gg";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000L), "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);
@@ -5723,7 +5680,7 @@ public void UnitConverter_ConvertUnits_Gg_to_µg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gg";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000000L), "µ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);
@@ -5738,7 +5695,7 @@ public void UnitConverter_ConvertUnits_Gg_to_µg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gg";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000000L), "µ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);
@@ -5753,7 +5710,7 @@ public void UnitConverter_ConvertUnits_Gg_to_ng_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gg";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(1E+20), "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);
@@ -5768,7 +5725,7 @@ public void UnitConverter_ConvertUnits_Gg_to_ng_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gg";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000000000L), "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);
@@ -5783,7 +5740,7 @@ public void UnitConverter_ConvertUnits_Gg_to_Megagram_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gg";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -5798,7 +5755,7 @@ public void UnitConverter_ConvertUnits_Gg_to_Megagram_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gg";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -5813,7 +5770,7 @@ public void UnitConverter_ConvertUnits_Gg_to_tonne_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gg";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -5828,7 +5785,7 @@ public void UnitConverter_ConvertUnits_Gg_to_tonne_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gg";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -5843,7 +5800,7 @@ public void UnitConverter_ConvertUnits_Gg_to_ton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gg";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(110231.131092439), "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);
@@ -5858,7 +5815,7 @@ public void UnitConverter_ConvertUnits_Gg_to_ton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gg";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(1102.31130982208), "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);
@@ -5873,7 +5830,7 @@ public void UnitConverter_ConvertUnits_Gg_to_stone_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gg";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(15747304.441777), "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);
@@ -5888,7 +5845,7 @@ public void UnitConverter_ConvertUnits_Gg_to_stone_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gg";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(157473.044260297), "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);
@@ -5903,7 +5860,7 @@ public void UnitConverter_ConvertUnits_Gg_to_cwt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gg";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(2204622.62184878), "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);
@@ -5918,7 +5875,7 @@ public void UnitConverter_ConvertUnits_Gg_to_cwt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gg";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(22046.2261964415), "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);
@@ -5933,7 +5890,7 @@ public void UnitConverter_ConvertUnits_Gg_to_lb_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gg";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(220462262.184878), "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);
@@ -5948,7 +5905,7 @@ public void UnitConverter_ConvertUnits_Gg_to_lb_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gg";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(2204622.61964415), "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);
@@ -5963,7 +5920,7 @@ public void UnitConverter_ConvertUnits_Gg_to_oz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gg";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(3527396194.95804), "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);
@@ -5978,15 +5935,13 @@ public void UnitConverter_ConvertUnits_Gg_to_oz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gg";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(35273961.9143064), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -5996,7 +5951,7 @@ public void UnitConverter_ConvertUnits_tonne_to_kg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "t";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -6011,7 +5966,7 @@ public void UnitConverter_ConvertUnits_tonne_to_kg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "t";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -6026,7 +5981,7 @@ public void UnitConverter_ConvertUnits_tonne_to_mg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "t";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "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);
@@ -6041,7 +5996,7 @@ public void UnitConverter_ConvertUnits_tonne_to_mg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "t";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(999999999), "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);
@@ -6056,7 +6011,7 @@ public void UnitConverter_ConvertUnits_tonne_to_g_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "t";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -6071,7 +6026,7 @@ public void UnitConverter_ConvertUnits_tonne_to_g_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "t";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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);
@@ -6086,7 +6041,7 @@ public void UnitConverter_ConvertUnits_tonne_to_µg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "t";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000L), "µ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);
@@ -6101,7 +6056,7 @@ public void UnitConverter_ConvertUnits_tonne_to_µg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "t";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000L), "µ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);
@@ -6116,7 +6071,7 @@ public void UnitConverter_ConvertUnits_tonne_to_ng_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "t";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000000L), "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);
@@ -6131,7 +6086,7 @@ public void UnitConverter_ConvertUnits_tonne_to_ng_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "t";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000000L), "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);
@@ -6146,7 +6101,7 @@ public void UnitConverter_ConvertUnits_tonne_to_Megagrams_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "t";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(100), "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);
@@ -6161,7 +6116,7 @@ public void UnitConverter_ConvertUnits_tonne_to_Megagrams_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "t";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(0.999999999), "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);
@@ -6176,7 +6131,7 @@ public void UnitConverter_ConvertUnits_tonne_to_Gg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "t";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -6191,7 +6146,7 @@ public void UnitConverter_ConvertUnits_tonne_to_Gg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "t";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -6206,7 +6161,7 @@ public void UnitConverter_ConvertUnits_tonne_to_ton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "t";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(110.231131092439), "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);
@@ -6221,7 +6176,7 @@ public void UnitConverter_ConvertUnits_tonne_to_ton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "t";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(1.10231130982208), "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);
@@ -6236,7 +6191,7 @@ public void UnitConverter_ConvertUnits_tonne_to_cwt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "t";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(2204.62262184878), "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);
@@ -6251,7 +6206,7 @@ public void UnitConverter_ConvertUnits_tonne_to_cwt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "t";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(22.0462261964415), "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);
@@ -6266,7 +6221,7 @@ public void UnitConverter_ConvertUnits_tonne_to_stone_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "t";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(15747.304441777), "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);
@@ -6281,7 +6236,7 @@ public void UnitConverter_ConvertUnits_tonne_to_stone_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "t";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(157.473044260297), "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);
@@ -6296,7 +6251,7 @@ public void UnitConverter_ConvertUnits_tonne_to_lb_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "t";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(220462.262184878), "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);
@@ -6311,7 +6266,7 @@ public void UnitConverter_ConvertUnits_tonne_to_lb_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "t";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(2204.62261964415), "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);
@@ -6326,7 +6281,7 @@ public void UnitConverter_ConvertUnits_tonne_to_oz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "t";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(3527396.194958), "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);
@@ -6341,15 +6296,13 @@ public void UnitConverter_ConvertUnits_tonne_to_oz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "t";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(35273.961914306), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -6359,7 +6312,7 @@ public void UnitConverter_ConvertUnits_ton_to_kg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ton";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(90718.474), "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);
@@ -6374,7 +6327,7 @@ public void UnitConverter_ConvertUnits_ton_to_kg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ton";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(907.184739092815), "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);
@@ -6389,7 +6342,7 @@ public void UnitConverter_ConvertUnits_ton_to_mg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ton";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(90718474000L), "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);
@@ -6404,7 +6357,7 @@ public void UnitConverter_ConvertUnits_ton_to_mg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ton";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(907184739.092815), "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);
@@ -6419,7 +6372,7 @@ public void UnitConverter_ConvertUnits_ton_to_g_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ton";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(90718474), "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);
@@ -6434,7 +6387,7 @@ public void UnitConverter_ConvertUnits_ton_to_g_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ton";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(907184.739092815), "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);
@@ -6449,7 +6402,7 @@ public void UnitConverter_ConvertUnits_ton_to_µg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ton";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(90718474000000.0), "µ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);
@@ -6465,7 +6418,7 @@ public void UnitConverter_ConvertUnits_ton_to_µg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ton";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(907184739092.815), "µ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);
@@ -6480,7 +6433,7 @@ public void UnitConverter_ConvertUnits_ton_to_ng_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ton";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(90718474000000016L), "ng");
+ Measurement expected = new Measurement (Convert.ToDouble (90718474000000016L), "ng");
//should be 90718474000000000, .net bug
Measurement actual = default(Measurement);
actual = target.ConvertUnits (value, currentUnitName, targetUnitName);
@@ -6496,7 +6449,7 @@ public void UnitConverter_ConvertUnits_ton_to_ng_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ton";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(907184739092815.0), "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);
@@ -6511,7 +6464,7 @@ public void UnitConverter_ConvertUnits_ton_to_Megagrams_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ton";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(90.718474), "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);
@@ -6526,7 +6479,7 @@ public void UnitConverter_ConvertUnits_ton_to_Megagrams_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ton";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(0.907184739092815), "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);
@@ -6541,7 +6494,7 @@ public void UnitConverter_ConvertUnits_ton_to_Gg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ton";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(0.090718474), "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);
@@ -6556,7 +6509,7 @@ public void UnitConverter_ConvertUnits_ton_to_Gg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ton";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(0.000907184739093), "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);
@@ -6571,7 +6524,7 @@ public void UnitConverter_ConvertUnits_ton_to_tonne_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ton";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(90.718474), "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);
@@ -6586,7 +6539,7 @@ public void UnitConverter_ConvertUnits_ton_to_tonne_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ton";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(0.907184739092815), "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);
@@ -6601,7 +6554,7 @@ public void UnitConverter_ConvertUnits_ton_to_lb_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ton";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(200000), "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);
@@ -6616,7 +6569,7 @@ public void UnitConverter_ConvertUnits_ton_to_lb_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ton";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(1999.999998), "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);
@@ -6631,7 +6584,7 @@ public void UnitConverter_ConvertUnits_ton_to_oz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ton";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(3200000), "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);
@@ -6646,15 +6599,13 @@ public void UnitConverter_ConvertUnits_ton_to_oz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ton";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(31999.999968), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -6664,7 +6615,7 @@ public void UnitConverter_ConvertUnits_stone_to_kg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "st";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(635.029318), "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);
@@ -6679,7 +6630,7 @@ public void UnitConverter_ConvertUnits_stone_to_kg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "st";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(6.35029317364971), "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);
@@ -6694,7 +6645,7 @@ public void UnitConverter_ConvertUnits_stone_to_g_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "st";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(635029.318), "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);
@@ -6709,7 +6660,7 @@ public void UnitConverter_ConvertUnits_stone_to_g_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "st";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(6350.29317364971), "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);
@@ -6725,7 +6676,7 @@ public void UnitConverter_ConvertUnits_stone_to_mg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "st";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(635029318.0), "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);
@@ -6741,7 +6692,7 @@ public void UnitConverter_ConvertUnits_stone_to_mg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "st";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(6350293.17364971), "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);
@@ -6757,7 +6708,7 @@ public void UnitConverter_ConvertUnits_stone_to_µg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "st";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(635029318000L), "µ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);
@@ -6772,7 +6723,7 @@ public void UnitConverter_ConvertUnits_stone_to_µg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "st";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(6350293173.64971), "µ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);
@@ -6788,7 +6739,7 @@ public void UnitConverter_ConvertUnits_stone_to_ng_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "st";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(635029318000000L), "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);
@@ -6803,7 +6754,7 @@ public void UnitConverter_ConvertUnits_stone_to_ng_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "st";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(6350293173649.71), "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);
@@ -6819,7 +6770,7 @@ public void UnitConverter_ConvertUnits_stone_to_Megagram_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "st";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(0.635029318), "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);
@@ -6834,7 +6785,7 @@ public void UnitConverter_ConvertUnits_stone_to_Megagram_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "st";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(0.00635029317365), "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);
@@ -6850,7 +6801,7 @@ public void UnitConverter_ConvertUnits_stone_to_Gg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "st";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(0.000635029318), "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);
@@ -6865,7 +6816,7 @@ public void UnitConverter_ConvertUnits_stone_to_Gg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "st";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(6.350293174E-06), "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);
@@ -6880,7 +6831,7 @@ public void UnitConverter_ConvertUnits_stone_to_tonne_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "st";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(0.635029318), "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);
@@ -6895,7 +6846,7 @@ public void UnitConverter_ConvertUnits_stone_to_tonne_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "st";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(0.00635029317365), "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);
@@ -6911,7 +6862,7 @@ public void UnitConverter_ConvertUnits_stone_to_ton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "st";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(0.7), "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);
@@ -6926,7 +6877,7 @@ public void UnitConverter_ConvertUnits_stone_to_ton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "st";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(0.006999999993), "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);
@@ -6942,7 +6893,7 @@ public void UnitConverter_ConvertUnits_stone_to_cwt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "st";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(14), "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);
@@ -6957,7 +6908,7 @@ public void UnitConverter_ConvertUnits_stone_to_cwt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "st";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(0.13999999986), "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);
@@ -6972,7 +6923,7 @@ public void UnitConverter_ConvertUnits_stone_to_lb_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "st";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(1400), "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);
@@ -6987,7 +6938,7 @@ public void UnitConverter_ConvertUnits_stone_to_lb_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "st";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(13.999999986), "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);
@@ -7002,7 +6953,7 @@ public void UnitConverter_ConvertUnits_stone_to_oz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "st";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(22400), "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);
@@ -7017,15 +6968,13 @@ public void UnitConverter_ConvertUnits_stone_to_oz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "st";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(223.999999776), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -7035,7 +6984,7 @@ public void UnitConverter_ConvertUnits_cwt_to_kg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cwt";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(4535.9237), "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);
@@ -7051,7 +7000,7 @@ public void UnitConverter_ConvertUnits_cwt_to_kg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cwt";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(45.3592369546408), "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);
@@ -7066,7 +7015,7 @@ public void UnitConverter_ConvertUnits_cwt_to_mg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cwt";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(4535923700L), "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);
@@ -7081,7 +7030,7 @@ public void UnitConverter_ConvertUnits_cwt_to_mg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cwt";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(45359236.9546408), "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);
@@ -7096,7 +7045,7 @@ public void UnitConverter_ConvertUnits_cwt_to_g_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cwt";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(4535923.7), "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);
@@ -7112,7 +7061,7 @@ public void UnitConverter_ConvertUnits_cwt_to_g_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cwt";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(45359.2369546408), "g");
+ Measurement expected = new Measurement (Convert.ToDouble (45359.2369546408), "g");
Measurement actual = default(Measurement);
actual = target.ConvertUnits (value, currentUnitName, targetUnitName);
@@ -7129,7 +7078,7 @@ public void UnitConverter_ConvertUnits_cwt_to_µg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cwt";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(4535923700000.0), "µ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);
@@ -7144,7 +7093,7 @@ public void UnitConverter_ConvertUnits_cwt_to_µg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cwt";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(45359236954.640762), "µ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);
@@ -7159,7 +7108,7 @@ public void UnitConverter_ConvertUnits_cwt_to_ng_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cwt";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(4.5359237E+15), "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);
@@ -7174,7 +7123,7 @@ public void UnitConverter_ConvertUnits_cwt_to_ng_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cwt";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(45359236954640.8), "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);
@@ -7189,7 +7138,7 @@ public void UnitConverter_ConvertUnits_cwt_to_Megagram_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cwt";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(4.5359237), "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);
@@ -7204,7 +7153,7 @@ public void UnitConverter_ConvertUnits_cwt_to_Megagram_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cwt";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(0.045359236954641), "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);
@@ -7219,7 +7168,7 @@ public void UnitConverter_ConvertUnits_cwt_to_Gg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cwt";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(0.0045359237), "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);
@@ -7234,7 +7183,7 @@ public void UnitConverter_ConvertUnits_cwt_to_Gg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cwt";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(4.5359236955E-05), "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);
@@ -7250,7 +7199,7 @@ public void UnitConverter_ConvertUnits_cwt_to_tonne_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cwt";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(4.5359237), "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);
@@ -7265,7 +7214,7 @@ public void UnitConverter_ConvertUnits_cwt_to_tonne_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cwt";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(0.045359236954641), "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);
@@ -7280,7 +7229,7 @@ public void UnitConverter_ConvertUnits_cwt_to_ton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cwt";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(5), "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);
@@ -7295,7 +7244,7 @@ public void UnitConverter_ConvertUnits_cwt_to_ton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cwt";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(0.04999999995), "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);
@@ -7310,7 +7259,7 @@ public void UnitConverter_ConvertUnits_cwt_to_stone_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cwt";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(714.285714285714), "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);
@@ -7325,7 +7274,7 @@ public void UnitConverter_ConvertUnits_cwt_to_stone_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cwt";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(7.14285713571429), "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);
@@ -7340,7 +7289,7 @@ public void UnitConverter_ConvertUnits_cwt_to_lb_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cwt";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(10000), "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);
@@ -7355,7 +7304,7 @@ public void UnitConverter_ConvertUnits_cwt_to_lb_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cwt";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(99.9999999), "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);
@@ -7370,7 +7319,7 @@ public void UnitConverter_ConvertUnits_cwt_to_oz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cwt";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(160000), "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);
@@ -7385,15 +7334,13 @@ public void UnitConverter_ConvertUnits_cwt_to_oz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cwt";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(1599.9999984), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -7403,7 +7350,7 @@ public void UnitConverter_ConvertUnits_lb_to_kg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lb";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(45.359237), "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);
@@ -7418,7 +7365,7 @@ public void UnitConverter_ConvertUnits_lb_to_kg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lb";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(0.453592369546408), "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);
@@ -7433,7 +7380,7 @@ public void UnitConverter_ConvertUnits_lb_to_g_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lb";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(45359.237), "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);
@@ -7448,7 +7395,7 @@ public void UnitConverter_ConvertUnits_lb_to_g_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lb";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(453.592369546408), "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);
@@ -7463,7 +7410,7 @@ public void UnitConverter_ConvertUnits_lb_to_mg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lb";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(45359237), "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);
@@ -7478,7 +7425,7 @@ public void UnitConverter_ConvertUnits_lb_to_mg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lb";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(453592.369546408), "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);
@@ -7493,7 +7440,7 @@ public void UnitConverter_ConvertUnits_lb_to_µg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lb";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(45359237000.0), "µ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);
@@ -7508,7 +7455,7 @@ public void UnitConverter_ConvertUnits_lb_to_µg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lb";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(453592369.546408), "µ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);
@@ -7523,7 +7470,7 @@ public void UnitConverter_ConvertUnits_lb_to_ng_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lb";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(45359237000000.0), "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);
@@ -7539,7 +7486,7 @@ public void UnitConverter_ConvertUnits_lb_to_ng_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lb";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(453592369546.41), "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);
@@ -7554,7 +7501,7 @@ public void UnitConverter_ConvertUnits_lb_to_Megagram_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lb";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(0.045359237), "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);
@@ -7569,7 +7516,7 @@ public void UnitConverter_ConvertUnits_lb_to_Megagram_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lb";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(0.000453592369546), "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);
@@ -7584,7 +7531,7 @@ public void UnitConverter_ConvertUnits_lb_to_Gg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lb";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(4.5359237E-05), "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);
@@ -7599,7 +7546,7 @@ public void UnitConverter_ConvertUnits_lb_to_Gg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lb";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(4.5359237E-07), "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);
@@ -7614,7 +7561,7 @@ public void UnitConverter_ConvertUnits_lb_to_tonne_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lb";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(0.045359237), "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);
@@ -7629,7 +7576,7 @@ public void UnitConverter_ConvertUnits_lb_to_tonne_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lb";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(0.000453592369546), "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);
@@ -7644,7 +7591,7 @@ public void UnitConverter_ConvertUnits_lb_to_ton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lb";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(0.05), "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);
@@ -7659,7 +7606,7 @@ public void UnitConverter_ConvertUnits_lb_to_ton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lb";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(0.0004999999995), "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);
@@ -7674,7 +7621,7 @@ public void UnitConverter_ConvertUnits_lb_to_stone_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lb";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(7.14285714285714), "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);
@@ -7689,7 +7636,7 @@ public void UnitConverter_ConvertUnits_lb_to_stone_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lb";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(0.071428571357143), "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);
@@ -7704,7 +7651,7 @@ public void UnitConverter_ConvertUnits_lb_to_cwt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lb";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(1), "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);
@@ -7719,7 +7666,7 @@ public void UnitConverter_ConvertUnits_lb_to_cwt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lb";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(0.00999999999), "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);
@@ -7734,7 +7681,7 @@ public void UnitConverter_ConvertUnits_lb_to_oz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lb";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(1600), "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);
@@ -7749,15 +7696,13 @@ public void UnitConverter_ConvertUnits_lb_to_oz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lb";
string targetUnitName = "oz";
- Measurement expected = new Measurement (Convert.ToDouble(15.999999984), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -7767,7 +7712,7 @@ public void UnitConverter_ConvertUnits_oz_to_kg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "oz";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(2.8349523125), "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);
@@ -7782,7 +7727,7 @@ public void UnitConverter_ConvertUnits_oz_to_kg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "oz";
string targetUnitName = "kg";
- Measurement expected = new Measurement (Convert.ToDouble(0.02834952309665), "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);
@@ -7797,7 +7742,7 @@ public void UnitConverter_ConvertUnits_oz_to_g_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "oz";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(2834.9523125), "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);
@@ -7812,7 +7757,7 @@ public void UnitConverter_ConvertUnits_oz_to_g_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "oz";
string targetUnitName = "g";
- Measurement expected = new Measurement (Convert.ToDouble(28.3495230966505), "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);
@@ -7827,7 +7772,7 @@ public void UnitConverter_ConvertUnits_oz_to_mg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "oz";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(2834952.3125), "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);
@@ -7842,7 +7787,7 @@ public void UnitConverter_ConvertUnits_oz_to_mg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "oz";
string targetUnitName = "mg";
- Measurement expected = new Measurement (Convert.ToDouble(28349.5230966505), "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);
@@ -7857,7 +7802,7 @@ public void UnitConverter_ConvertUnits_oz_to_µg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "oz";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(2834952312.5), "µ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);
@@ -7872,7 +7817,7 @@ public void UnitConverter_ConvertUnits_oz_to_µg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "oz";
string targetUnitName = "µg";
- Measurement expected = new Measurement (Convert.ToDouble(28349523.0966505), "µ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);
@@ -7887,7 +7832,7 @@ public void UnitConverter_ConvertUnits_oz_to_ng_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "oz";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(2834952312500.0), "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);
@@ -7903,7 +7848,7 @@ public void UnitConverter_ConvertUnits_oz_to_ng_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "oz";
string targetUnitName = "ng";
- Measurement expected = new Measurement (Convert.ToDouble(28349523096.6505), "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);
@@ -7918,7 +7863,7 @@ public void UnitConverter_ConvertUnits_oz_to_Megagram_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "oz";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(0.0028349523125), "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);
@@ -7933,7 +7878,7 @@ public void UnitConverter_ConvertUnits_oz_to_Megagram_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "oz";
string targetUnitName = "Mg";
- Measurement expected = new Measurement (Convert.ToDouble(2.8349523097E-05), "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);
@@ -7948,7 +7893,7 @@ public void UnitConverter_ConvertUnits_oz_to_Gg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "oz";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(2.834952313E-06), "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);
@@ -7963,7 +7908,7 @@ public void UnitConverter_ConvertUnits_oz_to_Gg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "oz";
string targetUnitName = "Gg";
- Measurement expected = new Measurement (Convert.ToDouble(2.8349523E-08), "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);
@@ -7978,7 +7923,7 @@ public void UnitConverter_ConvertUnits_oz_to_tonne_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "oz";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(0.0028349523125), "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);
@@ -7993,7 +7938,7 @@ public void UnitConverter_ConvertUnits_oz_to_tonne_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "oz";
string targetUnitName = "t";
- Measurement expected = new Measurement (Convert.ToDouble(2.8349523097E-05), "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);
@@ -8008,7 +7953,7 @@ public void UnitConverter_ConvertUnits_oz_to_ton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "oz";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(0.003125), "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);
@@ -8023,7 +7968,7 @@ public void UnitConverter_ConvertUnits_oz_to_ton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "oz";
string targetUnitName = "ton";
- Measurement expected = new Measurement (Convert.ToDouble(3.1249999969E-05), "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);
@@ -8038,7 +7983,7 @@ public void UnitConverter_ConvertUnits_oz_to_stone_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "oz";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(0.446428571428571), "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);
@@ -8053,7 +7998,7 @@ public void UnitConverter_ConvertUnits_oz_to_stone_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "oz";
string targetUnitName = "st";
- Measurement expected = new Measurement (Convert.ToDouble(0.004464285709821), "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);
@@ -8069,7 +8014,7 @@ public void UnitConverter_ConvertUnits_oz_to_cwt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "oz";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(0.0625), "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);
@@ -8084,7 +8029,7 @@ public void UnitConverter_ConvertUnits_oz_to_cwt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "oz";
string targetUnitName = "cwt";
- Measurement expected = new Measurement (Convert.ToDouble(0.000624999999375), "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);
@@ -8099,7 +8044,7 @@ public void UnitConverter_ConvertUnits_oz_to_lb_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "oz";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(6.25), "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);
@@ -8114,17 +8059,15 @@ public void UnitConverter_ConvertUnits_oz_to_lb_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "oz";
string targetUnitName = "lb";
- Measurement expected = new Measurement (Convert.ToDouble(0.0624999999375), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -8134,7 +8077,7 @@ public void UnitConverter_ConvertUnits_sec_to_min_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "s";
string targetUnitName = "min";
- Measurement expected = new Measurement (Convert.ToDouble(1.66666666666667), "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);
@@ -8149,7 +8092,7 @@ public void UnitConverter_ConvertUnits_sec_to_min_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "s";
string targetUnitName = "min";
- Measurement expected = new Measurement (Convert.ToDouble(0.01666666665), "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);
@@ -8164,7 +8107,7 @@ public void UnitConverter_ConvertUnits_sec_to_hr_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "s";
string targetUnitName = "hr";
- Measurement expected = new Measurement (Convert.ToDouble(0.027777777777778), "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);
@@ -8179,7 +8122,7 @@ public void UnitConverter_ConvertUnits_sec_to_hr_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "s";
string targetUnitName = "hr";
- Measurement expected = new Measurement (Convert.ToDouble(0.0002777777775), "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);
@@ -8194,7 +8137,7 @@ public void UnitConverter_ConvertUnits_sec_to_ms_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "s";
string targetUnitName = "ms";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -8209,7 +8152,7 @@ public void UnitConverter_ConvertUnits_sec_to_ms_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "s";
string targetUnitName = "ms";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -8224,7 +8167,7 @@ public void UnitConverter_ConvertUnits_sec_to_day_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "s";
string targetUnitName = "d";
- Measurement expected = new Measurement (Convert.ToDouble(0.001157407407407), "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);
@@ -8239,7 +8182,7 @@ public void UnitConverter_ConvertUnits_sec_to_day_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "s";
string targetUnitName = "d";
- Measurement expected = new Measurement (Convert.ToDouble(1.1574074062E-05), "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);
@@ -8254,7 +8197,7 @@ public void UnitConverter_ConvertUnits_sec_to_wk_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "s";
string targetUnitName = "wk";
- Measurement expected = new Measurement (Convert.ToDouble(0.000165343915344), "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);
@@ -8269,15 +8212,13 @@ public void UnitConverter_ConvertUnits_sec_to_wk_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "s";
string targetUnitName = "wk";
- Measurement expected = new Measurement (Convert.ToDouble(1.653439152E-06), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -8287,7 +8228,7 @@ public void UnitConverter_ConvertUnits_min_to_sec_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "min";
string targetUnitName = "s";
- Measurement expected = new Measurement (Convert.ToDouble(6000), "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);
@@ -8302,7 +8243,7 @@ public void UnitConverter_ConvertUnits_min_to_sec_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "min";
string targetUnitName = "s";
- Measurement expected = new Measurement (Convert.ToDouble(59.99999994), "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);
@@ -8317,7 +8258,7 @@ public void UnitConverter_ConvertUnits_min_to_hr_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "min";
string targetUnitName = "hr";
- Measurement expected = new Measurement (Convert.ToDouble(1.66666666666667), "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);
@@ -8332,7 +8273,7 @@ public void UnitConverter_ConvertUnits_min_to_hr_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "min";
string targetUnitName = "hr";
- Measurement expected = new Measurement (Convert.ToDouble(0.01666666665), "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);
@@ -8347,7 +8288,7 @@ public void UnitConverter_ConvertUnits_min_to_ms_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "min";
string targetUnitName = "ms";
- Measurement expected = new Measurement (Convert.ToDouble(6000000), "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);
@@ -8362,7 +8303,7 @@ public void UnitConverter_ConvertUnits_min_to_ms_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "min";
string targetUnitName = "ms";
- Measurement expected = new Measurement (Convert.ToDouble(59999.99994), "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);
@@ -8377,7 +8318,7 @@ public void UnitConverter_ConvertUnits_min_to_day_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "min";
string targetUnitName = "d";
- Measurement expected = new Measurement (Convert.ToDouble(0.069444444444444), "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);
@@ -8392,7 +8333,7 @@ public void UnitConverter_ConvertUnits_min_to_day_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "min";
string targetUnitName = "d";
- Measurement expected = new Measurement (Convert.ToDouble(0.00069444444375), "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);
@@ -8407,7 +8348,7 @@ public void UnitConverter_ConvertUnits_min_to_wk_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "min";
string targetUnitName = "wk";
- Measurement expected = new Measurement (Convert.ToDouble(0.009920634920635), "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);
@@ -8422,15 +8363,13 @@ public void UnitConverter_ConvertUnits_min_to_wk_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "min";
string targetUnitName = "wk";
- Measurement expected = new Measurement (Convert.ToDouble(9.9206349107E-05), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -8440,7 +8379,7 @@ public void UnitConverter_ConvertUnits_hr_to_sec_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "hr";
string targetUnitName = "s";
- Measurement expected = new Measurement (Convert.ToDouble(360000), "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);
@@ -8455,7 +8394,7 @@ public void UnitConverter_ConvertUnits_hr_to_sec_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "hr";
string targetUnitName = "s";
- Measurement expected = new Measurement (Convert.ToDouble(3599.9999964), "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);
@@ -8470,7 +8409,7 @@ public void UnitConverter_ConvertUnits_hr_to_min_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "hr";
string targetUnitName = "min";
- Measurement expected = new Measurement (Convert.ToDouble(6000), "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);
@@ -8485,7 +8424,7 @@ public void UnitConverter_ConvertUnits_hr_to_min_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "hr";
string targetUnitName = "min";
- Measurement expected = new Measurement (Convert.ToDouble(59.99999994), "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);
@@ -8500,7 +8439,7 @@ public void UnitConverter_ConvertUnits_hr_to_ms_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "hr";
string targetUnitName = "ms";
- Measurement expected = new Measurement (Convert.ToDouble(360000000), "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);
@@ -8515,7 +8454,7 @@ public void UnitConverter_ConvertUnits_hr_to_ms_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "hr";
string targetUnitName = "ms";
- Measurement expected = new Measurement (Convert.ToDouble(3599999.9964), "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);
@@ -8530,7 +8469,7 @@ public void UnitConverter_ConvertUnits_hr_to_day_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "hr";
string targetUnitName = "d";
- Measurement expected = new Measurement (Convert.ToDouble(4.16666666666667), "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);
@@ -8545,7 +8484,7 @@ public void UnitConverter_ConvertUnits_hr_to_day_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "hr";
string targetUnitName = "d";
- Measurement expected = new Measurement (Convert.ToDouble(0.041666666625), "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);
@@ -8560,7 +8499,7 @@ public void UnitConverter_ConvertUnits_hr_to_wk_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "hr";
string targetUnitName = "wk";
- Measurement expected = new Measurement (Convert.ToDouble(0.595238095238095), "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);
@@ -8575,15 +8514,13 @@ public void UnitConverter_ConvertUnits_hr_to_wk_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "hr";
string targetUnitName = "wk";
- Measurement expected = new Measurement (Convert.ToDouble(0.005952380946429), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -8593,7 +8530,7 @@ public void UnitConverter_ConvertUnits_ms_to_sec_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ms";
string targetUnitName = "s";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -8608,7 +8545,7 @@ public void UnitConverter_ConvertUnits_ms_to_sec_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ms";
string targetUnitName = "s";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -8623,7 +8560,7 @@ public void UnitConverter_ConvertUnits_ms_to_min_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ms";
string targetUnitName = "min";
- Measurement expected = new Measurement (Convert.ToDouble(0.001666666666667), "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);
@@ -8638,7 +8575,7 @@ public void UnitConverter_ConvertUnits_ms_to_min_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ms";
string targetUnitName = "min";
- Measurement expected = new Measurement (Convert.ToDouble(1.666666665E-05), "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);
@@ -8653,7 +8590,7 @@ public void UnitConverter_ConvertUnits_ms_to_hr_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ms";
string targetUnitName = "hr";
- Measurement expected = new Measurement (Convert.ToDouble(2.7777777778E-05), "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);
@@ -8668,7 +8605,7 @@ public void UnitConverter_ConvertUnits_ms_to_hr_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ms";
string targetUnitName = "hr";
- Measurement expected = new Measurement (Convert.ToDouble(2.77777778E-07), "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);
@@ -8683,7 +8620,7 @@ public void UnitConverter_ConvertUnits_ms_to_day_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ms";
string targetUnitName = "d";
- Measurement expected = new Measurement (Convert.ToDouble(1.157407407E-06), "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);
@@ -8698,7 +8635,7 @@ public void UnitConverter_ConvertUnits_ms_to_day_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ms";
string targetUnitName = "d";
- Measurement expected = new Measurement (Convert.ToDouble(1.1574074E-08), "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);
@@ -8713,7 +8650,7 @@ public void UnitConverter_ConvertUnits_ms_to_wk_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ms";
string targetUnitName = "wk";
- Measurement expected = new Measurement (Convert.ToDouble(1.65343915E-07), "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);
@@ -8728,15 +8665,13 @@ public void UnitConverter_ConvertUnits_ms_to_wk_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ms";
string targetUnitName = "wk";
- Measurement expected = new Measurement (Convert.ToDouble(1.653439E-09), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -8746,7 +8681,7 @@ public void UnitConverter_ConvertUnits_day_to_sec_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "d";
string targetUnitName = "s";
- Measurement expected = new Measurement (Convert.ToDouble(8640000), "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);
@@ -8761,7 +8696,7 @@ public void UnitConverter_ConvertUnits_day_to_sec_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "d";
string targetUnitName = "s";
- Measurement expected = new Measurement (Convert.ToDouble(86399.9999136), "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);
@@ -8776,7 +8711,7 @@ public void UnitConverter_ConvertUnits_day_to_min_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "d";
string targetUnitName = "min";
- Measurement expected = new Measurement (Convert.ToDouble(144000), "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);
@@ -8791,7 +8726,7 @@ public void UnitConverter_ConvertUnits_day_to_min_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "d";
string targetUnitName = "min";
- Measurement expected = new Measurement (Convert.ToDouble(1439.99999856), "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);
@@ -8806,7 +8741,7 @@ public void UnitConverter_ConvertUnits_day_to_hr_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "d";
string targetUnitName = "hr";
- Measurement expected = new Measurement (Convert.ToDouble(2400), "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);
@@ -8821,7 +8756,7 @@ public void UnitConverter_ConvertUnits_day_to_hr_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "d";
string targetUnitName = "hr";
- Measurement expected = new Measurement (Convert.ToDouble(23.999999976), "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);
@@ -8836,7 +8771,7 @@ public void UnitConverter_ConvertUnits_day_to_ms_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "d";
string targetUnitName = "ms";
- Measurement expected = new Measurement (Convert.ToDouble(8640000000L), "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);
@@ -8851,7 +8786,7 @@ public void UnitConverter_ConvertUnits_day_to_ms_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "d";
string targetUnitName = "ms";
- Measurement expected = new Measurement (Convert.ToDouble(86399999.9136), "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);
@@ -8866,7 +8801,7 @@ public void UnitConverter_ConvertUnits_day_to_wk_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "d";
string targetUnitName = "wk";
- Measurement expected = new Measurement (Convert.ToDouble(14.2857142857143), "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);
@@ -8881,15 +8816,13 @@ public void UnitConverter_ConvertUnits_day_to_wk_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "d";
string targetUnitName = "wk";
- Measurement expected = new Measurement (Convert.ToDouble(0.142857142714286), "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]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -8899,7 +8832,7 @@ public void UnitConverter_ConvertUnits_wk_to_sec_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "wk";
string targetUnitName = "s";
- Measurement expected = new Measurement (Convert.ToDouble(60480000), "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);
@@ -8914,7 +8847,7 @@ public void UnitConverter_ConvertUnits_wk_to_sec_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "wk";
string targetUnitName = "s";
- Measurement expected = new Measurement (Convert.ToDouble(604799.9993952), "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);
@@ -8929,7 +8862,7 @@ public void UnitConverter_ConvertUnits_wk_to_min_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "wk";
string targetUnitName = "min";
- Measurement expected = new Measurement (Convert.ToDouble(1008000), "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);
@@ -8944,7 +8877,7 @@ public void UnitConverter_ConvertUnits_wk_to_min_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "wk";
string targetUnitName = "min";
- Measurement expected = new Measurement (Convert.ToDouble(10079.99998992), "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);
@@ -8959,7 +8892,7 @@ public void UnitConverter_ConvertUnits_wk_to_hr_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "wk";
string targetUnitName = "hr";
- Measurement expected = new Measurement (Convert.ToDouble(16800), "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);
@@ -8974,7 +8907,7 @@ public void UnitConverter_ConvertUnits_wk_to_hr_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "wk";
string targetUnitName = "hr";
- Measurement expected = new Measurement (Convert.ToDouble(167.999999832), "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);
@@ -8989,7 +8922,7 @@ public void UnitConverter_ConvertUnits_wk_to_ms_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "wk";
string targetUnitName = "ms";
- Measurement expected = new Measurement (Convert.ToDouble(60480000000L), "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);
@@ -9004,7 +8937,7 @@ public void UnitConverter_ConvertUnits_wk_to_ms_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "wk";
string targetUnitName = "ms";
- Measurement expected = new Measurement (Convert.ToDouble(604799999.3952), "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);
@@ -9019,7 +8952,7 @@ public void UnitConverter_ConvertUnits_wk_to_day_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "wk";
string targetUnitName = "d";
- Measurement expected = new Measurement (Convert.ToDouble(700), "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);
@@ -9034,12 +8967,11 @@ public void UnitConverter_ConvertUnits_wk_to_day_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "wk";
string targetUnitName = "d";
- Measurement expected = new Measurement (Convert.ToDouble(6.999999993), "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/Cubico.Tests/UnitConverterTest2.cs b/Cubico.Tests/UnitConverterTest2.cs
index d9014d7..fa7243a 100644
--- a/Cubico.Tests/UnitConverterTest2.cs
+++ b/Cubico.Tests/UnitConverterTest2.cs
@@ -5,21 +5,18 @@
namespace Cubico.Tests
{
[TestFixture]
- public class UnitConverterTest2
+ public class UnitConverterTest2
{
TestContext testContextInstance;
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 "UnitConverter.ConvertUnits"
- #region "Force Tests"
- #region "Source as Newton (N)"
-
+ #region "UnitConverter.ConvertUnits"
+ #region "Force Tests"
+ #region "Source as Newton (N)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -29,7 +26,7 @@ public void UnitConverter_ConvertUnits_N_to_dyn_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "N";
string targetUnitName = "dyn";
- Measurement expected = new Measurement (Convert.ToDouble(10000000.0), "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);
@@ -44,7 +41,7 @@ public void UnitConverter_ConvertUnits_N_to_dyn_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "N";
string targetUnitName = "dyn";
- Measurement expected = new Measurement (Convert.ToDouble(99999.9999), "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);
@@ -59,7 +56,7 @@ public void UnitConverter_ConvertUnits_N_to_lbf_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "N";
string targetUnitName = "lbf";
- Measurement expected = new Measurement (Convert.ToDouble(22.4808943099999), "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);
@@ -74,7 +71,7 @@ public void UnitConverter_ConvertUnits_N_to_lbf_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "N";
string targetUnitName = "lbf";
- Measurement expected = new Measurement (Convert.ToDouble(0.22480894287519), "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);
@@ -89,7 +86,7 @@ public void UnitConverter_ConvertUnits_N_to_tonf_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "N";
string targetUnitName = "tonf";
- Measurement expected = new Measurement (Convert.ToDouble(0.011240447154986), "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);
@@ -104,7 +101,7 @@ public void UnitConverter_ConvertUnits_N_to_tonf_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "N";
string targetUnitName = "tonf";
- Measurement expected = new Measurement (Convert.ToDouble(0.000112404471437), "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);
@@ -119,7 +116,7 @@ public void UnitConverter_ConvertUnits_N_to_tonnef_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "N";
string targetUnitName = "tonnef";
- Measurement expected = new Measurement (Convert.ToDouble(0.010197162129779), "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);
@@ -134,7 +131,7 @@ public void UnitConverter_ConvertUnits_N_to_tonnef_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "N";
string targetUnitName = "tonnef";
- Measurement expected = new Measurement (Convert.ToDouble(0.000101971621196), "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);
@@ -149,7 +146,7 @@ public void UnitConverter_ConvertUnits_N_to_Meganewton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "N";
string targetUnitName = "Meganewton";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -164,7 +161,7 @@ public void UnitConverter_ConvertUnits_N_to_Meganewton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "N";
string targetUnitName = "Meganewton";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -179,7 +176,7 @@ public void UnitConverter_ConvertUnits_N_to_GN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "N";
string targetUnitName = "GN";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -194,7 +191,7 @@ public void UnitConverter_ConvertUnits_N_to_GN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "N";
string targetUnitName = "GN";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -210,7 +207,7 @@ public void UnitConverter_ConvertUnits_N_to_kN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "N";
string targetUnitName = "kN";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -225,7 +222,7 @@ public void UnitConverter_ConvertUnits_N_to_kN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "N";
string targetUnitName = "kN";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -240,7 +237,7 @@ public void UnitConverter_ConvertUnits_N_to_mN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "N";
string targetUnitName = "mN";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -255,7 +252,7 @@ public void UnitConverter_ConvertUnits_N_to_mN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "N";
string targetUnitName = "mN";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -270,7 +267,7 @@ public void UnitConverter_ConvertUnits_N_to_µN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "N";
string targetUnitName = "µN";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "µ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);
@@ -285,7 +282,7 @@ public void UnitConverter_ConvertUnits_N_to_µN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "N";
string targetUnitName = "µN";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "µ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);
@@ -300,7 +297,7 @@ public void UnitConverter_ConvertUnits_N_to_nN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "N";
string targetUnitName = "nN";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000.0), "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);
@@ -315,15 +312,13 @@ public void UnitConverter_ConvertUnits_N_to_nN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "N";
string targetUnitName = "nN";
- Measurement expected = new Measurement (Convert.ToDouble(999999999), "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)"
-
+ #endregion
+ #region "Source as Dyne (dyn)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -333,7 +328,7 @@ public void UnitConverter_ConvertUnits_dyn_to_N_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "dyn";
string targetUnitName = "N";
- Measurement expected = new Measurement (Convert.ToDouble(0.001), "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);
@@ -348,7 +343,7 @@ public void UnitConverter_ConvertUnits_dyn_to_N_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "dyn";
string targetUnitName = "N";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-06), "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);
@@ -363,7 +358,7 @@ public void UnitConverter_ConvertUnits_dyn_to_lbf_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "dyn";
string targetUnitName = "lbf";
- Measurement expected = new Measurement (Convert.ToDouble(0.0002248089431), "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);
@@ -378,7 +373,7 @@ public void UnitConverter_ConvertUnits_dyn_to_lbf_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "dyn";
string targetUnitName = "lbf";
- Measurement expected = new Measurement (Convert.ToDouble(2.248089429E-06), "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);
@@ -393,7 +388,7 @@ public void UnitConverter_ConvertUnits_dyn_to_tonf_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "dyn";
string targetUnitName = "tonf";
- Measurement expected = new Measurement (Convert.ToDouble(1.12404472E-07), "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);
@@ -408,7 +403,7 @@ public void UnitConverter_ConvertUnits_dyn_to_tonf_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "dyn";
string targetUnitName = "tonf";
- Measurement expected = new Measurement (Convert.ToDouble(1.124045E-09), "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);
@@ -423,7 +418,7 @@ public void UnitConverter_ConvertUnits_dyn_to_ng_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "dyn";
string targetUnitName = "tonnef";
- Measurement expected = new Measurement (Convert.ToDouble(1.01971621E-07), "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);
@@ -438,7 +433,7 @@ public void UnitConverter_ConvertUnits_dyn_to_tonnef_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "dyn";
string targetUnitName = "tonnef";
- Measurement expected = new Measurement (Convert.ToDouble(1.019716E-09), "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);
@@ -453,7 +448,7 @@ public void UnitConverter_ConvertUnits_dyn_to_Meganewton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "dyn";
string targetUnitName = "Meganewton";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -468,7 +463,7 @@ public void UnitConverter_ConvertUnits_dyn_to_Meganewton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "dyn";
string targetUnitName = "Meganewton";
- Measurement expected = new Measurement (Convert.ToDouble(1E-11), "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);
@@ -484,7 +479,7 @@ public void UnitConverter_ConvertUnits_dyn_to_GN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "dyn";
string targetUnitName = "GN";
- Measurement expected = new Measurement (Convert.ToDouble(1E-12), "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);
@@ -499,7 +494,7 @@ public void UnitConverter_ConvertUnits_dyn_to_GN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "dyn";
string targetUnitName = "GN";
- Measurement expected = new Measurement (Convert.ToDouble(1E-14), "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);
@@ -515,7 +510,7 @@ public void UnitConverter_ConvertUnits_dyn_to_kN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "dyn";
string targetUnitName = "kN";
- Measurement expected = new Measurement (Convert.ToDouble(1E-06), "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);
@@ -530,7 +525,7 @@ public void UnitConverter_ConvertUnits_dyn_to_kN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "dyn";
string targetUnitName = "kN";
- Measurement expected = new Measurement (Convert.ToDouble(1E-08), "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);
@@ -545,7 +540,7 @@ public void UnitConverter_ConvertUnits_dyn_to_mN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "dyn";
string targetUnitName = "mN";
- Measurement expected = new Measurement (Convert.ToDouble(1), "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);
@@ -560,7 +555,7 @@ public void UnitConverter_ConvertUnits_dyn_to_mN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "dyn";
string targetUnitName = "mN";
- Measurement expected = new Measurement (Convert.ToDouble(0.00999999999), "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);
@@ -575,7 +570,7 @@ public void UnitConverter_ConvertUnits_dyn_to_µN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "dyn";
string targetUnitName = "µN";
- Measurement expected = new Measurement (Convert.ToDouble(1000), "µ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);
@@ -590,7 +585,7 @@ public void UnitConverter_ConvertUnits_dyn_to_µN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "dyn";
string targetUnitName = "µN";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999), "µ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);
@@ -605,7 +600,7 @@ public void UnitConverter_ConvertUnits_dyn_to_nN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "dyn";
string targetUnitName = "nN";
- Measurement expected = new Measurement (Convert.ToDouble(1000000), "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);
@@ -620,15 +615,13 @@ public void UnitConverter_ConvertUnits_dyn_to_nN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "dyn";
string targetUnitName = "nN";
- Measurement expected = new Measurement (Convert.ToDouble(9999.99999), "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)"
-
+ #endregion
+ #region "Source as Pound-force (lbf)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -638,7 +631,7 @@ public void UnitConverter_ConvertUnits_lbf_to_N_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lbf";
string targetUnitName = "N";
- Measurement expected = new Measurement (Convert.ToDouble(444.82216152548), "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);
@@ -653,7 +646,7 @@ public void UnitConverter_ConvertUnits_lbf_to_N_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lbf";
string targetUnitName = "N";
- Measurement expected = new Measurement (Convert.ToDouble(4.44822161080658), "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);
@@ -668,7 +661,7 @@ public void UnitConverter_ConvertUnits_lbf_to_dyn_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lbf";
string targetUnitName = "dyn";
- Measurement expected = new Measurement (Convert.ToDouble(44482216.152548), "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);
@@ -683,7 +676,7 @@ public void UnitConverter_ConvertUnits_lbf_to_dyn_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lbf";
string targetUnitName = "dyn";
- Measurement expected = new Measurement (Convert.ToDouble(444822.161080658), "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);
@@ -698,7 +691,7 @@ public void UnitConverter_ConvertUnits_lbf_to_tonf_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lbf";
string targetUnitName = "tonf";
- Measurement expected = new Measurement (Convert.ToDouble(0.05), "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);
@@ -713,7 +706,7 @@ public void UnitConverter_ConvertUnits_lbf_to_tonf_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lbf";
string targetUnitName = "tonf";
- Measurement expected = new Measurement (Convert.ToDouble(0.0004999999995), "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);
@@ -728,7 +721,7 @@ public void UnitConverter_ConvertUnits_lbf_to_tonnef_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lbf";
string targetUnitName = "tonnef";
- Measurement expected = new Measurement (Convert.ToDouble(0.045359236999934), "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);
@@ -743,7 +736,7 @@ public void UnitConverter_ConvertUnits_lbf_to_tonnef_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lbf";
string targetUnitName = "tonnef";
- Measurement expected = new Measurement (Convert.ToDouble(0.000453592369546), "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);
@@ -758,7 +751,7 @@ public void UnitConverter_ConvertUnits_lbf_to_Meganewton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lbf";
string targetUnitName = "Meganewton";
- Measurement expected = new Measurement (Convert.ToDouble(0.000444822161525), "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);
@@ -773,7 +766,7 @@ public void UnitConverter_ConvertUnits_lbf_to_Meganewton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lbf";
string targetUnitName = "Meganewton";
- Measurement expected = new Measurement (Convert.ToDouble(4.448221611E-06), "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);
@@ -788,7 +781,7 @@ public void UnitConverter_ConvertUnits_lbf_to_GN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lbf";
string targetUnitName = "GN";
- Measurement expected = new Measurement (Convert.ToDouble(4.44822162E-07), "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);
@@ -803,7 +796,7 @@ public void UnitConverter_ConvertUnits_lbf_to_GN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lbf";
string targetUnitName = "GN";
- Measurement expected = new Measurement (Convert.ToDouble(4.448222E-09), "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);
@@ -818,7 +811,7 @@ public void UnitConverter_ConvertUnits_lbf_to_kN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lbf";
string targetUnitName = "kN";
- Measurement expected = new Measurement (Convert.ToDouble(0.44482216152548), "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);
@@ -833,7 +826,7 @@ public void UnitConverter_ConvertUnits_lbf_to_kN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lbf";
string targetUnitName = "kN";
- Measurement expected = new Measurement (Convert.ToDouble(0.004448221610807), "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);
@@ -848,7 +841,7 @@ public void UnitConverter_ConvertUnits_lbf_to_mN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lbf";
string targetUnitName = "mN";
- Measurement expected = new Measurement (Convert.ToDouble(444822.16152548), "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);
@@ -863,7 +856,7 @@ public void UnitConverter_ConvertUnits_lbf_to_mN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lbf";
string targetUnitName = "mN";
- Measurement expected = new Measurement (Convert.ToDouble(4448.22161080658), "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);
@@ -878,7 +871,7 @@ public void UnitConverter_ConvertUnits_lbf_to_µN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lbf";
string targetUnitName = "µN";
- Measurement expected = new Measurement (Convert.ToDouble(444822161.52548), "µ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);
@@ -893,7 +886,7 @@ public void UnitConverter_ConvertUnits_lbf_to_µN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lbf";
string targetUnitName = "µN";
- Measurement expected = new Measurement (Convert.ToDouble(4448221.61080658), "µ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);
@@ -908,7 +901,7 @@ public void UnitConverter_ConvertUnits_lbf_to_nN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "lbf";
string targetUnitName = "nN";
- Measurement expected = new Measurement (Convert.ToDouble(444822161525.48), "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);
@@ -923,15 +916,13 @@ public void UnitConverter_ConvertUnits_lbf_to_nN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "lbf";
string targetUnitName = "nN";
- Measurement expected = new Measurement (Convert.ToDouble(4448221610.80658), "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)"
-
+ #endregion
+ #region "Source as Ton-force(short) (tonf)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -941,7 +932,7 @@ public void UnitConverter_ConvertUnits_tonf_to_N_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "tonf";
string targetUnitName = "N";
- Measurement expected = new Measurement (Convert.ToDouble(889644.3230521), "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);
@@ -956,7 +947,7 @@ public void UnitConverter_ConvertUnits_tonf_to_N_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "tonf";
string targetUnitName = "N";
- Measurement expected = new Measurement (Convert.ToDouble(8896.44322162456), "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);
@@ -971,7 +962,7 @@ public void UnitConverter_ConvertUnits_tonf_to_dyn_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "tonf";
string targetUnitName = "dyn";
- Measurement expected = new Measurement (Convert.ToDouble(88964432305.21), "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);
@@ -986,7 +977,7 @@ public void UnitConverter_ConvertUnits_tonf_to_dyn_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "tonf";
string targetUnitName = "dyn";
- Measurement expected = new Measurement (Convert.ToDouble(889644322.162456), "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);
@@ -1001,7 +992,7 @@ public void UnitConverter_ConvertUnits_tonf_to_lbf_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "tonf";
string targetUnitName = "lbf";
- Measurement expected = new Measurement (Convert.ToDouble(200000), "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);
@@ -1016,7 +1007,7 @@ public void UnitConverter_ConvertUnits_tonf_to_lbf_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "tonf";
string targetUnitName = "lbf";
- Measurement expected = new Measurement (Convert.ToDouble(1999.999998), "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);
@@ -1031,7 +1022,7 @@ public void UnitConverter_ConvertUnits_tonf_to_tonnef_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "tonf";
string targetUnitName = "tonnef";
- Measurement expected = new Measurement (Convert.ToDouble(90.718474), "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);
@@ -1046,7 +1037,7 @@ public void UnitConverter_ConvertUnits_tonf_to_tonnef_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "tonf";
string targetUnitName = "tonnef";
- Measurement expected = new Measurement (Convert.ToDouble(0.907184739092815), "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);
@@ -1061,7 +1052,7 @@ public void UnitConverter_ConvertUnits_tonf_to_Meganewton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "tonf";
string targetUnitName = "Meganewton";
- Measurement expected = new Measurement (Convert.ToDouble(0.8896443230521), "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);
@@ -1076,7 +1067,7 @@ public void UnitConverter_ConvertUnits_tonf_to_Meganewton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "tonf";
string targetUnitName = "Meganewton";
- Measurement expected = new Measurement (Convert.ToDouble(0.008896443221625), "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);
@@ -1091,7 +1082,7 @@ public void UnitConverter_ConvertUnits_tonf_to_GN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "tonf";
string targetUnitName = "GN";
- Measurement expected = new Measurement (Convert.ToDouble(0.000889644323052), "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);
@@ -1106,7 +1097,7 @@ public void UnitConverter_ConvertUnits_tonf_to_GN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "tonf";
string targetUnitName = "GN";
- Measurement expected = new Measurement (Convert.ToDouble(8.896443222E-06), "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);
@@ -1121,7 +1112,7 @@ public void UnitConverter_ConvertUnits_tonf_to_kN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "tonf";
string targetUnitName = "kN";
- Measurement expected = new Measurement (Convert.ToDouble(889.6443230521), "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);
@@ -1136,7 +1127,7 @@ public void UnitConverter_ConvertUnits_tonf_to_kN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "tonf";
string targetUnitName = "kN";
- Measurement expected = new Measurement (Convert.ToDouble(8.89644322162456), "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);
@@ -1151,7 +1142,7 @@ public void UnitConverter_ConvertUnits_tonf_to_mN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "tonf";
string targetUnitName = "mN";
- Measurement expected = new Measurement (Convert.ToDouble(889644323.0521), "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);
@@ -1166,7 +1157,7 @@ public void UnitConverter_ConvertUnits_tonf_to_mN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "tonf";
string targetUnitName = "mN";
- Measurement expected = new Measurement (Convert.ToDouble(8896443.22162456), "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);
@@ -1181,7 +1172,7 @@ public void UnitConverter_ConvertUnits_tonf_to_µN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "tonf";
string targetUnitName = "µN";
- Measurement expected = new Measurement (Convert.ToDouble(889644323052.1), "µ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);
@@ -1196,7 +1187,7 @@ public void UnitConverter_ConvertUnits_tonf_to_µN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "tonf";
string targetUnitName = "µN";
- Measurement expected = new Measurement (Convert.ToDouble(8896443221.62456), "µ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);
@@ -1211,7 +1202,7 @@ public void UnitConverter_ConvertUnits_tonf_to_nN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "tonf";
string targetUnitName = "nN";
- Measurement expected = new Measurement (Convert.ToDouble(889644323052100L), "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);
@@ -1226,15 +1217,13 @@ public void UnitConverter_ConvertUnits_tonf_to_nN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "tonf";
string targetUnitName = "nN";
- Measurement expected = new Measurement (Convert.ToDouble(8896443221624.56), "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)"
-
+ #endregion
+ #region "Source as Tonnes force(metric) (tonnef,tf)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -1244,7 +1233,7 @@ public void UnitConverter_ConvertUnits_tonnef_to_N_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "tonnef";
string targetUnitName = "N";
- Measurement expected = new Measurement (Convert.ToDouble(980665), "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);
@@ -1259,7 +1248,7 @@ public void UnitConverter_ConvertUnits_tonnef_to_N_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "tonnef";
string targetUnitName = "N";
- Measurement expected = new Measurement (Convert.ToDouble(9806.64999019335), "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);
@@ -1274,7 +1263,7 @@ public void UnitConverter_ConvertUnits_tonnef_to_dyn_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "tonnef";
string targetUnitName = "dyn";
- Measurement expected = new Measurement (Convert.ToDouble(98066500000.0), "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);
@@ -1289,7 +1278,7 @@ public void UnitConverter_ConvertUnits_tonnef_to_dyn_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "tonnef";
string targetUnitName = "dyn";
- Measurement expected = new Measurement (Convert.ToDouble(980664999.019335), "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);
@@ -1304,7 +1293,7 @@ public void UnitConverter_ConvertUnits_tonnef_to_lbf_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "tonnef";
string targetUnitName = "lbf";
- Measurement expected = new Measurement (Convert.ToDouble(220462.2621852), "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);
@@ -1319,7 +1308,7 @@ public void UnitConverter_ConvertUnits_tonnef_to_lbf_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "tonnef";
string targetUnitName = "lbf";
- Measurement expected = new Measurement (Convert.ToDouble(2204.62261964738), "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);
@@ -1334,7 +1323,7 @@ public void UnitConverter_ConvertUnits_tonnef_to_tonf_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "tonnef";
string targetUnitName = "tonf";
- Measurement expected = new Measurement (Convert.ToDouble(110.231131092439), "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);
@@ -1349,7 +1338,7 @@ public void UnitConverter_ConvertUnits_tonnef_to_tonf_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "tonnef";
string targetUnitName = "tonf";
- Measurement expected = new Measurement (Convert.ToDouble(1.10231130982208), "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);
@@ -1364,7 +1353,7 @@ public void UnitConverter_ConvertUnits_tonnef_to_Meganewton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "tonnef";
string targetUnitName = "Meganewton";
- Measurement expected = new Measurement (Convert.ToDouble(0.980665), "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);
@@ -1379,7 +1368,7 @@ public void UnitConverter_ConvertUnits_tonnef_to_Meganewton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "tonnef";
string targetUnitName = "Meganewton";
- Measurement expected = new Measurement (Convert.ToDouble(0.009806649990193), "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);
@@ -1394,7 +1383,7 @@ public void UnitConverter_ConvertUnits_tonnef_to_GN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "tonnef";
string targetUnitName = "GN";
- Measurement expected = new Measurement (Convert.ToDouble(0.000980665), "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);
@@ -1409,7 +1398,7 @@ public void UnitConverter_ConvertUnits_tonnef_to_GN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "tonnef";
string targetUnitName = "GN";
- Measurement expected = new Measurement (Convert.ToDouble(9.80664999E-06), "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);
@@ -1424,7 +1413,7 @@ public void UnitConverter_ConvertUnits_tonnef_to_kN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "tonnef";
string targetUnitName = "kN";
- Measurement expected = new Measurement (Convert.ToDouble(980.665), "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);
@@ -1439,7 +1428,7 @@ public void UnitConverter_ConvertUnits_tonnef_to_kN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "tonnef";
string targetUnitName = "kN";
- Measurement expected = new Measurement (Convert.ToDouble(9.80664999019335), "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);
@@ -1454,7 +1443,7 @@ public void UnitConverter_ConvertUnits_tonnef_to_mN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "tonnef";
string targetUnitName = "mN";
- Measurement expected = new Measurement (Convert.ToDouble(980665000), "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);
@@ -1469,7 +1458,7 @@ public void UnitConverter_ConvertUnits_tonnef_to_mN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "tonnef";
string targetUnitName = "mN";
- Measurement expected = new Measurement (Convert.ToDouble(9806649.99019335), "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);
@@ -1484,7 +1473,7 @@ public void UnitConverter_ConvertUnits_tonnef_to_µN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "tonnef";
string targetUnitName = "µN";
- Measurement expected = new Measurement (Convert.ToDouble(980665000000.0), "µ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);
@@ -1499,7 +1488,7 @@ public void UnitConverter_ConvertUnits_tonnef_to_µN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "tonnef";
string targetUnitName = "µN";
- Measurement expected = new Measurement (Convert.ToDouble(9806649990.19335), "µ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);
@@ -1514,7 +1503,7 @@ public void UnitConverter_ConvertUnits_tonnef_to_nN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "tonnef";
string targetUnitName = "nN";
- Measurement expected = new Measurement (Convert.ToDouble(980665000000000.0), "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);
@@ -1530,16 +1519,13 @@ public void UnitConverter_ConvertUnits_tonnef_to_nN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "tonnef";
string targetUnitName = "nN";
- Measurement expected = new Measurement (Convert.ToDouble(9806649990193.35), "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)"
-
-
+ #endregion
+ #region "Source as Meganewton (MN)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -1549,7 +1535,7 @@ public void UnitConverter_ConvertUnits_Meganewton_to_N_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Meganewton";
string targetUnitName = "N";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -1564,7 +1550,7 @@ public void UnitConverter_ConvertUnits_Meganewton_to_N_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Meganewton";
string targetUnitName = "N";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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);
@@ -1579,7 +1565,7 @@ public void UnitConverter_ConvertUnits_Meganewton_to_dyn_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Meganewton";
string targetUnitName = "dyn";
- Measurement expected = new Measurement (Convert.ToDouble(10000000000000.0), "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);
@@ -1594,7 +1580,7 @@ public void UnitConverter_ConvertUnits_Meganewton_to_dyn_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Meganewton";
string targetUnitName = "dyn";
- Measurement expected = new Measurement (Convert.ToDouble(99999999900.0), "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);
@@ -1609,7 +1595,7 @@ public void UnitConverter_ConvertUnits_Meganewton_to_lbf_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Meganewton";
string targetUnitName = "lbf";
- Measurement expected = new Measurement (Convert.ToDouble(22480894.3099999), "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);
@@ -1624,7 +1610,7 @@ public void UnitConverter_ConvertUnits_Meganewton_to_lbf_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Meganewton";
string targetUnitName = "lbf";
- Measurement expected = new Measurement (Convert.ToDouble(224808.94287519), "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);
@@ -1639,7 +1625,7 @@ public void UnitConverter_ConvertUnits_Meganewton_to_tonf_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Meganewton";
string targetUnitName = "tonf";
- Measurement expected = new Measurement (Convert.ToDouble(11240.4471549855), "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);
@@ -1654,7 +1640,7 @@ public void UnitConverter_ConvertUnits_Meganewton_to_tonf_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Meganewton";
string targetUnitName = "tonf";
- Measurement expected = new Measurement (Convert.ToDouble(112.404471437451), "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);
@@ -1669,7 +1655,7 @@ public void UnitConverter_ConvertUnits_Meganewton_to_tonnef_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Meganewton";
string targetUnitName = "tonnef";
- Measurement expected = new Measurement (Convert.ToDouble(10197.1621297793), "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);
@@ -1684,7 +1670,7 @@ public void UnitConverter_ConvertUnits_Meganewton_to_tonnef_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Meganewton";
string targetUnitName = "tonnef";
- Measurement expected = new Measurement (Convert.ToDouble(101.971621195821), "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);
@@ -1699,7 +1685,7 @@ public void UnitConverter_ConvertUnits_Meganewton_to_GN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Meganewton";
string targetUnitName = "GN";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -1714,7 +1700,7 @@ public void UnitConverter_ConvertUnits_Meganewton_to_GN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Meganewton";
string targetUnitName = "GN";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -1729,7 +1715,7 @@ public void UnitConverter_ConvertUnits_Meganewton_to_kN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Meganewton";
string targetUnitName = "kN";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -1744,7 +1730,7 @@ public void UnitConverter_ConvertUnits_Meganewton_to_kN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Meganewton";
string targetUnitName = "kN";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -1759,7 +1745,7 @@ public void UnitConverter_ConvertUnits_Meganewton_to_mN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Meganewton";
string targetUnitName = "mN";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "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);
@@ -1774,7 +1760,7 @@ public void UnitConverter_ConvertUnits_Meganewton_to_mN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Meganewton";
string targetUnitName = "mN";
- Measurement expected = new Measurement (Convert.ToDouble(999999999.0), "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);
@@ -1789,7 +1775,7 @@ public void UnitConverter_ConvertUnits_Meganewton_to_µN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Meganewton";
string targetUnitName = "µN";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000.0), "µ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);
@@ -1804,7 +1790,7 @@ public void UnitConverter_ConvertUnits_Meganewton_to_µN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Meganewton";
string targetUnitName = "µN";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000.0), "µ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);
@@ -1819,7 +1805,7 @@ public void UnitConverter_ConvertUnits_Meganewton_to_nN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Meganewton";
string targetUnitName = "nN";
- Measurement expected = new Measurement (Convert.ToDouble(1E+17), "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);
@@ -1834,16 +1820,13 @@ public void UnitConverter_ConvertUnits_Meganewton_to_nN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Meganewton";
string targetUnitName = "nN";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000000.0), "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)"
-
-
+ #endregion
+ #region "Source as Giganewton (GN)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -1853,7 +1836,7 @@ public void UnitConverter_ConvertUnits_GN_to_N_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "GN";
string targetUnitName = "N";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000.0), "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);
@@ -1868,7 +1851,7 @@ public void UnitConverter_ConvertUnits_GN_to_N_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "GN";
string targetUnitName = "N";
- Measurement expected = new Measurement (Convert.ToDouble(999999999), "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);
@@ -1883,7 +1866,7 @@ public void UnitConverter_ConvertUnits_GN_to_dyn_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "GN";
string targetUnitName = "dyn";
- Measurement expected = new Measurement (Convert.ToDouble(1E+16), "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);
@@ -1898,7 +1881,7 @@ public void UnitConverter_ConvertUnits_GN_to_dyn_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "GN";
string targetUnitName = "dyn";
- Measurement expected = new Measurement (Convert.ToDouble(99999999900000.0), "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);
@@ -1913,7 +1896,7 @@ public void UnitConverter_ConvertUnits_GN_to_lbf_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "GN";
string targetUnitName = "lbf";
- Measurement expected = new Measurement (Convert.ToDouble(22480894309.9999), "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);
@@ -1928,7 +1911,7 @@ public void UnitConverter_ConvertUnits_GN_to_lbf_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "GN";
string targetUnitName = "lbf";
- Measurement expected = new Measurement (Convert.ToDouble(224808942.87519), "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);
@@ -1943,7 +1926,7 @@ public void UnitConverter_ConvertUnits_GN_to_tonf_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "GN";
string targetUnitName = "tonf";
- Measurement expected = new Measurement (Convert.ToDouble(11240447.154986), "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);
@@ -1958,7 +1941,7 @@ public void UnitConverter_ConvertUnits_GN_to_tonf_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "GN";
string targetUnitName = "tonf";
- Measurement expected = new Measurement (Convert.ToDouble(112404.471437456), "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);
@@ -1973,7 +1956,7 @@ public void UnitConverter_ConvertUnits_GN_to_ng_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "GN";
string targetUnitName = "tonnef";
- Measurement expected = new Measurement (Convert.ToDouble(10197162.1297793), "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);
@@ -1988,7 +1971,7 @@ public void UnitConverter_ConvertUnits_GN_to_tonnef_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "GN";
string targetUnitName = "tonnef";
- Measurement expected = new Measurement (Convert.ToDouble(101971.621195821), "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);
@@ -2003,7 +1986,7 @@ public void UnitConverter_ConvertUnits_GN_to_Meganewton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "GN";
string targetUnitName = "Meganewton";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -2018,7 +2001,7 @@ public void UnitConverter_ConvertUnits_GN_to_Meganewton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "GN";
string targetUnitName = "Meganewton";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -2033,7 +2016,7 @@ public void UnitConverter_ConvertUnits_GN_to_kN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "GN";
string targetUnitName = "kN";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -2048,7 +2031,7 @@ public void UnitConverter_ConvertUnits_GN_to_kN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "GN";
string targetUnitName = "kN";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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);
@@ -2063,7 +2046,7 @@ public void UnitConverter_ConvertUnits_GN_to_mN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "GN";
string targetUnitName = "mN";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000.0), "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);
@@ -2078,7 +2061,7 @@ public void UnitConverter_ConvertUnits_GN_to_mN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "GN";
string targetUnitName = "mN";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000.0), "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);
@@ -2093,7 +2076,7 @@ public void UnitConverter_ConvertUnits_GN_to_µN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "GN";
string targetUnitName = "µN";
- Measurement expected = new Measurement (Convert.ToDouble(1E+17), "µ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);
@@ -2108,7 +2091,7 @@ public void UnitConverter_ConvertUnits_GN_to_µN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "GN";
string targetUnitName = "µN";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000000.0), "µ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);
@@ -2123,7 +2106,7 @@ public void UnitConverter_ConvertUnits_GN_to_nN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "GN";
string targetUnitName = "nN";
- Measurement expected = new Measurement (Convert.ToDouble(1E+20), "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);
@@ -2138,16 +2121,13 @@ public void UnitConverter_ConvertUnits_GN_to_nN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "GN";
string targetUnitName = "nN";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E+17), "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)"
-
-
+ #endregion
+ #region "Source as Kilonewton (kN)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -2157,7 +2137,7 @@ public void UnitConverter_ConvertUnits_kN_to_N_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kN";
string targetUnitName = "N";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -2172,7 +2152,7 @@ public void UnitConverter_ConvertUnits_kN_to_N_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kN";
string targetUnitName = "N";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -2187,7 +2167,7 @@ public void UnitConverter_ConvertUnits_kN_to_dyn_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kN";
string targetUnitName = "dyn";
- Measurement expected = new Measurement (Convert.ToDouble(10000000000L), "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);
@@ -2202,7 +2182,7 @@ public void UnitConverter_ConvertUnits_kN_to_dyn_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kN";
string targetUnitName = "dyn";
- Measurement expected = new Measurement (Convert.ToDouble(99999999.9), "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);
@@ -2217,7 +2197,7 @@ public void UnitConverter_ConvertUnits_kN_to_lbf_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kN";
string targetUnitName = "lbf";
- Measurement expected = new Measurement (Convert.ToDouble(22480.8943099999), "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);
@@ -2232,7 +2212,7 @@ public void UnitConverter_ConvertUnits_kN_to_lbf_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kN";
string targetUnitName = "lbf";
- Measurement expected = new Measurement (Convert.ToDouble(224.80894287519), "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);
@@ -2247,7 +2227,7 @@ public void UnitConverter_ConvertUnits_kN_to_tonf_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kN";
string targetUnitName = "tonf";
- Measurement expected = new Measurement (Convert.ToDouble(11.2404471549855), "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);
@@ -2262,7 +2242,7 @@ public void UnitConverter_ConvertUnits_kN_to_tonf_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kN";
string targetUnitName = "tonf";
- Measurement expected = new Measurement (Convert.ToDouble(0.112404471437451), "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);
@@ -2277,7 +2257,7 @@ public void UnitConverter_ConvertUnits_kN_to_tonnef_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kN";
string targetUnitName = "tonnef";
- Measurement expected = new Measurement (Convert.ToDouble(10.1971621297793), "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);
@@ -2292,7 +2272,7 @@ public void UnitConverter_ConvertUnits_kN_to_tonnef_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kN";
string targetUnitName = "tonnef";
- Measurement expected = new Measurement (Convert.ToDouble(0.101971621195821), "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);
@@ -2307,7 +2287,7 @@ public void UnitConverter_ConvertUnits_kN_to_Meganewton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kN";
string targetUnitName = "Meganewton";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -2322,7 +2302,7 @@ public void UnitConverter_ConvertUnits_kN_to_Meganewton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kN";
string targetUnitName = "Meganewton";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -2337,7 +2317,7 @@ public void UnitConverter_ConvertUnits_kN_to_GN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kN";
string targetUnitName = "GN";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -2352,7 +2332,7 @@ public void UnitConverter_ConvertUnits_kN_to_GN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kN";
string targetUnitName = "GN";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -2367,7 +2347,7 @@ public void UnitConverter_ConvertUnits_kN_to_mN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kN";
string targetUnitName = "mN";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -2382,7 +2362,7 @@ public void UnitConverter_ConvertUnits_kN_to_mN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kN";
string targetUnitName = "mN";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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);
@@ -2397,7 +2377,7 @@ public void UnitConverter_ConvertUnits_kN_to_µN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kN";
string targetUnitName = "µN";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000.0), "µ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);
@@ -2412,7 +2392,7 @@ public void UnitConverter_ConvertUnits_kN_to_µN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kN";
string targetUnitName = "µN";
- Measurement expected = new Measurement (Convert.ToDouble(999999999), "µ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);
@@ -2427,7 +2407,7 @@ public void UnitConverter_ConvertUnits_kN_to_nN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kN";
string targetUnitName = "nN";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000.0), "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);
@@ -2442,16 +2422,13 @@ public void UnitConverter_ConvertUnits_kN_to_nN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kN";
string targetUnitName = "nN";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000.0), "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)"
-
-
+ #endregion
+ #region "Source as Milinewton (mN)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -2461,7 +2438,7 @@ public void UnitConverter_ConvertUnits_mN_to_N_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mN";
string targetUnitName = "N";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -2476,7 +2453,7 @@ public void UnitConverter_ConvertUnits_mN_to_N_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mN";
string targetUnitName = "N";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -2491,7 +2468,7 @@ public void UnitConverter_ConvertUnits_mN_to_dyn_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mN";
string targetUnitName = "dyn";
- Measurement expected = new Measurement (Convert.ToDouble(10000), "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);
@@ -2506,7 +2483,7 @@ public void UnitConverter_ConvertUnits_mN_to_dyn_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mN";
string targetUnitName = "dyn";
- Measurement expected = new Measurement (Convert.ToDouble(99.9999999), "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);
@@ -2521,7 +2498,7 @@ public void UnitConverter_ConvertUnits_mN_to_lbf_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mN";
string targetUnitName = "lbf";
- Measurement expected = new Measurement (Convert.ToDouble(0.02248089431), "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);
@@ -2536,7 +2513,7 @@ public void UnitConverter_ConvertUnits_mN_to_lbf_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mN";
string targetUnitName = "lbf";
- Measurement expected = new Measurement (Convert.ToDouble(0.000224808942875), "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);
@@ -2551,7 +2528,7 @@ public void UnitConverter_ConvertUnits_mN_to_tonf_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mN";
string targetUnitName = "tonf";
- Measurement expected = new Measurement (Convert.ToDouble(1.1240447155E-05), "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);
@@ -2566,7 +2543,7 @@ public void UnitConverter_ConvertUnits_mN_to_tonf_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mN";
string targetUnitName = "tonf";
- Measurement expected = new Measurement (Convert.ToDouble(1.12404471E-07), "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);
@@ -2581,7 +2558,7 @@ public void UnitConverter_ConvertUnits_mN_to_tonnef_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mN";
string targetUnitName = "tonnef";
- Measurement expected = new Measurement (Convert.ToDouble(1.019716213E-05), "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);
@@ -2596,7 +2573,7 @@ public void UnitConverter_ConvertUnits_mN_to_tonnef_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mN";
string targetUnitName = "tonnef";
- Measurement expected = new Measurement (Convert.ToDouble(1.01971621E-07), "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);
@@ -2611,7 +2588,7 @@ public void UnitConverter_ConvertUnits_mN_to_Meganewton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mN";
string targetUnitName = "Meganewton";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -2626,7 +2603,7 @@ public void UnitConverter_ConvertUnits_mN_to_Meganewton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mN";
string targetUnitName = "Meganewton";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -2642,7 +2619,7 @@ public void UnitConverter_ConvertUnits_mN_to_GN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mN";
string targetUnitName = "GN";
- Measurement expected = new Measurement (Convert.ToDouble(1E-10), "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);
@@ -2657,7 +2634,7 @@ public void UnitConverter_ConvertUnits_mN_to_GN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mN";
string targetUnitName = "GN";
- Measurement expected = new Measurement (Convert.ToDouble(1E-12), "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);
@@ -2673,7 +2650,7 @@ public void UnitConverter_ConvertUnits_mN_to_kN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mN";
string targetUnitName = "kN";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -2688,7 +2665,7 @@ public void UnitConverter_ConvertUnits_mN_to_kN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mN";
string targetUnitName = "kN";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -2703,7 +2680,7 @@ public void UnitConverter_ConvertUnits_mN_to_µN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mN";
string targetUnitName = "µN";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "µ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);
@@ -2718,7 +2695,7 @@ public void UnitConverter_ConvertUnits_mN_to_µN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mN";
string targetUnitName = "µN";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "µ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);
@@ -2733,7 +2710,7 @@ public void UnitConverter_ConvertUnits_mN_to_nN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mN";
string targetUnitName = "nN";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -2748,15 +2725,13 @@ public void UnitConverter_ConvertUnits_mN_to_nN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mN";
string targetUnitName = "nN";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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)"
-
+ #endregion
+ #region "Source as Micronewton (µN)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -2766,7 +2741,7 @@ public void UnitConverter_ConvertUnits_µN_to_N_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µN";
string targetUnitName = "N";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -2781,7 +2756,7 @@ public void UnitConverter_ConvertUnits_µN_to_N_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µN";
string targetUnitName = "N";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -2796,7 +2771,7 @@ public void UnitConverter_ConvertUnits_µN_to_dyn_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µN";
string targetUnitName = "dyn";
- Measurement expected = new Measurement (Convert.ToDouble(10), "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);
@@ -2811,7 +2786,7 @@ public void UnitConverter_ConvertUnits_µN_to_dyn_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µN";
string targetUnitName = "dyn";
- Measurement expected = new Measurement (Convert.ToDouble(0.0999999999), "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);
@@ -2826,7 +2801,7 @@ public void UnitConverter_ConvertUnits_µN_to_lbf_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µN";
string targetUnitName = "lbf";
- Measurement expected = new Measurement (Convert.ToDouble(2.248089431E-05), "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);
@@ -2841,7 +2816,7 @@ public void UnitConverter_ConvertUnits_µN_to_lbf_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µN";
string targetUnitName = "lbf";
- Measurement expected = new Measurement (Convert.ToDouble(2.24808943E-07), "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);
@@ -2856,7 +2831,7 @@ public void UnitConverter_ConvertUnits_µN_to_tonf_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µN";
string targetUnitName = "tonf";
- Measurement expected = new Measurement (Convert.ToDouble(1.1240447E-08), "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);
@@ -2871,7 +2846,7 @@ public void UnitConverter_ConvertUnits_µN_to_tonf_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µN";
string targetUnitName = "tonf";
- Measurement expected = new Measurement (Convert.ToDouble(1.12404E-10), "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);
@@ -2886,7 +2861,7 @@ public void UnitConverter_ConvertUnits_µN_to_tonnef_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µN";
string targetUnitName = "tonnef";
- Measurement expected = new Measurement (Convert.ToDouble(1.0197162E-08), "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);
@@ -2901,7 +2876,7 @@ public void UnitConverter_ConvertUnits_µN_to_tonnef_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µN";
string targetUnitName = "tonnef";
- Measurement expected = new Measurement (Convert.ToDouble(1.01972E-10), "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);
@@ -2916,7 +2891,7 @@ public void UnitConverter_ConvertUnits_µN_to_Meganewton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µN";
string targetUnitName = "Meganewton";
- Measurement expected = new Measurement (Convert.ToDouble(1E-10), "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);
@@ -2931,7 +2906,7 @@ public void UnitConverter_ConvertUnits_µN_to_Meganewton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µN";
string targetUnitName = "Meganewton";
- Measurement expected = new Measurement (Convert.ToDouble(1E-12), "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);
@@ -2947,7 +2922,7 @@ public void UnitConverter_ConvertUnits_µN_to_GN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µN";
string targetUnitName = "GN";
- Measurement expected = new Measurement (Convert.ToDouble(1E-13), "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);
@@ -2962,7 +2937,7 @@ public void UnitConverter_ConvertUnits_µN_to_GN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µN";
string targetUnitName = "GN";
- Measurement expected = new Measurement (Convert.ToDouble(1E-15), "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);
@@ -2978,7 +2953,7 @@ public void UnitConverter_ConvertUnits_µN_to_kN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µN";
string targetUnitName = "kN";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -2993,7 +2968,7 @@ public void UnitConverter_ConvertUnits_µN_to_kN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µN";
string targetUnitName = "kN";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -3009,7 +2984,7 @@ public void UnitConverter_ConvertUnits_µN_to_mN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µN";
string targetUnitName = "mN";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -3024,7 +2999,7 @@ public void UnitConverter_ConvertUnits_µN_to_mN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µN";
string targetUnitName = "mN";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -3039,7 +3014,7 @@ public void UnitConverter_ConvertUnits_µN_to_nN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µN";
string targetUnitName = "nN";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -3054,16 +3029,13 @@ public void UnitConverter_ConvertUnits_µN_to_nN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µN";
string targetUnitName = "nN";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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)"
-
-
+ #endregion
+ #region "Source as Nananewton (nN)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -3073,7 +3045,7 @@ public void UnitConverter_ConvertUnits_nN_to_N_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nN";
string targetUnitName = "N";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -3088,7 +3060,7 @@ public void UnitConverter_ConvertUnits_nN_to_N_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nN";
string targetUnitName = "N";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -3104,7 +3076,7 @@ public void UnitConverter_ConvertUnits_nN_to_dyn_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nN";
string targetUnitName = "dyn";
- Measurement expected = new Measurement (Convert.ToDouble(0.01), "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);
@@ -3119,7 +3091,7 @@ public void UnitConverter_ConvertUnits_nN_to_dyn_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nN";
string targetUnitName = "dyn";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-05), "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);
@@ -3134,7 +3106,7 @@ public void UnitConverter_ConvertUnits_nN_to_lbf_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nN";
string targetUnitName = "lbf";
- Measurement expected = new Measurement (Convert.ToDouble(2.2480894E-08), "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);
@@ -3149,7 +3121,7 @@ public void UnitConverter_ConvertUnits_nN_to_lbf_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nN";
string targetUnitName = "lbf";
- Measurement expected = new Measurement (Convert.ToDouble(2.24809E-10), "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);
@@ -3164,7 +3136,7 @@ public void UnitConverter_ConvertUnits_nN_to_tonf_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nN";
string targetUnitName = "tonf";
- Measurement expected = new Measurement (Convert.ToDouble(1.124E-11), "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);
@@ -3179,7 +3151,7 @@ public void UnitConverter_ConvertUnits_nN_to_tonf_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nN";
string targetUnitName = "tonf";
- Measurement expected = new Measurement (Convert.ToDouble(1.12E-13), "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);
@@ -3194,7 +3166,7 @@ public void UnitConverter_ConvertUnits_nN_to_tonnef_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nN";
string targetUnitName = "tonnef";
- Measurement expected = new Measurement (Convert.ToDouble(1.0197E-11), "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);
@@ -3209,7 +3181,7 @@ public void UnitConverter_ConvertUnits_nN_to_tonnef_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nN";
string targetUnitName = "tonnef";
- Measurement expected = new Measurement (Convert.ToDouble(1.02E-13), "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);
@@ -3224,7 +3196,7 @@ public void UnitConverter_ConvertUnits_nN_to_Meganewton_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nN";
string targetUnitName = "Meganewton";
- Measurement expected = new Measurement (Convert.ToDouble(1E-13), "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);
@@ -3239,7 +3211,7 @@ public void UnitConverter_ConvertUnits_nN_to_Meganewton_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nN";
string targetUnitName = "Meganewton";
- Measurement expected = new Measurement (Convert.ToDouble(1E-15), "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);
@@ -3255,7 +3227,7 @@ public void UnitConverter_ConvertUnits_nN_to_GN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nN";
string targetUnitName = "GN";
- Measurement expected = new Measurement (Convert.ToDouble(0), "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);
@@ -3271,7 +3243,7 @@ public void UnitConverter_ConvertUnits_nN_to_GN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nN";
string targetUnitName = "GN";
- Measurement expected = new Measurement (Convert.ToDouble(0), "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);
@@ -3287,7 +3259,7 @@ public void UnitConverter_ConvertUnits_nN_to_kN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nN";
string targetUnitName = "kN";
- Measurement expected = new Measurement (Convert.ToDouble(1E-10), "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);
@@ -3302,7 +3274,7 @@ public void UnitConverter_ConvertUnits_nN_to_kN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nN";
string targetUnitName = "kN";
- Measurement expected = new Measurement (Convert.ToDouble(1E-12), "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);
@@ -3318,7 +3290,7 @@ public void UnitConverter_ConvertUnits_nN_to_mN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nN";
string targetUnitName = "mN";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -3333,7 +3305,7 @@ public void UnitConverter_ConvertUnits_nN_to_mN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nN";
string targetUnitName = "mN";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -3348,7 +3320,7 @@ public void UnitConverter_ConvertUnits_nN_to_µN_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nN";
string targetUnitName = "µN";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "µ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);
@@ -3363,17 +3335,15 @@ public void UnitConverter_ConvertUnits_nN_to_µN_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nN";
string targetUnitName = "µN";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "µ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"
-
+ #endregion
+ #endregion
+ #region "Momentum Tests"
+ #region "Source as kg m/s"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -3383,7 +3353,7 @@ public void UnitConverter_ConvertUnits_kgMetersPerSec_to_lbFtPerHr_Test ()
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 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);
@@ -3398,7 +3368,7 @@ public void UnitConverter_ConvertUnits_kgMetersPerSec_to_lbFtPerHr_Test2 ()
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 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);
@@ -3413,7 +3383,7 @@ public void UnitConverter_ConvertUnits_kgMeterPerSec_to_GramCentimeterPerSec_Tes
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 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);
@@ -3428,7 +3398,7 @@ public void UnitConverter_ConvertUnits_kgMeterPerSec_to_GramCentimeterPerSec_Tes
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 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);
@@ -3443,7 +3413,7 @@ public void UnitConverter_ConvertUnits_kgMeterPerSec_to_lbFtPerMin_Test ()
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 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);
@@ -3458,7 +3428,7 @@ public void UnitConverter_ConvertUnits_kgMeterPerSec_to_lbFtPerMin_Test2 ()
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 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);
@@ -3473,7 +3443,7 @@ public void UnitConverter_ConvertUnits_kgMeterPerSec_to_lbFtPerSec_Test ()
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 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);
@@ -3488,15 +3458,13 @@ public void UnitConverter_ConvertUnits_kgMeterPerSec_to_lbFtPerSec_Test2 ()
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 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"
-
+ #endregion
+ #region "Source as lb ft/hr"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -3506,7 +3474,7 @@ public void UnitConverter_ConvertUnits_lbFtPerHr_to_kgMetersPerSec_Test ()
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 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);
@@ -3521,7 +3489,7 @@ public void UnitConverter_ConvertUnits_lbFtPerHr_to_kgMetersPerSec_Test2 ()
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 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);
@@ -3536,7 +3504,7 @@ public void UnitConverter_ConvertUnits_lbFtPerHr_to_GramCentimeterPerSec_Test ()
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 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);
@@ -3551,7 +3519,7 @@ public void UnitConverter_ConvertUnits_lbFtPerHr_to_GramCentimeterPerSec_Test2 (
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 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);
@@ -3566,7 +3534,7 @@ public void UnitConverter_ConvertUnits_lbFtPerHr_to_lbFtPerMin_Test ()
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 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);
@@ -3581,7 +3549,7 @@ public void UnitConverter_ConvertUnits_lbFtPerHr_to_lbFtPerMin_Test2 ()
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 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);
@@ -3596,7 +3564,7 @@ public void UnitConverter_ConvertUnits_lbFtPerHr_to_lbFtPerSec_Test ()
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 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);
@@ -3611,15 +3579,13 @@ public void UnitConverter_ConvertUnits_lbFtPerHr_to_lbFtPerSec_Test2 ()
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 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"
-
+ #endregion
+ #region "Source as g cm/s"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -3629,7 +3595,7 @@ public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_kgMetersPerSec_Te
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 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);
@@ -3644,7 +3610,7 @@ public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_kgMetersPerSec_Te
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 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);
@@ -3659,7 +3625,7 @@ public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerHr_Test ()
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 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);
@@ -3674,7 +3640,7 @@ public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerHr_Test2 (
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 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);
@@ -3689,7 +3655,7 @@ public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerMin_Test (
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 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);
@@ -3704,7 +3670,7 @@ public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerMin_Test2
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 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);
@@ -3719,7 +3685,7 @@ public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerSec_Test (
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 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);
@@ -3734,15 +3700,13 @@ public void UnitConverter_ConvertUnits_GramCentimeterPerSec_to_lbFtPerSec_Test2
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 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"
-
+ #endregion
+ #region "Source as lb ft/min"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -3752,7 +3716,7 @@ public void UnitConverter_ConvertUnits_lbFtPerMin_to_kgMetersPerSec_Test ()
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 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);
@@ -3767,7 +3731,7 @@ public void UnitConverter_ConvertUnits_lbFtPerMin_to_kgMetersPerSec_Test2 ()
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 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);
@@ -3782,7 +3746,7 @@ public void UnitConverter_ConvertUnits_lbFtPerMin_to_lbFtPerHr_Test ()
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 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);
@@ -3797,7 +3761,7 @@ public void UnitConverter_ConvertUnits_lbFtPerMin_to_lbFtPerHr_Test2 ()
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 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);
@@ -3812,7 +3776,7 @@ public void UnitConverter_ConvertUnits_lbFtPerMin_to_GramCentimeterPerSec_Test (
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 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);
@@ -3827,7 +3791,7 @@ public void UnitConverter_ConvertUnits_lbFtPerMin_to_GramCentimeterPerSec_Test2
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 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);
@@ -3842,7 +3806,7 @@ public void UnitConverter_ConvertUnits_lbFtPerMin_to_lbFtPerSec_Test ()
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 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);
@@ -3857,15 +3821,13 @@ public void UnitConverter_ConvertUnits_lbFtPerMin_to_lbFtPerSec_Test2 ()
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 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"
-
+ #endregion
+ #region "Source as lb ft/sec"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -3875,7 +3837,7 @@ public void UnitConverter_ConvertUnits_lbFtPerSec_to_kgMetersPerSec_Test ()
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 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);
@@ -3890,7 +3852,7 @@ public void UnitConverter_ConvertUnits_lbFtPerSec_to_kgMetersPerSec_Test2 ()
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 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);
@@ -3905,7 +3867,7 @@ public void UnitConverter_ConvertUnits_lbFtPerSec_to_lbFtPerHr_Test ()
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 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);
@@ -3920,7 +3882,7 @@ public void UnitConverter_ConvertUnits_lbFtPerSec_to_lbFtPerHr_Test2 ()
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 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);
@@ -3935,7 +3897,7 @@ public void UnitConverter_ConvertUnits_lbFtPerSec_to_GramCentimeterPerSec_Test (
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 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);
@@ -3950,7 +3912,7 @@ public void UnitConverter_ConvertUnits_lbFtPerSec_to_GramCentimeterPerSec_Test2
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 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);
@@ -3965,7 +3927,7 @@ public void UnitConverter_ConvertUnits_lbFtPerSec_to_lbFtPerMin_Test ()
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 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);
@@ -3980,17 +3942,15 @@ public void UnitConverter_ConvertUnits_lbFtPerSec_to_lbFtPerMin_Test2 ()
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 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"
-
+ #endregion
+ #endregion
+ #region "Speed Tests"
+ #region "Source as Meters/Second"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -4000,7 +3960,7 @@ public void UnitConverter_ConvertUnits_MetersPerSec_to_KmPerHr_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m/s";
string targetUnitName = "km/h";
- Measurement expected = new Measurement (Convert.ToDouble(360), "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);
@@ -4015,7 +3975,7 @@ public void UnitConverter_ConvertUnits_MetersPerSec_to_KmPerHr_Test2 ()
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 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);
@@ -4030,7 +3990,7 @@ public void UnitConverter_ConvertUnits_MetersPerSec_to_MilesPerHr_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m/s";
string targetUnitName = "mph";
- Measurement expected = new Measurement (Convert.ToDouble(223.69362920544), "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);
@@ -4045,7 +4005,7 @@ public void UnitConverter_ConvertUnits_MetersPerSec_to_MilesPerHr_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m/s";
string targetUnitName = "mph";
- Measurement expected = new Measurement (Convert.ToDouble(2.23693628981747), "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);
@@ -4060,7 +4020,7 @@ public void UnitConverter_ConvertUnits_MetersPerSec_to_MetersPerMin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m/s";
string targetUnitName = "m/min";
- Measurement expected = new Measurement (Convert.ToDouble(6000), "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);
@@ -4075,7 +4035,7 @@ public void UnitConverter_ConvertUnits_MetersPerSec_to_MetersPerMin_Test2 ()
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 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);
@@ -4090,7 +4050,7 @@ public void UnitConverter_ConvertUnits_MetersPerSec_to_FtPerSec_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m/s";
string targetUnitName = "ft/s";
- Measurement expected = new Measurement (Convert.ToDouble(328.083989501312), "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);
@@ -4105,15 +4065,13 @@ public void UnitConverter_ConvertUnits_MetersPerSec_to_FtPerSec_Test2 ()
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 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"
-
+ #endregion
+ #region "Source as Kilometers/Hour"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -4123,7 +4081,7 @@ public void UnitConverter_ConvertUnits_KmPerHr_to_MetersPerSec_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km/h";
string targetUnitName = "m/s";
- Measurement expected = new Measurement (Convert.ToDouble(27.7777777777778), "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);
@@ -4138,7 +4096,7 @@ public void UnitConverter_ConvertUnits_KmPerHr_to_MetersPerSec_Test2 ()
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 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);
@@ -4153,7 +4111,7 @@ public void UnitConverter_ConvertUnits_KmPerHr_to_MilesPerHr_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km/h";
string targetUnitName = "mph";
- Measurement expected = new Measurement (Convert.ToDouble(62.1371192237334), "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);
@@ -4168,7 +4126,7 @@ public void UnitConverter_ConvertUnits_KmPerHr_to_MilesPerHr_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km/h";
string targetUnitName = "mph";
- Measurement expected = new Measurement (Convert.ToDouble(0.621371191615963), "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);
@@ -4183,7 +4141,7 @@ public void UnitConverter_ConvertUnits_KmPerHr_to_MetersPerMin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km/h";
string targetUnitName = "m/min";
- Measurement expected = new Measurement (Convert.ToDouble(1666.66666666667), "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);
@@ -4198,7 +4156,7 @@ public void UnitConverter_ConvertUnits_KmPerHr_to_MetersPerMin_Test2 ()
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 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);
@@ -4213,7 +4171,7 @@ public void UnitConverter_ConvertUnits_KmPerHr_to_FtPerSec_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km/h";
string targetUnitName = "ft/s";
- Measurement expected = new Measurement (Convert.ToDouble(91.1344415281423), "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);
@@ -4228,15 +4186,13 @@ public void UnitConverter_ConvertUnits_KmPerHr_to_FtPerSec_Test2 ()
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 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"
-
+ #endregion
+ #region "Source as Miles/Hour"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -4246,7 +4202,7 @@ public void UnitConverter_ConvertUnits_MilesPerHr_to_MetersPerSec_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mph";
string targetUnitName = "m/s";
- Measurement expected = new Measurement (Convert.ToDouble(44.704), "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);
@@ -4261,7 +4217,7 @@ public void UnitConverter_ConvertUnits_MilesPerHr_to_MetersPerSec_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mph";
string targetUnitName = "m/s";
- Measurement expected = new Measurement (Convert.ToDouble(0.44703999955296), "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);
@@ -4276,7 +4232,7 @@ public void UnitConverter_ConvertUnits_MilesPerHr_to_KmPerHr_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mph";
string targetUnitName = "km/h";
- Measurement expected = new Measurement (Convert.ToDouble(160.9344), "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);
@@ -4291,7 +4247,7 @@ public void UnitConverter_ConvertUnits_MilesPerHr_to_KmPerHr_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mph";
string targetUnitName = "km/h";
- Measurement expected = new Measurement (Convert.ToDouble(1.60934399839066), "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);
@@ -4306,7 +4262,7 @@ public void UnitConverter_ConvertUnits_MilesPerHr_to_MetersPerMin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mph";
string targetUnitName = "m/min";
- Measurement expected = new Measurement (Convert.ToDouble(2682.24), "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);
@@ -4321,7 +4277,7 @@ public void UnitConverter_ConvertUnits_MilesPerHr_to_MetersPerMin_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mph";
string targetUnitName = "m/min";
- Measurement expected = new Measurement (Convert.ToDouble(26.8223999731776), "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);
@@ -4336,7 +4292,7 @@ public void UnitConverter_ConvertUnits_MilesPerHr_to_FtPerSec_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mph";
string targetUnitName = "ft/s";
- Measurement expected = new Measurement (Convert.ToDouble(146.666666666667), "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);
@@ -4351,15 +4307,13 @@ public void UnitConverter_ConvertUnits_MilesPerHr_to_FtPerSec_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mph";
string targetUnitName = "ft/s";
- Measurement expected = new Measurement (Convert.ToDouble(1.4666666652), "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"
-
+ #endregion
+ #region "Source as Meters/Minute"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -4369,7 +4323,7 @@ public void UnitConverter_ConvertUnits_MetersPerMin_to_MetersPerSec_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m/min";
string targetUnitName = "m/s";
- Measurement expected = new Measurement (Convert.ToDouble(1.66666666666667), "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);
@@ -4384,7 +4338,7 @@ public void UnitConverter_ConvertUnits_MetersPerMin_to_MetersPerSec_Test2 ()
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 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);
@@ -4399,7 +4353,7 @@ public void UnitConverter_ConvertUnits_MetersPerMin_to_KmPerHr_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m/min";
string targetUnitName = "km/h";
- Measurement expected = new Measurement (Convert.ToDouble(6), "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);
@@ -4414,7 +4368,7 @@ public void UnitConverter_ConvertUnits_MetersPerMin_to_KmPerHr_Test2 ()
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 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);
@@ -4429,7 +4383,7 @@ public void UnitConverter_ConvertUnits_MetersPerMin_to_MilesPerHr_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m/min";
string targetUnitName = "mph";
- Measurement expected = new Measurement (Convert.ToDouble(3.728227153424), "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);
@@ -4444,7 +4398,7 @@ public void UnitConverter_ConvertUnits_MetersPerMin_to_MilesPerHr_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m/min";
string targetUnitName = "mph";
- Measurement expected = new Measurement (Convert.ToDouble(0.037282271496958), "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);
@@ -4459,7 +4413,7 @@ public void UnitConverter_ConvertUnits_MetersPerMin_to_FtPerSec_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m/min";
string targetUnitName = "ft/s";
- Measurement expected = new Measurement (Convert.ToDouble(5.46806649168854), "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);
@@ -4474,15 +4428,13 @@ public void UnitConverter_ConvertUnits_MetersPerMin_to_FtPerSec_Test2 ()
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 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"
-
+ #endregion
+ #region "Source as Feet/Second"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -4492,7 +4444,7 @@ public void UnitConverter_ConvertUnits_FtPerSec_to_MetersPerSec_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft/s";
string targetUnitName = "m/s";
- Measurement expected = new Measurement (Convert.ToDouble(30.48), "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);
@@ -4508,7 +4460,7 @@ public void UnitConverter_ConvertUnits_FtPerSec_to_MetersPerSec_Test2 ()
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 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);
@@ -4523,7 +4475,7 @@ public void UnitConverter_ConvertUnits_FtPerSec_to_KmPerHr_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft/s";
string targetUnitName = "km/h";
- Measurement expected = new Measurement (Convert.ToDouble(109.728), "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);
@@ -4539,7 +4491,7 @@ public void UnitConverter_ConvertUnits_FtPerSec_to_KmPerHr_Test2 ()
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 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);
@@ -4554,7 +4506,7 @@ public void UnitConverter_ConvertUnits_FtPerSec_to_MilesPerHr_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft/s";
string targetUnitName = "mph";
- Measurement expected = new Measurement (Convert.ToDouble(68.1818181818182), "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);
@@ -4569,7 +4521,7 @@ public void UnitConverter_ConvertUnits_FtPerSec_to_MilesPerHr_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft/s";
string targetUnitName = "mph";
- Measurement expected = new Measurement (Convert.ToDouble(0.681818181136364), "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);
@@ -4584,7 +4536,7 @@ public void UnitConverter_ConvertUnits_FtPerSec_to_MetersPerMin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft/s";
string targetUnitName = "m/min";
- Measurement expected = new Measurement (Convert.ToDouble(1828.8), "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);
@@ -4599,17 +4551,15 @@ public void UnitConverter_ConvertUnits_FtPerSec_to_MetersPerMin_Test2 ()
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 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"
-
+ #endregion
+ #endregion
+ #region "Length Tests"
+ #region "Source as Metres"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -4619,7 +4569,7 @@ public void UnitConverter_ConvertUnits_m_to_yd_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(109.361329833771), "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);
@@ -4634,7 +4584,7 @@ public void UnitConverter_ConvertUnits_m_to_yd_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(1.0936132972441), "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);
@@ -4649,7 +4599,7 @@ public void UnitConverter_ConvertUnits_m_to_ft_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(328.083989501312), "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);
@@ -4665,7 +4615,7 @@ public void UnitConverter_ConvertUnits_m_to_ft_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(3.28083989173228), "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);
@@ -4680,7 +4630,7 @@ public void UnitConverter_ConvertUnits_m_to_chain_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(4.97096953789867), "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);
@@ -4695,7 +4645,7 @@ public void UnitConverter_ConvertUnits_m_to_chain_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(0.049709695329277), "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);
@@ -4710,7 +4660,7 @@ public void UnitConverter_ConvertUnits_m_to_mile_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(0.062137119223733), "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);
@@ -4725,7 +4675,7 @@ public void UnitConverter_ConvertUnits_m_to_mile_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(0.000621371191616), "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);
@@ -4740,7 +4690,7 @@ public void UnitConverter_ConvertUnits_m_to_km_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -4755,7 +4705,7 @@ public void UnitConverter_ConvertUnits_m_to_km_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -4770,7 +4720,7 @@ public void UnitConverter_ConvertUnits_m_to_Megametres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -4785,7 +4735,7 @@ public void UnitConverter_ConvertUnits_m_to_Megametres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -4800,7 +4750,7 @@ public void UnitConverter_ConvertUnits_m_to_Gm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -4815,7 +4765,7 @@ public void UnitConverter_ConvertUnits_m_to_Gm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -4830,7 +4780,7 @@ public void UnitConverter_ConvertUnits_m_to_furlong_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(0.497096953789867), "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);
@@ -4845,7 +4795,7 @@ public void UnitConverter_ConvertUnits_m_to_furlong_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(0.004970969532928), "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);
@@ -4860,7 +4810,7 @@ public void UnitConverter_ConvertUnits_m_to_thou_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(3937007.87401575), "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);
@@ -4875,7 +4825,7 @@ public void UnitConverter_ConvertUnits_m_to_thou_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(39370.0787007874), "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);
@@ -4890,7 +4840,7 @@ public void UnitConverter_ConvertUnits_m_to_µm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "µ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);
@@ -4905,7 +4855,7 @@ public void UnitConverter_ConvertUnits_m_to_µm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "µ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);
@@ -4920,7 +4870,7 @@ public void UnitConverter_ConvertUnits_m_to_in_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(3937.00787401575), "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);
@@ -4935,7 +4885,7 @@ public void UnitConverter_ConvertUnits_m_to_in_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(39.3700787007874), "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);
@@ -4950,7 +4900,7 @@ public void UnitConverter_ConvertUnits_m_to_cm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(10000), "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);
@@ -4965,7 +4915,7 @@ public void UnitConverter_ConvertUnits_m_to_cm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(99.9999999), "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);
@@ -4980,7 +4930,7 @@ public void UnitConverter_ConvertUnits_m_to_millimetres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -4995,15 +4945,13 @@ public void UnitConverter_ConvertUnits_m_to_millimetres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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"
-
+ #endregion
+ #region "Source as Yards"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -5013,7 +4961,7 @@ public void UnitConverter_ConvertUnits_yd_to_m_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(91.44), "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);
@@ -5029,7 +4977,7 @@ public void UnitConverter_ConvertUnits_yd_to_m_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(0.9143999990856), "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);
@@ -5044,7 +4992,7 @@ public void UnitConverter_ConvertUnits_yd_to_ft_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(300), "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);
@@ -5059,7 +5007,7 @@ public void UnitConverter_ConvertUnits_yd_to_ft_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(2.999999997), "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);
@@ -5074,7 +5022,7 @@ public void UnitConverter_ConvertUnits_yd_to_chain_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(4.54545454545455), "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);
@@ -5089,7 +5037,7 @@ public void UnitConverter_ConvertUnits_yd_to_chain_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(0.045454545409091), "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);
@@ -5104,7 +5052,7 @@ public void UnitConverter_ConvertUnits_yd_to_mile_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(0.056818181818182), "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);
@@ -5119,7 +5067,7 @@ public void UnitConverter_ConvertUnits_yd_to_mile_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(0.000568181817614), "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);
@@ -5134,7 +5082,7 @@ public void UnitConverter_ConvertUnits_yd_to_km_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(0.09144), "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);
@@ -5149,7 +5097,7 @@ public void UnitConverter_ConvertUnits_yd_to_km_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(0.000914399999086), "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);
@@ -5164,7 +5112,7 @@ public void UnitConverter_ConvertUnits_yd_to_Megametres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(9.144E-05), "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);
@@ -5179,7 +5127,7 @@ public void UnitConverter_ConvertUnits_yd_to_Megametres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(9.14399999E-07), "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);
@@ -5194,7 +5142,7 @@ public void UnitConverter_ConvertUnits_yd_to_Gm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(9.144E-08), "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);
@@ -5209,7 +5157,7 @@ public void UnitConverter_ConvertUnits_yd_to_Gm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(9.144E-10), "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);
@@ -5224,7 +5172,7 @@ public void UnitConverter_ConvertUnits_yd_to_furlong_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(0.454545454545454), "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);
@@ -5239,7 +5187,7 @@ public void UnitConverter_ConvertUnits_yd_to_furlong_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(0.004545454540909), "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);
@@ -5254,7 +5202,7 @@ public void UnitConverter_ConvertUnits_yd_to_thou_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(3600000), "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);
@@ -5269,7 +5217,7 @@ public void UnitConverter_ConvertUnits_yd_to_thou_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(35999.999964), "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);
@@ -5284,7 +5232,7 @@ public void UnitConverter_ConvertUnits_yd_to_µm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(91440000), "µ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);
@@ -5299,7 +5247,7 @@ public void UnitConverter_ConvertUnits_yd_to_µm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(914399.9990856), "µ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);
@@ -5314,7 +5262,7 @@ public void UnitConverter_ConvertUnits_yd_to_in_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(3600), "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);
@@ -5329,7 +5277,7 @@ public void UnitConverter_ConvertUnits_yd_to_in_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(35.999999964), "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);
@@ -5345,7 +5293,7 @@ public void UnitConverter_ConvertUnits_yd_to_cm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(9144), "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);
@@ -5360,7 +5308,7 @@ public void UnitConverter_ConvertUnits_yd_to_cm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(91.43999990856), "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);
@@ -5375,7 +5323,7 @@ public void UnitConverter_ConvertUnits_yd_to_millimetres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(91440), "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);
@@ -5390,15 +5338,13 @@ public void UnitConverter_ConvertUnits_yd_to_millimetres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(914.3999990856), "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"
-
+ #endregion
+ #region "Source as Feet"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -5408,7 +5354,7 @@ public void UnitConverter_ConvertUnits_ft_to_m_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(30.48), "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);
@@ -5423,7 +5369,7 @@ public void UnitConverter_ConvertUnits_ft_to_m_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(0.3047999996952), "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);
@@ -5438,7 +5384,7 @@ public void UnitConverter_ConvertUnits_ft_to_m_negative_Test ()
double value = Convert.ToDouble (-0.999999999);
string currentUnitName = "ft";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(-0.3047999996952), "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);
@@ -5453,7 +5399,7 @@ public void UnitConverter_ConvertUnits_ft_to_yd_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(33.3333333333333), "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);
@@ -5468,7 +5414,7 @@ public void UnitConverter_ConvertUnits_ft_to_yd_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(0.333333333), "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);
@@ -5483,7 +5429,7 @@ public void UnitConverter_ConvertUnits_ft_to_chain_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(1.51515151515151), "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);
@@ -5498,7 +5444,7 @@ public void UnitConverter_ConvertUnits_ft_to_chain_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(0.015151515136364), "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);
@@ -5513,7 +5459,7 @@ public void UnitConverter_ConvertUnits_ft_to_mile_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(0.018939393939394), "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);
@@ -5528,7 +5474,7 @@ public void UnitConverter_ConvertUnits_ft_to_mile_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(0.000189393939205), "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);
@@ -5543,7 +5489,7 @@ public void UnitConverter_ConvertUnits_ft_to_km_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(0.03048), "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);
@@ -5558,7 +5504,7 @@ public void UnitConverter_ConvertUnits_ft_to_km_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(0.000304799999695), "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);
@@ -5573,7 +5519,7 @@ public void UnitConverter_ConvertUnits_ft_to_Megametres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(3.048E-05), "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);
@@ -5588,7 +5534,7 @@ public void UnitConverter_ConvertUnits_ft_to_Megametres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(3.048E-07), "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);
@@ -5603,7 +5549,7 @@ public void UnitConverter_ConvertUnits_ft_to_Gm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(3.048E-08), "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);
@@ -5618,7 +5564,7 @@ public void UnitConverter_ConvertUnits_ft_to_Gm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(3.048E-10), "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);
@@ -5633,7 +5579,7 @@ public void UnitConverter_ConvertUnits_ft_to_furlong_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(0.151515151515152), "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);
@@ -5648,7 +5594,7 @@ public void UnitConverter_ConvertUnits_ft_to_furlong_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(0.001515151513636), "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);
@@ -5663,7 +5609,7 @@ public void UnitConverter_ConvertUnits_ft_to_thou_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(1200000), "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);
@@ -5678,7 +5624,7 @@ public void UnitConverter_ConvertUnits_ft_to_thou_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(11999.999988), "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);
@@ -5693,7 +5639,7 @@ public void UnitConverter_ConvertUnits_ft_to_µm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(30480000), "µ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);
@@ -5708,7 +5654,7 @@ public void UnitConverter_ConvertUnits_ft_to_µm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(304799.9996952), "µ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);
@@ -5723,7 +5669,7 @@ public void UnitConverter_ConvertUnits_ft_to_in_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(1200), "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);
@@ -5738,7 +5684,7 @@ public void UnitConverter_ConvertUnits_ft_to_in_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(11.999999988), "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);
@@ -5753,7 +5699,7 @@ public void UnitConverter_ConvertUnits_ft_to_cm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(3048), "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);
@@ -5768,7 +5714,7 @@ public void UnitConverter_ConvertUnits_ft_to_cm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(30.47999996952), "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);
@@ -5783,7 +5729,7 @@ public void UnitConverter_ConvertUnits_ft_to_millimetres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(30480), "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);
@@ -5798,15 +5744,13 @@ public void UnitConverter_ConvertUnits_ft_to_millimetres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(304.7999996952), "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"
-
+ #endregion
+ #region "Source as Chain"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -5816,7 +5760,7 @@ public void UnitConverter_ConvertUnits_chain_to_m_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "chain";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(2011.68), "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);
@@ -5831,7 +5775,7 @@ public void UnitConverter_ConvertUnits_chain_to_m_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "chain";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(20.1167999798832), "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);
@@ -5846,7 +5790,7 @@ public void UnitConverter_ConvertUnits_chain_to_yd_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "chain";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(2200), "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);
@@ -5861,7 +5805,7 @@ public void UnitConverter_ConvertUnits_chain_to_yd_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "chain";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(21.999999978), "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);
@@ -5876,7 +5820,7 @@ public void UnitConverter_ConvertUnits_chain_to_ft_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "chain";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(6600), "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);
@@ -5891,7 +5835,7 @@ public void UnitConverter_ConvertUnits_chain_to_ft_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "chain";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(65.999999934), "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);
@@ -5906,7 +5850,7 @@ public void UnitConverter_ConvertUnits_chain_to_mile_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "chain";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(1.25), "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);
@@ -5921,7 +5865,7 @@ public void UnitConverter_ConvertUnits_chain_to_mile_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "chain";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(0.0124999999875), "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);
@@ -5936,7 +5880,7 @@ public void UnitConverter_ConvertUnits_chain_to_km_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "chain";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(2.01168), "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);
@@ -5951,7 +5895,7 @@ public void UnitConverter_ConvertUnits_chain_to_km_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "chain";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(0.020116799979883), "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);
@@ -5966,7 +5910,7 @@ public void UnitConverter_ConvertUnits_chain_to_Megametres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "chain";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(0.00201168), "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);
@@ -5981,7 +5925,7 @@ public void UnitConverter_ConvertUnits_chain_to_Megametres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "chain";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(2.011679998E-05), "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);
@@ -5996,7 +5940,7 @@ public void UnitConverter_ConvertUnits_chain_to_Gm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "chain";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(2.01168E-06), "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);
@@ -6011,7 +5955,7 @@ public void UnitConverter_ConvertUnits_chain_to_Gm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "chain";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(2.01168E-08), "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);
@@ -6026,7 +5970,7 @@ public void UnitConverter_ConvertUnits_chain_to_furlong_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "chain";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(10), "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);
@@ -6041,7 +5985,7 @@ public void UnitConverter_ConvertUnits_chain_to_furlong_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "chain";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(0.0999999999), "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);
@@ -6056,7 +6000,7 @@ public void UnitConverter_ConvertUnits_chain_to_thou_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "chain";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(79200000), "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);
@@ -6071,7 +6015,7 @@ public void UnitConverter_ConvertUnits_chain_to_thou_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "chain";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(791999.999208), "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);
@@ -6086,7 +6030,7 @@ public void UnitConverter_ConvertUnits_chain_to_µm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "chain";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(2011680000), "µ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);
@@ -6101,7 +6045,7 @@ public void UnitConverter_ConvertUnits_chain_to_µm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "chain";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(20116799.979883), "µ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);
@@ -6116,7 +6060,7 @@ public void UnitConverter_ConvertUnits_chain_to_in_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "chain";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(79200), "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);
@@ -6131,7 +6075,7 @@ public void UnitConverter_ConvertUnits_chain_to_in_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "chain";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(791.999999208), "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);
@@ -6146,7 +6090,7 @@ public void UnitConverter_ConvertUnits_chain_to_cm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "chain";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(201168), "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);
@@ -6161,7 +6105,7 @@ public void UnitConverter_ConvertUnits_chain_to_cm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "chain";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(2011.67999798832), "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);
@@ -6176,7 +6120,7 @@ public void UnitConverter_ConvertUnits_chain_to_millimetres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "chain";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(2011680), "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);
@@ -6191,15 +6135,13 @@ public void UnitConverter_ConvertUnits_chain_to_millimetres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "chain";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(20116.7999798832), "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"
-
+ #endregion
+ #region "Source as Miles"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -6209,7 +6151,7 @@ public void UnitConverter_ConvertUnits_miles_to_m_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(160934.4), "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);
@@ -6224,7 +6166,7 @@ public void UnitConverter_ConvertUnits_miles_to_m_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(1609.34399839066), "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);
@@ -6239,7 +6181,7 @@ public void UnitConverter_ConvertUnits_miles_to_yd_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(176000), "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);
@@ -6254,7 +6196,7 @@ public void UnitConverter_ConvertUnits_miles_to_yd_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(1759.99999824), "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);
@@ -6269,7 +6211,7 @@ public void UnitConverter_ConvertUnits_miles_to_ft_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(528000), "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);
@@ -6284,7 +6226,7 @@ public void UnitConverter_ConvertUnits_miles_to_ft_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(5279.99999472), "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);
@@ -6299,7 +6241,7 @@ public void UnitConverter_ConvertUnits_miles_to_chain_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(8000), "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);
@@ -6314,7 +6256,7 @@ public void UnitConverter_ConvertUnits_miles_to_chain_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(79.99999992), "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);
@@ -6329,7 +6271,7 @@ public void UnitConverter_ConvertUnits_miles_to_km_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(160.9344), "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);
@@ -6344,7 +6286,7 @@ public void UnitConverter_ConvertUnits_miles_to_km_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(1.60934399839066), "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);
@@ -6359,7 +6301,7 @@ public void UnitConverter_ConvertUnits_miles_to_Megametres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(0.1609344), "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);
@@ -6374,7 +6316,7 @@ public void UnitConverter_ConvertUnits_miles_to_Megametres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(0.001609343998391), "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);
@@ -6389,7 +6331,7 @@ public void UnitConverter_ConvertUnits_miles_to_Gm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001609344), "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);
@@ -6404,7 +6346,7 @@ public void UnitConverter_ConvertUnits_miles_to_Gm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(1.609343998E-06), "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);
@@ -6419,7 +6361,7 @@ public void UnitConverter_ConvertUnits_miles_to_furlong_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(800), "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);
@@ -6434,7 +6376,7 @@ public void UnitConverter_ConvertUnits_miles_to_furlong_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(7.999999992), "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);
@@ -6449,7 +6391,7 @@ public void UnitConverter_ConvertUnits_miles_to_thou_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(6336000000L), "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);
@@ -6464,7 +6406,7 @@ public void UnitConverter_ConvertUnits_miles_to_thou_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(63359999.93664), "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);
@@ -6479,7 +6421,7 @@ public void UnitConverter_ConvertUnits_miles_to_µm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(160934400000L), "µ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);
@@ -6494,7 +6436,7 @@ public void UnitConverter_ConvertUnits_miles_to_µm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(1609343998.391), "µ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);
@@ -6509,7 +6451,7 @@ public void UnitConverter_ConvertUnits_miles_to_in_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(6336000), "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);
@@ -6524,7 +6466,7 @@ public void UnitConverter_ConvertUnits_miles_to_in_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(63359.99993664), "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);
@@ -6539,7 +6481,7 @@ public void UnitConverter_ConvertUnits_miles_to_cm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(16093440), "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);
@@ -6554,7 +6496,7 @@ public void UnitConverter_ConvertUnits_miles_to_cm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(160934.399839066), "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);
@@ -6569,7 +6511,7 @@ public void UnitConverter_ConvertUnits_miles_to_millimetres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(160934400), "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);
@@ -6584,15 +6526,13 @@ public void UnitConverter_ConvertUnits_miles_to_millimetres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(1609343.998391), "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"
-
+ #endregion
+ #region "Source as Kilometres"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -6602,7 +6542,7 @@ public void UnitConverter_ConvertUnits_km_to_m_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -6617,7 +6557,7 @@ public void UnitConverter_ConvertUnits_km_to_m_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -6632,7 +6572,7 @@ public void UnitConverter_ConvertUnits_km_to_yd_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(109361.329833771), "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);
@@ -6647,7 +6587,7 @@ public void UnitConverter_ConvertUnits_km_to_yd_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(1093.61329724409), "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);
@@ -6662,7 +6602,7 @@ public void UnitConverter_ConvertUnits_km_to_ft_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(328083.989501312), "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);
@@ -6677,7 +6617,7 @@ public void UnitConverter_ConvertUnits_km_to_ft_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(3280.83989173228), "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);
@@ -6692,7 +6632,7 @@ public void UnitConverter_ConvertUnits_km_to_chain_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(4970.96953789867), "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);
@@ -6707,7 +6647,7 @@ public void UnitConverter_ConvertUnits_km_to_chain_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(49.709695329277), "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);
@@ -6722,7 +6662,7 @@ public void UnitConverter_ConvertUnits_km_to_miles_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(62.1371192237334), "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);
@@ -6737,7 +6677,7 @@ public void UnitConverter_ConvertUnits_km_to_miles_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(0.621371191615963), "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);
@@ -6752,7 +6692,7 @@ public void UnitConverter_ConvertUnits_km_to_Megametres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -6767,7 +6707,7 @@ public void UnitConverter_ConvertUnits_km_to_Megametres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -6782,7 +6722,7 @@ public void UnitConverter_ConvertUnits_km_to_Gm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -6797,7 +6737,7 @@ public void UnitConverter_ConvertUnits_km_to_Gm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -6812,7 +6752,7 @@ public void UnitConverter_ConvertUnits_km_to_furlong_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(497.096953789867), "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);
@@ -6827,7 +6767,7 @@ public void UnitConverter_ConvertUnits_km_to_furlong_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(4.9709695329277), "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);
@@ -6842,7 +6782,7 @@ public void UnitConverter_ConvertUnits_km_to_thou_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(3937007874.01575), "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);
@@ -6857,7 +6797,7 @@ public void UnitConverter_ConvertUnits_km_to_thou_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(39370078.7007874), "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);
@@ -6872,7 +6812,7 @@ public void UnitConverter_ConvertUnits_km_to_µm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "µ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);
@@ -6887,7 +6827,7 @@ public void UnitConverter_ConvertUnits_km_to_µm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(999999999), "µ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);
@@ -6902,7 +6842,7 @@ public void UnitConverter_ConvertUnits_km_to_in_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(3937007.87401575), "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);
@@ -6917,7 +6857,7 @@ public void UnitConverter_ConvertUnits_km_to_in_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(39370.0787007874), "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);
@@ -6932,7 +6872,7 @@ public void UnitConverter_ConvertUnits_km_to_cm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(10000000), "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);
@@ -6947,7 +6887,7 @@ public void UnitConverter_ConvertUnits_km_to_cm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(99999.9999), "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);
@@ -6962,7 +6902,7 @@ public void UnitConverter_ConvertUnits_km_to_millimetres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -6977,15 +6917,13 @@ public void UnitConverter_ConvertUnits_km_to_millimetres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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"
-
+ #endregion
+ #region "Source as Megametres"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -6995,7 +6933,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_m_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mm";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -7010,7 +6948,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_m_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mm";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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);
@@ -7025,7 +6963,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_yd_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mm";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(109361329.833771), "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);
@@ -7040,7 +6978,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_yd_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mm";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(1093613.29724409), "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);
@@ -7055,7 +6993,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_ft_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mm";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(328083989.501312), "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);
@@ -7070,7 +7008,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_ft_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mm";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(3280839.89173228), "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);
@@ -7085,7 +7023,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_chain_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mm";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(4970969.53789867), "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);
@@ -7100,7 +7038,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_chain_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mm";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(49709.695329277), "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);
@@ -7115,7 +7053,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_miles_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mm";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(62137.1192237334), "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);
@@ -7130,7 +7068,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_miles_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mm";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(621.371191615963), "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);
@@ -7145,7 +7083,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_km_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mm";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -7160,7 +7098,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_km_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mm";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -7175,7 +7113,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_Gm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mm";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -7190,7 +7128,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_Gm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mm";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -7205,7 +7143,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_furlong_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mm";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(497096.953789867), "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);
@@ -7220,7 +7158,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_furlong_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mm";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(4970.9695329277), "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);
@@ -7235,7 +7173,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_thou_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mm";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(3937007874015.75), "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);
@@ -7250,7 +7188,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_thou_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mm";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(39370078700.7874), "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);
@@ -7265,7 +7203,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_µm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mm";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000L), "µ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);
@@ -7280,7 +7218,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_µm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mm";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000L), "µ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);
@@ -7295,7 +7233,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_in_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mm";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(3937007874.01575), "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);
@@ -7310,7 +7248,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_in_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mm";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(39370078.7007874), "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);
@@ -7325,7 +7263,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_cm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mm";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(10000000000L), "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);
@@ -7340,7 +7278,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_cm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mm";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(99999999.9), "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);
@@ -7355,7 +7293,7 @@ public void UnitConverter_ConvertUnits_Megametres_to_millimetres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Mm";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "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);
@@ -7370,15 +7308,13 @@ public void UnitConverter_ConvertUnits_Megametres_to_millimetres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Mm";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(999999999), "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"
-
+ #endregion
+ #region "Source as Gigametres"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -7388,7 +7324,7 @@ public void UnitConverter_ConvertUnits_Gm_to_m_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gm";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "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);
@@ -7403,7 +7339,7 @@ public void UnitConverter_ConvertUnits_Gm_to_m_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gm";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(999999999), "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);
@@ -7418,7 +7354,7 @@ public void UnitConverter_ConvertUnits_Gm_to_yd_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gm";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(109361329833.771), "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);
@@ -7433,7 +7369,7 @@ public void UnitConverter_ConvertUnits_Gm_to_yd_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gm";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(1093613297.24409), "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);
@@ -7448,7 +7384,7 @@ public void UnitConverter_ConvertUnits_Gm_to_ft_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gm";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(328083989501.312), "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);
@@ -7463,7 +7399,7 @@ public void UnitConverter_ConvertUnits_Gm_to_ft_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gm";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(3280839891.73228), "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);
@@ -7478,7 +7414,7 @@ public void UnitConverter_ConvertUnits_Gm_to_chain_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gm";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(4970969537.89867), "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);
@@ -7493,7 +7429,7 @@ public void UnitConverter_ConvertUnits_Gm_to_chain_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gm";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(49709695.329277), "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);
@@ -7508,7 +7444,7 @@ public void UnitConverter_ConvertUnits_Gm_to_miles_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gm";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(62137119.2237334), "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);
@@ -7523,7 +7459,7 @@ public void UnitConverter_ConvertUnits_Gm_to_miles_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gm";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(621371.191615963), "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);
@@ -7538,7 +7474,7 @@ public void UnitConverter_ConvertUnits_Gm_to_km_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gm";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -7553,7 +7489,7 @@ public void UnitConverter_ConvertUnits_Gms_to_km_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gm";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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);
@@ -7568,7 +7504,7 @@ public void UnitConverter_ConvertUnits_Gm_to_Megametres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gm";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -7583,7 +7519,7 @@ public void UnitConverter_ConvertUnits_Gm_to_Megametres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gm";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -7598,7 +7534,7 @@ public void UnitConverter_ConvertUnits_Gm_to_furlong_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gm";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(497096953.789867), "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);
@@ -7613,7 +7549,7 @@ public void UnitConverter_ConvertUnits_Gm_to_furlong_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gm";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(4970969.5329277), "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);
@@ -7628,7 +7564,7 @@ public void UnitConverter_ConvertUnits_Gm_to_thou_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gm";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(3937007874015748L), "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);
@@ -7643,7 +7579,7 @@ public void UnitConverter_ConvertUnits_Gm_to_thou_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gm";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(39370078700787.4), "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);
@@ -7658,7 +7594,7 @@ public void UnitConverter_ConvertUnits_Gm_to_µm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gm";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000000L), "µ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);
@@ -7673,7 +7609,7 @@ public void UnitConverter_ConvertUnits_Gm_to_µm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gm";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000000L), "µ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);
@@ -7688,7 +7624,7 @@ public void UnitConverter_ConvertUnits_Gm_to_in_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gm";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(3937007874015.75), "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);
@@ -7703,7 +7639,7 @@ public void UnitConverter_ConvertUnits_Gm_to_in_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gm";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(39370078700.7874), "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);
@@ -7718,7 +7654,7 @@ public void UnitConverter_ConvertUnits_Gm_to_cm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gm";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(10000000000000L), "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);
@@ -7733,7 +7669,7 @@ public void UnitConverter_ConvertUnits_Gm_to_cm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gm";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(99999999900L), "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);
@@ -7748,7 +7684,7 @@ public void UnitConverter_ConvertUnits_Gm_to_millimetres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gm";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000L), "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);
@@ -7763,15 +7699,13 @@ public void UnitConverter_ConvertUnits_Gm_to_millimetres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gm";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000L), "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"
-
+ #endregion
+ #region "Source as Furlongs"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -7781,7 +7715,7 @@ public void UnitConverter_ConvertUnits_furlong_to_m_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "furlong";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(20116.8), "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);
@@ -7796,7 +7730,7 @@ public void UnitConverter_ConvertUnits_furlong_to_m_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "furlong";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(201.167999798832), "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);
@@ -7811,7 +7745,7 @@ public void UnitConverter_ConvertUnits_furlong_to_yd_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "furlong";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(22000), "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);
@@ -7826,7 +7760,7 @@ public void UnitConverter_ConvertUnits_furlong_to_yd_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "furlong";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(219.99999978), "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);
@@ -7841,7 +7775,7 @@ public void UnitConverter_ConvertUnits_furlong_to_ft_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "furlong";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(66000), "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);
@@ -7856,7 +7790,7 @@ public void UnitConverter_ConvertUnits_furlong_to_ft_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "furlong";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(659.99999934), "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);
@@ -7871,7 +7805,7 @@ public void UnitConverter_ConvertUnits_furlong_to_mile_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "furlong";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(12.5), "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);
@@ -7886,7 +7820,7 @@ public void UnitConverter_ConvertUnits_furlong_to_mile_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "furlong";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(0.124999999875), "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);
@@ -7901,7 +7835,7 @@ public void UnitConverter_ConvertUnits_furlong_to_km_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "furlong";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(20.1168), "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);
@@ -7916,7 +7850,7 @@ public void UnitConverter_ConvertUnits_furlong_to_km_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "furlong";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(0.201167999798832), "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);
@@ -7931,7 +7865,7 @@ public void UnitConverter_ConvertUnits_furlong_to_Megametres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "furlong";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(0.0201168), "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);
@@ -7946,7 +7880,7 @@ public void UnitConverter_ConvertUnits_furlong_to_Megametres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "furlong";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(0.000201167999799), "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);
@@ -7961,7 +7895,7 @@ public void UnitConverter_ConvertUnits_furlong_to_Gm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "furlong";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(2.01168E-05), "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);
@@ -7976,7 +7910,7 @@ public void UnitConverter_ConvertUnits_furlong_to_Gm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "furlong";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(2.01168E-07), "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);
@@ -7991,7 +7925,7 @@ public void UnitConverter_ConvertUnits_furlong_to_chain_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "furlong";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(1000), "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);
@@ -8006,7 +7940,7 @@ public void UnitConverter_ConvertUnits_furlong_to_chain_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "furlong";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999), "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);
@@ -8021,7 +7955,7 @@ public void UnitConverter_ConvertUnits_furlong_to_thou_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "furlong";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(792000000), "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);
@@ -8036,7 +7970,7 @@ public void UnitConverter_ConvertUnits_furlong_to_thou_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "furlong";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(7919999.99208), "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);
@@ -8051,7 +7985,7 @@ public void UnitConverter_ConvertUnits_furlong_to_µm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "furlong";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(20116800000L), "µ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);
@@ -8066,7 +8000,7 @@ public void UnitConverter_ConvertUnits_furlong_to_µm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "furlong";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(201167999.799), "µ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);
@@ -8081,7 +8015,7 @@ public void UnitConverter_ConvertUnits_furlong_to_in_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "furlong";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(792000), "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);
@@ -8096,7 +8030,7 @@ public void UnitConverter_ConvertUnits_furlong_to_in_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "furlong";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(7919.99999208), "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);
@@ -8111,7 +8045,7 @@ public void UnitConverter_ConvertUnits_furlong_to_cm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "furlong";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(2011680), "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);
@@ -8126,7 +8060,7 @@ public void UnitConverter_ConvertUnits_furlong_to_cm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "furlong";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(20116.7999798832), "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);
@@ -8141,7 +8075,7 @@ public void UnitConverter_ConvertUnits_furlong_to_millimetres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "furlong";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(20116800), "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);
@@ -8156,15 +8090,13 @@ public void UnitConverter_ConvertUnits_furlong_to_millimetres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "furlong";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(201167.999799), "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"
-
+ #endregion
+ #region "Source as Thou"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -8174,7 +8106,7 @@ public void UnitConverter_ConvertUnits_thou_to_m_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "thou";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(0.00254), "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);
@@ -8189,7 +8121,7 @@ public void UnitConverter_ConvertUnits_thou_to_m_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "thou";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(2.5399999975E-05), "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);
@@ -8204,7 +8136,7 @@ public void UnitConverter_ConvertUnits_thou_to_yd_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "thou";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(0.002777777777778), "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);
@@ -8219,7 +8151,7 @@ public void UnitConverter_ConvertUnits_thou_to_yd_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "thou";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(2.777777775E-05), "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);
@@ -8234,7 +8166,7 @@ public void UnitConverter_ConvertUnits_thou_to_ft_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "thou";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(0.008333333333333), "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);
@@ -8249,7 +8181,7 @@ public void UnitConverter_ConvertUnits_thou_to_ft_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "thou";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(8.333333325E-05), "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);
@@ -8264,7 +8196,7 @@ public void UnitConverter_ConvertUnits_thou_to_mile_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "thou";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(1.578282828E-06), "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);
@@ -8279,7 +8211,7 @@ public void UnitConverter_ConvertUnits_thou_to_mile_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "thou";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(1.5782828E-08), "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);
@@ -8294,7 +8226,7 @@ public void UnitConverter_ConvertUnits_thou_to_km_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "thou";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(2.54E-06), "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);
@@ -8309,7 +8241,7 @@ public void UnitConverter_ConvertUnits_thou_to_km_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "thou";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(2.54E-08), "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);
@@ -8324,7 +8256,7 @@ public void UnitConverter_ConvertUnits_thou_to_Megametres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "thou";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(2.54E-09), "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);
@@ -8339,7 +8271,7 @@ public void UnitConverter_ConvertUnits_thou_to_Megametres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "thou";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(2.54E-11), "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);
@@ -8354,7 +8286,7 @@ public void UnitConverter_ConvertUnits_thou_to_Gm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "thou";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(2.54E-12), "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);
@@ -8369,7 +8301,7 @@ public void UnitConverter_ConvertUnits_thou_to_Gm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "thou";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(2.5E-14), "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);
@@ -8384,7 +8316,7 @@ public void UnitConverter_ConvertUnits_thou_to_chain_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "thou";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(0.000126262626263), "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);
@@ -8399,7 +8331,7 @@ public void UnitConverter_ConvertUnits_thou_to_chain_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "thou";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(1.262626261E-06), "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);
@@ -8414,7 +8346,7 @@ public void UnitConverter_ConvertUnits_thou_to_in_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "thou";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -8429,7 +8361,7 @@ public void UnitConverter_ConvertUnits_thou_to_in_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "thou";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -8444,7 +8376,7 @@ public void UnitConverter_ConvertUnits_thou_to_µm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "thou";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(2540), "µ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);
@@ -8459,7 +8391,7 @@ public void UnitConverter_ConvertUnits_thou_to_µm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "thou";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(25.3999999746), "µ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);
@@ -8474,7 +8406,7 @@ public void UnitConverter_ConvertUnits_thou_to_furlong_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "thou";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(1.2626262626E-05), "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);
@@ -8489,7 +8421,7 @@ public void UnitConverter_ConvertUnits_thou_to_furlong_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "thou";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(1.26262626E-07), "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);
@@ -8504,7 +8436,7 @@ public void UnitConverter_ConvertUnits_thou_to_cm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "thou";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(0.254), "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);
@@ -8519,7 +8451,7 @@ public void UnitConverter_ConvertUnits_thou_to_cm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "thou";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(0.00253999999746), "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);
@@ -8534,7 +8466,7 @@ public void UnitConverter_ConvertUnits_thou_to_millimetres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "thou";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(2.54), "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);
@@ -8549,15 +8481,13 @@ public void UnitConverter_ConvertUnits_thou_to_millimetres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "thou";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(0.0253999999746), "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"
-
+ #endregion
+ #region "Source as Microns"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -8567,7 +8497,7 @@ public void UnitConverter_ConvertUnits_µm_to_m_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µm";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -8582,7 +8512,7 @@ public void UnitConverter_ConvertUnits_µm_to_m_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µm";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -8597,7 +8527,7 @@ public void UnitConverter_ConvertUnits_µm_to_yd_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µm";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(0.000109361329834), "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);
@@ -8612,7 +8542,7 @@ public void UnitConverter_ConvertUnits_µm_to_yd_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µm";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(1.093613297E-06), "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);
@@ -8627,7 +8557,7 @@ public void UnitConverter_ConvertUnits_µm_to_ft_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µm";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(0.000328083989501), "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);
@@ -8643,7 +8573,7 @@ public void UnitConverter_ConvertUnits_µm_to_ft_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µm";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(3.280839892E-06), "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);
@@ -8658,7 +8588,7 @@ public void UnitConverter_ConvertUnits_µm_to_chain_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µm";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(4.970969538E-06), "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);
@@ -8673,7 +8603,7 @@ public void UnitConverter_ConvertUnits_µm_to_chain_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µm";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(4.9709695E-08), "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);
@@ -8688,7 +8618,7 @@ public void UnitConverter_ConvertUnits_µm_to_mile_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µm";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(6.2137119E-08), "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);
@@ -8703,7 +8633,7 @@ public void UnitConverter_ConvertUnits_µm_to_mile_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µm";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(6.21371E-10), "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);
@@ -8718,7 +8648,7 @@ public void UnitConverter_ConvertUnits_µm_to_km_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µm";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -8733,7 +8663,7 @@ public void UnitConverter_ConvertUnits_µm_to_km_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µm";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -8748,7 +8678,7 @@ public void UnitConverter_ConvertUnits_µm_to_Megametres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µm";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(1E-10), "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);
@@ -8763,7 +8693,7 @@ public void UnitConverter_ConvertUnits_µm_to_Megametres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µm";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(1E-12), "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);
@@ -8778,7 +8708,7 @@ public void UnitConverter_ConvertUnits_µm_to_Gm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µm";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(1E-13), "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);
@@ -8793,7 +8723,7 @@ public void UnitConverter_ConvertUnits_µm_to_Gm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µm";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(1E-15), "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);
@@ -8808,7 +8738,7 @@ public void UnitConverter_ConvertUnits_µm_to_furlong_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µm";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(4.97096954E-07), "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);
@@ -8823,7 +8753,7 @@ public void UnitConverter_ConvertUnits_µm_to_furlong_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µm";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(4.97097E-09), "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);
@@ -8838,7 +8768,7 @@ public void UnitConverter_ConvertUnits_µm_to_thou_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µm";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(3.93700787401575), "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);
@@ -8853,7 +8783,7 @@ public void UnitConverter_ConvertUnits_µm_to_thou_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µm";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(0.039370078700787), "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);
@@ -8868,7 +8798,7 @@ public void UnitConverter_ConvertUnits_µm_to_in_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µm";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(0.003937007874016), "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);
@@ -8883,7 +8813,7 @@ public void UnitConverter_ConvertUnits_µm_to_in_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µm";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(3.9370078701E-05), "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);
@@ -8898,7 +8828,7 @@ public void UnitConverter_ConvertUnits_µm_to_cm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µm";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(0.01), "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);
@@ -8913,7 +8843,7 @@ public void UnitConverter_ConvertUnits_µm_to_cm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µm";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-05), "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);
@@ -8928,7 +8858,7 @@ public void UnitConverter_ConvertUnits_µm_to_millimetres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µm";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -8943,15 +8873,13 @@ public void UnitConverter_ConvertUnits_µm_to_millimetres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µm";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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"
-
+ #endregion
+ #region "Source as Inches"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -8961,7 +8889,7 @@ public void UnitConverter_ConvertUnits_in_to_m_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(2.54), "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);
@@ -8976,7 +8904,7 @@ public void UnitConverter_ConvertUnits_in_to_m_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(0.0253999999746), "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);
@@ -8991,7 +8919,7 @@ public void UnitConverter_ConvertUnits_in_to_yd_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(2.77777777777778), "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);
@@ -9006,7 +8934,7 @@ public void UnitConverter_ConvertUnits_in_to_yd_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(0.02777777775), "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);
@@ -9021,7 +8949,7 @@ public void UnitConverter_ConvertUnits_in_to_ft_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(8.33333333333333), "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);
@@ -9036,7 +8964,7 @@ public void UnitConverter_ConvertUnits_in_to_ft_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(0.08333333325), "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);
@@ -9051,7 +8979,7 @@ public void UnitConverter_ConvertUnits_in_to_mile_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(0.001578282828283), "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);
@@ -9066,7 +8994,7 @@ public void UnitConverter_ConvertUnits_in_to_mile_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(1.5782828267E-05), "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);
@@ -9081,7 +9009,7 @@ public void UnitConverter_ConvertUnits_in_to_km_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(0.00254), "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);
@@ -9096,7 +9024,7 @@ public void UnitConverter_ConvertUnits_in_to_km_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(2.5399999975E-05), "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);
@@ -9111,7 +9039,7 @@ public void UnitConverter_ConvertUnits_in_to_Megametres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(2.54E-06), "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);
@@ -9126,7 +9054,7 @@ public void UnitConverter_ConvertUnits_in_to_Megametres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(2.54E-08), "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);
@@ -9141,7 +9069,7 @@ public void UnitConverter_ConvertUnits_in_to_Gm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(2.54E-09), "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);
@@ -9156,7 +9084,7 @@ public void UnitConverter_ConvertUnits_in_to_Gm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(2.54E-11), "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);
@@ -9171,7 +9099,7 @@ public void UnitConverter_ConvertUnits_in_to_chain_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(0.126262626262626), "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);
@@ -9186,7 +9114,7 @@ public void UnitConverter_ConvertUnits_in_to_chain_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(0.001262626261364), "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);
@@ -9201,7 +9129,7 @@ public void UnitConverter_ConvertUnits_in_to_thou_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -9216,7 +9144,7 @@ public void UnitConverter_ConvertUnits_in_to_thou_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -9231,7 +9159,7 @@ public void UnitConverter_ConvertUnits_in_to_µm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(2540000), "µ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);
@@ -9246,7 +9174,7 @@ public void UnitConverter_ConvertUnits_in_to_µm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(25399.9999746), "µ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);
@@ -9261,7 +9189,7 @@ public void UnitConverter_ConvertUnits_in_to_furlong_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(0.012626262626263), "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);
@@ -9276,7 +9204,7 @@ public void UnitConverter_ConvertUnits_in_to_furlong_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(0.000126262626136), "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);
@@ -9291,7 +9219,7 @@ public void UnitConverter_ConvertUnits_in_to_cm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(254), "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);
@@ -9306,7 +9234,7 @@ public void UnitConverter_ConvertUnits_in_to_cm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(2.53999999746), "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);
@@ -9321,7 +9249,7 @@ public void UnitConverter_ConvertUnits_in_to_millimetres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(2540), "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);
@@ -9336,15 +9264,13 @@ public void UnitConverter_ConvertUnits_in_to_millimetres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(25.3999999746), "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"
-
+ #endregion
+ #region "Source as Centimetres"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -9354,7 +9280,7 @@ public void UnitConverter_ConvertUnits_cm_to_m_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(1), "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);
@@ -9369,7 +9295,7 @@ public void UnitConverter_ConvertUnits_cm_to_m_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(0.00999999999), "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);
@@ -9384,7 +9310,7 @@ public void UnitConverter_ConvertUnits_cm_to_yd_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(1.09361329833771), "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);
@@ -9399,7 +9325,7 @@ public void UnitConverter_ConvertUnits_cm_to_yd_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(0.010936132972441), "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);
@@ -9414,7 +9340,7 @@ public void UnitConverter_ConvertUnits_cm_to_ft_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(3.280839895013123), "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);
@@ -9430,7 +9356,7 @@ public void UnitConverter_ConvertUnits_cm_to_ft_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(0.032808398917323), "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);
@@ -9445,7 +9371,7 @@ public void UnitConverter_ConvertUnits_cm_to_chain_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(0.049709695378987), "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);
@@ -9460,7 +9386,7 @@ public void UnitConverter_ConvertUnits_cm_to_chain_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(0.000497096953293), "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);
@@ -9475,7 +9401,7 @@ public void UnitConverter_ConvertUnits_cm_to_mile_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(0.000621371192237), "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);
@@ -9490,7 +9416,7 @@ public void UnitConverter_ConvertUnits_cm_to_mile_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(6.213711916E-06), "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);
@@ -9505,7 +9431,7 @@ public void UnitConverter_ConvertUnits_cm_to_km_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(0.001), "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);
@@ -9520,7 +9446,7 @@ public void UnitConverter_ConvertUnits_cm_to_km_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-06), "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);
@@ -9535,7 +9461,7 @@ public void UnitConverter_ConvertUnits_cm_to_Megametres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(1E-06), "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);
@@ -9550,7 +9476,7 @@ public void UnitConverter_ConvertUnits_cm_to_Megametres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(1E-08), "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);
@@ -9565,7 +9491,7 @@ public void UnitConverter_ConvertUnits_cm_to_Gm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -9580,7 +9506,7 @@ public void UnitConverter_ConvertUnits_cm_to_Gm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(1E-11), "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);
@@ -9595,7 +9521,7 @@ public void UnitConverter_ConvertUnits_cm_to_furlong_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(0.004970969537899), "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);
@@ -9610,7 +9536,7 @@ public void UnitConverter_ConvertUnits_cm_to_furlong_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(4.9709695329E-05), "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);
@@ -9625,7 +9551,7 @@ public void UnitConverter_ConvertUnits_cm_to_thou_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(39370.0787401575), "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);
@@ -9640,7 +9566,7 @@ public void UnitConverter_ConvertUnits_cm_to_thou_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(393.700787007874), "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);
@@ -9655,7 +9581,7 @@ public void UnitConverter_ConvertUnits_cm_to_µm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(1000000), "µ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);
@@ -9670,7 +9596,7 @@ public void UnitConverter_ConvertUnits_cm_to_µm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(9999.99999), "µ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);
@@ -9685,7 +9611,7 @@ public void UnitConverter_ConvertUnits_cm_to_in_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(39.3700787401575), "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);
@@ -9700,7 +9626,7 @@ public void UnitConverter_ConvertUnits_cm_to_in_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(0.393700787007874), "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);
@@ -9715,7 +9641,7 @@ public void UnitConverter_ConvertUnits_cm_to_millimetres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(1000), "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);
@@ -9730,15 +9656,13 @@ public void UnitConverter_ConvertUnits_cm_to_millimetres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm";
string targetUnitName = "mm";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999), "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"
-
+ #endregion
+ #region "Source as Millimetres"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -9748,7 +9672,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_m_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mm";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -9763,7 +9687,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_m_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mm";
string targetUnitName = "m";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -9778,7 +9702,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_yd_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mm";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(0.109361329833771), "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);
@@ -9793,7 +9717,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_yd_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mm";
string targetUnitName = "yd";
- Measurement expected = new Measurement (Convert.ToDouble(0.001093613297244), "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);
@@ -9808,7 +9732,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_ft_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mm";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(0.328083989501312), "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);
@@ -9824,7 +9748,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_ft_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mm";
string targetUnitName = "ft";
- Measurement expected = new Measurement (Convert.ToDouble(0.003280839891732), "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);
@@ -9839,7 +9763,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_chain_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mm";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(0.004970969537899), "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);
@@ -9854,7 +9778,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_chain_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mm";
string targetUnitName = "chain";
- Measurement expected = new Measurement (Convert.ToDouble(4.9709695329E-05), "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);
@@ -9869,7 +9793,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_mile_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mm";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(6.2137119224E-05), "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);
@@ -9884,7 +9808,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_mile_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mm";
string targetUnitName = "mi";
- Measurement expected = new Measurement (Convert.ToDouble(6.21371192E-07), "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);
@@ -9899,7 +9823,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_km_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mm";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -9914,7 +9838,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_km_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mm";
string targetUnitName = "km";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -9929,7 +9853,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_Megametres_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mm";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -9944,7 +9868,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_Megametres_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mm";
string targetUnitName = "Mm";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -9959,7 +9883,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_Gm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mm";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(1E-10), "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);
@@ -9974,7 +9898,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_Gm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mm";
string targetUnitName = "Gm";
- Measurement expected = new Measurement (Convert.ToDouble(1E-12), "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);
@@ -9989,7 +9913,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_furlong_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mm";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(0.00049709695379), "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);
@@ -10004,7 +9928,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_furlong_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mm";
string targetUnitName = "furlong";
- Measurement expected = new Measurement (Convert.ToDouble(4.970969533E-06), "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);
@@ -10019,7 +9943,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_thou_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mm";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(3937.00787401575), "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);
@@ -10034,7 +9958,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_thou_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mm";
string targetUnitName = "thou";
- Measurement expected = new Measurement (Convert.ToDouble(39.3700787007874), "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);
@@ -10049,7 +9973,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_µm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mm";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "µ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);
@@ -10064,7 +9988,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_µm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mm";
string targetUnitName = "µm";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "µ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);
@@ -10079,7 +10003,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_in_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mm";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(3.93700787401575), "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);
@@ -10094,7 +10018,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_in_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mm";
string targetUnitName = "in";
- Measurement expected = new Measurement (Convert.ToDouble(0.039370078700787), "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);
@@ -10109,7 +10033,7 @@ public void UnitConverter_ConvertUnits_millimetres_to_cm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mm";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(10), "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);
@@ -10124,13 +10048,13 @@ public void UnitConverter_ConvertUnits_millimetres_to_cm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mm";
string targetUnitName = "cm";
- Measurement expected = new Measurement (Convert.ToDouble(0.0999999999), "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
+ #endregion
+ #endregion
+ #endregion
}
}
\ No newline at end of file
diff --git a/Cubico.Tests/UnitConverterTest3.cs b/Cubico.Tests/UnitConverterTest3.cs
index 0de3974..03ec97d 100644
--- a/Cubico.Tests/UnitConverterTest3.cs
+++ b/Cubico.Tests/UnitConverterTest3.cs
@@ -5,21 +5,18 @@
namespace Cubico.Tests
{
[TestFixture]
- public class UnitConverterTest3
+ public class UnitConverterTest3
{
TestContext testContextInstance;
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 "UnitConverter.ConvertUnits"
- #region "Power Tests"
- #region "Source as Watts"
-
+ #region "UnitConverter.ConvertUnits"
+ #region "Power Tests"
+ #region "Source as Watts"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -29,7 +26,7 @@ public void UnitConverter_ConvertUnits_Watts_to_Horsepower_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "W";
string targetUnitName = "hp";
- Measurement expected = new Measurement (Convert.ToDouble(0.134102208959503), "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);
@@ -44,7 +41,7 @@ public void UnitConverter_ConvertUnits_Watts_to_Horsepower_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "W";
string targetUnitName = "hp";
- Measurement expected = new Measurement (Convert.ToDouble(0.001341022088254), "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);
@@ -59,7 +56,7 @@ public void UnitConverter_ConvertUnits_Watts_to_Megawatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "W";
string targetUnitName = "MW";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -74,7 +71,7 @@ public void UnitConverter_ConvertUnits_Watts_to_Megawatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "W";
string targetUnitName = "MW";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -89,7 +86,7 @@ public void UnitConverter_ConvertUnits_Watts_to_Kilowatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "W";
string targetUnitName = "kW";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -104,7 +101,7 @@ public void UnitConverter_ConvertUnits_Watts_to_Kilowatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "W";
string targetUnitName = "kW";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -119,7 +116,7 @@ public void UnitConverter_ConvertUnits_Watts_to_Microwatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "W";
string targetUnitName = "µW";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "µ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);
@@ -134,7 +131,7 @@ public void UnitConverter_ConvertUnits_Watts_to_Microwatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "W";
string targetUnitName = "µW";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "µ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);
@@ -149,7 +146,7 @@ public void UnitConverter_ConvertUnits_Watts_to_Nanowatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "W";
string targetUnitName = "nW";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "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);
@@ -164,7 +161,7 @@ public void UnitConverter_ConvertUnits_Watts_to_Nanowatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "W";
string targetUnitName = "nW";
- Measurement expected = new Measurement (Convert.ToDouble(999999999), "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);
@@ -179,7 +176,7 @@ public void UnitConverter_ConvertUnits_Watts_to_MilliWatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "W";
string targetUnitName = "mW";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -194,7 +191,7 @@ public void UnitConverter_ConvertUnits_Watts_to_MilliWatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "W";
string targetUnitName = "mW";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -209,7 +206,7 @@ public void UnitConverter_ConvertUnits_Watts_to_BTUperMin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "W";
string targetUnitName = "BTU/min";
- Measurement expected = new Measurement (Convert.ToDouble(5.68690192748063), "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);
@@ -224,7 +221,7 @@ public void UnitConverter_ConvertUnits_Watts_to_BTUperMin_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "W";
string targetUnitName = "BTU/min";
- Measurement expected = new Measurement (Convert.ToDouble(0.056869019217937), "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);
@@ -239,7 +236,7 @@ public void UnitConverter_ConvertUnits_Watts_to_FtLbPerMin_Test ()
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 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);
@@ -254,15 +251,13 @@ public void UnitConverter_ConvertUnits_Watts_to_FtLbPerMin_Test2 ()
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 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"
-
+ #endregion
+ #region "Source as Horsepower"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -272,7 +267,7 @@ public void UnitConverter_ConvertUnits_Horsepower_to_Watts_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "hp";
string targetUnitName = "W";
- Measurement expected = new Measurement (Convert.ToDouble(74569.987158227), "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);
@@ -287,7 +282,7 @@ public void UnitConverter_ConvertUnits_Horsepower_to_Watts_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "hp";
string targetUnitName = "W";
- Measurement expected = new Measurement (Convert.ToDouble(745.69987083657), "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);
@@ -302,7 +297,7 @@ public void UnitConverter_ConvertUnits_Horsepower_to_Megawatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "hp";
string targetUnitName = "MW";
- Measurement expected = new Measurement (Convert.ToDouble(0.074569987158227), "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);
@@ -317,7 +312,7 @@ public void UnitConverter_ConvertUnits_Horsepower_to_Megawatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "hp";
string targetUnitName = "MW";
- Measurement expected = new Measurement (Convert.ToDouble(0.000745699870837), "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);
@@ -332,7 +327,7 @@ public void UnitConverter_ConvertUnits_Horsepower_to_Kilowatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "hp";
string targetUnitName = "kW";
- Measurement expected = new Measurement (Convert.ToDouble(74.569987158227), "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);
@@ -347,7 +342,7 @@ public void UnitConverter_ConvertUnits_Horsepower_to_Kilowatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "hp";
string targetUnitName = "kW";
- Measurement expected = new Measurement (Convert.ToDouble(0.74569987083657), "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);
@@ -362,7 +357,7 @@ public void UnitConverter_ConvertUnits_Horsepower_to_Microwatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "hp";
string targetUnitName = "µW";
- Measurement expected = new Measurement (Convert.ToDouble(74569987158.227), "µ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);
@@ -377,7 +372,7 @@ public void UnitConverter_ConvertUnits_Horsepower_to_Microwatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "hp";
string targetUnitName = "µW";
- Measurement expected = new Measurement (Convert.ToDouble(745699870.83657), "µ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);
@@ -392,7 +387,7 @@ public void UnitConverter_ConvertUnits_Horsepower_to_Nanowatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "hp";
string targetUnitName = "nW";
- Measurement expected = new Measurement (Convert.ToDouble(74569987158227.0), "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);
@@ -407,7 +402,7 @@ public void UnitConverter_ConvertUnits_Horsepower_to_Nanowatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "hp";
string targetUnitName = "nW";
- Measurement expected = new Measurement (Convert.ToDouble(745699870836.57), "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);
@@ -422,7 +417,7 @@ public void UnitConverter_ConvertUnits_Horsepower_to_MilliWatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "hp";
string targetUnitName = "mW";
- Measurement expected = new Measurement (Convert.ToDouble(74569987.158227), "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);
@@ -437,7 +432,7 @@ public void UnitConverter_ConvertUnits_Horsepower_to_MilliWatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "hp";
string targetUnitName = "mW";
- Measurement expected = new Measurement (Convert.ToDouble(745699.870836571), "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);
@@ -452,7 +447,7 @@ public void UnitConverter_ConvertUnits_Horsepower_to_BTUperMin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "hp";
string targetUnitName = "BTU/min";
- Measurement expected = new Measurement (Convert.ToDouble(4240.72203702327), "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);
@@ -467,7 +462,7 @@ public void UnitConverter_ConvertUnits_Horsepower_to_BTUperMin_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "hp";
string targetUnitName = "BTU/min";
- Measurement expected = new Measurement (Convert.ToDouble(42.4072203278255), "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);
@@ -482,7 +477,7 @@ public void UnitConverter_ConvertUnits_Horsepower_to_FtLbPerMin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "hp";
string targetUnitName = "ft lb/min";
- Measurement expected = new Measurement (Convert.ToDouble(3300000), "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);
@@ -497,15 +492,13 @@ public void UnitConverter_ConvertUnits_Horsepower_to_FtLbPerMin_Test2 ()
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 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"
-
+ #endregion
+ #region "Source as Megawatts"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -515,7 +508,7 @@ public void UnitConverter_ConvertUnits_Megawatts_to_Watts_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "MW";
string targetUnitName = "W";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -530,7 +523,7 @@ public void UnitConverter_ConvertUnits_Megawatts_to_Watts_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "MW";
string targetUnitName = "W";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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);
@@ -545,7 +538,7 @@ public void UnitConverter_ConvertUnits_Megawatts_to_Horsepower_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "MW";
string targetUnitName = "hp";
- Measurement expected = new Measurement (Convert.ToDouble(134102.208959503), "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);
@@ -560,7 +553,7 @@ public void UnitConverter_ConvertUnits_Megawatts_to_Horsepower_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "MW";
string targetUnitName = "hp";
- Measurement expected = new Measurement (Convert.ToDouble(1341.02208825401), "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);
@@ -575,7 +568,7 @@ public void UnitConverter_ConvertUnits_Megawatts_to_Kilowatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "MW";
string targetUnitName = "kW";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -590,7 +583,7 @@ public void UnitConverter_ConvertUnits_Megawatts_to_Kilowatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "MW";
string targetUnitName = "kW";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -605,7 +598,7 @@ public void UnitConverter_ConvertUnits_Megawatts_to_Microwatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "MW";
string targetUnitName = "µW";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000L), "µ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);
@@ -620,7 +613,7 @@ public void UnitConverter_ConvertUnits_Megawatts_to_Microwatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "MW";
string targetUnitName = "µW";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000L), "µ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);
@@ -635,7 +628,7 @@ public void UnitConverter_ConvertUnits_Megawatts_to_Nanowatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "MW";
string targetUnitName = "nW";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000000L), "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);
@@ -650,7 +643,7 @@ public void UnitConverter_ConvertUnits_Megawatts_to_Nanowatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "MW";
string targetUnitName = "nW";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000000L), "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);
@@ -665,7 +658,7 @@ public void UnitConverter_ConvertUnits_Megawatts_to_MilliWatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "MW";
string targetUnitName = "mW";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "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);
@@ -680,7 +673,7 @@ public void UnitConverter_ConvertUnits_Megawatts_to_MilliWatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "MW";
string targetUnitName = "mW";
- Measurement expected = new Measurement (Convert.ToDouble(999999999), "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);
@@ -695,7 +688,7 @@ public void UnitConverter_ConvertUnits_Megawatts_to_BTUperMin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "MW";
string targetUnitName = "BTU/min";
- Measurement expected = new Measurement (Convert.ToDouble(5686901.92748063), "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);
@@ -710,7 +703,7 @@ public void UnitConverter_ConvertUnits_Megawatts_to_BTUperMin_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "MW";
string targetUnitName = "BTU/min";
- Measurement expected = new Measurement (Convert.ToDouble(56869.0192179373), "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);
@@ -725,7 +718,7 @@ public void UnitConverter_ConvertUnits_Megawatts_to_FtLbPerMin_Test ()
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 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);
@@ -740,15 +733,13 @@ public void UnitConverter_ConvertUnits_Megawatts_to_FtLbPerMin_Test2 ()
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 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"
-
+ #endregion
+ #region "Source as Kilowatts"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -758,7 +749,7 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_Watts_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kW";
string targetUnitName = "W";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -773,7 +764,7 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_Watts_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kW";
string targetUnitName = "W";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -788,7 +779,7 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_Horsepower_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kW";
string targetUnitName = "hp";
- Measurement expected = new Measurement (Convert.ToDouble(134.102208959503), "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);
@@ -803,7 +794,7 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_Horsepower_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kW";
string targetUnitName = "hp";
- Measurement expected = new Measurement (Convert.ToDouble(1.34102208825401), "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);
@@ -818,7 +809,7 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_Megawatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kW";
string targetUnitName = "MW";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -833,7 +824,7 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_Megawatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kW";
string targetUnitName = "MW";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -848,7 +839,7 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_Microwatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kW";
string targetUnitName = "µW";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "µ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);
@@ -863,7 +854,7 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_Microwatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kW";
string targetUnitName = "µW";
- Measurement expected = new Measurement (Convert.ToDouble(999999999), "µ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);
@@ -878,7 +869,7 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_Nanowatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kW";
string targetUnitName = "nW";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000L), "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);
@@ -893,7 +884,7 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_Nanowatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kW";
string targetUnitName = "nW";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000L), "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);
@@ -908,7 +899,7 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_MilliWatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kW";
string targetUnitName = "mW";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -923,7 +914,7 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_MilliWatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kW";
string targetUnitName = "mW";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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);
@@ -938,7 +929,7 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_BTUperMin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kW";
string targetUnitName = "BTU/min";
- Measurement expected = new Measurement (Convert.ToDouble(5686.90192748063), "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);
@@ -953,7 +944,7 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_BTUperMin_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kW";
string targetUnitName = "BTU/min";
- Measurement expected = new Measurement (Convert.ToDouble(56.8690192179373), "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);
@@ -968,7 +959,7 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_FtLbPerMin_Test ()
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 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);
@@ -983,15 +974,13 @@ public void UnitConverter_ConvertUnits_Kilowatts_to_FtLbPerMin_Test2 ()
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 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"
-
+ #endregion
+ #region "Source as Microwatts"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -1001,7 +990,7 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Watts_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µW";
string targetUnitName = "W";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -1016,7 +1005,7 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Watts_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µW";
string targetUnitName = "W";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -1031,7 +1020,7 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Horsepower_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µW";
string targetUnitName = "hp";
- Measurement expected = new Measurement (Convert.ToDouble(1.34102209E-07), "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);
@@ -1046,7 +1035,7 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Horsepower_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µW";
string targetUnitName = "hp";
- Measurement expected = new Measurement (Convert.ToDouble(1.341022E-09), "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);
@@ -1061,7 +1050,7 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Megawatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µW";
string targetUnitName = "MW";
- Measurement expected = new Measurement (Convert.ToDouble(1E-10), "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);
@@ -1076,7 +1065,7 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Megawatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µW";
string targetUnitName = "MW";
- Measurement expected = new Measurement (Convert.ToDouble(1E-12), "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);
@@ -1092,7 +1081,7 @@ public void UnitConverter_ConvertUnits_Microwatts_to_kikowatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µW";
string targetUnitName = "kW";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -1107,7 +1096,7 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Kilowatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µW";
string targetUnitName = "kW";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -1123,7 +1112,7 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Nanowatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µW";
string targetUnitName = "nW";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -1138,7 +1127,7 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Nanowatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µW";
string targetUnitName = "nW";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -1153,7 +1142,7 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Milliwatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µW";
string targetUnitName = "mW";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -1168,7 +1157,7 @@ public void UnitConverter_ConvertUnits_Microwatts_to_Milliwatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µW";
string targetUnitName = "mW";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -1183,7 +1172,7 @@ public void UnitConverter_ConvertUnits_Microwatts_to_BTUperMin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µW";
string targetUnitName = "BTU/min";
- Measurement expected = new Measurement (Convert.ToDouble(5.686901927E-06), "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);
@@ -1198,7 +1187,7 @@ public void UnitConverter_ConvertUnits_Microwatts_to_BTUperMin_Test2 ()
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 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);
@@ -1213,7 +1202,7 @@ public void UnitConverter_ConvertUnits_Microwatts_to_FtLbPerMin_Test ()
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 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);
@@ -1228,15 +1217,13 @@ public void UnitConverter_ConvertUnits_Microwatts_to_FtLbPerMin_Test2 ()
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 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"
-
+ #endregion
+ #region "Source as Nanowatts"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -1246,7 +1233,7 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Watts_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nW";
string targetUnitName = "W";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -1261,7 +1248,7 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Watts_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nW";
string targetUnitName = "W";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -1277,7 +1264,7 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Horsepower_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nW";
string targetUnitName = "hp";
- Measurement expected = new Measurement (Convert.ToDouble(1.34102E-10), "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);
@@ -1292,7 +1279,7 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Horsepower_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nW";
string targetUnitName = "hp";
- Measurement expected = new Measurement (Convert.ToDouble(1.341E-12), "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);
@@ -1307,7 +1294,7 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Megawatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nW";
string targetUnitName = "MW";
- Measurement expected = new Measurement (Convert.ToDouble(1E-13), "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);
@@ -1322,7 +1309,7 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Megawatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nW";
string targetUnitName = "MW";
- Measurement expected = new Measurement (Convert.ToDouble(1E-15), "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);
@@ -1338,7 +1325,7 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Kilowatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nW";
string targetUnitName = "kW";
- Measurement expected = new Measurement (Convert.ToDouble(1E-10), "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);
@@ -1353,7 +1340,7 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Kilowatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nW";
string targetUnitName = "kW";
- Measurement expected = new Measurement (Convert.ToDouble(1E-12), "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);
@@ -1369,7 +1356,7 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Microwatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nW";
string targetUnitName = "µW";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "µ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);
@@ -1384,7 +1371,7 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Microwatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nW";
string targetUnitName = "µW";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "µ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);
@@ -1399,7 +1386,7 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Milliwatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nW";
string targetUnitName = "mW";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -1414,7 +1401,7 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_Milliwatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nW";
string targetUnitName = "mW";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -1429,7 +1416,7 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_BTUperMin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nW";
string targetUnitName = "BTU/min";
- Measurement expected = new Measurement (Convert.ToDouble(5.686902E-09), "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);
@@ -1444,7 +1431,7 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_BTUperMin_Test2 ()
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 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);
@@ -1459,7 +1446,7 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_FtLbPerMin_Test ()
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 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);
@@ -1474,15 +1461,13 @@ public void UnitConverter_ConvertUnits_Nanowatts_to_FtLbPerMin_Test2 ()
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 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"
-
+ #endregion
+ #region "Source as Milliwatts"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -1492,7 +1477,7 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Watts_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mW";
string targetUnitName = "W";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -1507,7 +1492,7 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Watts_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mW";
string targetUnitName = "W";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -1522,7 +1507,7 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Horsepower_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mW";
string targetUnitName = "hp";
- Measurement expected = new Measurement (Convert.ToDouble(0.00013410220896), "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);
@@ -1537,7 +1522,7 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Horsepower_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mW";
string targetUnitName = "hp";
- Measurement expected = new Measurement (Convert.ToDouble(1.341022088E-06), "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);
@@ -1552,7 +1537,7 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Megawatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mW";
string targetUnitName = "MW";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -1567,7 +1552,7 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Megawatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mW";
string targetUnitName = "MW";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -1583,7 +1568,7 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Kilowatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mW";
string targetUnitName = "kW";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -1598,7 +1583,7 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Kilowatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mW";
string targetUnitName = "kW";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -1613,7 +1598,7 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Microwatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mW";
string targetUnitName = "µW";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "µ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);
@@ -1628,7 +1613,7 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Microwatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mW";
string targetUnitName = "µW";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "µ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);
@@ -1643,7 +1628,7 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Nanowatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mW";
string targetUnitName = "nW";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -1658,7 +1643,7 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_Nanowatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mW";
string targetUnitName = "nW";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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);
@@ -1673,7 +1658,7 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_BTUperMin_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mW";
string targetUnitName = "BTU/min";
- Measurement expected = new Measurement (Convert.ToDouble(0.005686901927481), "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);
@@ -1688,7 +1673,7 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_BTUperMin_Test2 ()
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 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);
@@ -1703,7 +1688,7 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_FtLbPerMin_Test ()
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 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);
@@ -1718,15 +1703,13 @@ public void UnitConverter_ConvertUnits_Milliwatts_to_FtLbPerMin_Test2 ()
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 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"
-
+ #endregion
+ #region "Source as BTU/min"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -1736,7 +1719,7 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Watts_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "BTU/min";
string targetUnitName = "W";
- Measurement expected = new Measurement (Convert.ToDouble(1758.42666666667), "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);
@@ -1751,7 +1734,7 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Watts_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "BTU/min";
string targetUnitName = "W";
- Measurement expected = new Measurement (Convert.ToDouble(17.5842666490824), "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);
@@ -1766,7 +1749,7 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Horsepower_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "BTU/min";
string targetUnitName = "hp";
- Measurement expected = new Measurement (Convert.ToDouble(2.35808900293295), "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);
@@ -1781,7 +1764,7 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Horsepower_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "BTU/min";
string targetUnitName = "hp";
- Measurement expected = new Measurement (Convert.ToDouble(0.023580890005749), "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);
@@ -1796,7 +1779,7 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Megawatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "BTU/min";
string targetUnitName = "MW";
- Measurement expected = new Measurement (Convert.ToDouble(0.001758426666667), "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);
@@ -1811,7 +1794,7 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Megawatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "BTU/min";
string targetUnitName = "MW";
- Measurement expected = new Measurement (Convert.ToDouble(1.7584266649E-05), "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);
@@ -1826,7 +1809,7 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Kilowatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "BTU/min";
string targetUnitName = "kW";
- Measurement expected = new Measurement (Convert.ToDouble(1.75842666666667), "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);
@@ -1841,7 +1824,7 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Kilowatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "BTU/min";
string targetUnitName = "kW";
- Measurement expected = new Measurement (Convert.ToDouble(0.017584266649082), "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);
@@ -1856,7 +1839,7 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Microwatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "BTU/min";
string targetUnitName = "µW";
- Measurement expected = new Measurement (Convert.ToDouble(1758426666.66667), "µ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);
@@ -1871,7 +1854,7 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Microwatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "BTU/min";
string targetUnitName = "µW";
- Measurement expected = new Measurement (Convert.ToDouble(17584266.6490824), "µ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);
@@ -1886,7 +1869,7 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Nanowatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "BTU/min";
string targetUnitName = "nW";
- Measurement expected = new Measurement (Convert.ToDouble(1758426666666.67), "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);
@@ -1901,7 +1884,7 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Nanowatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "BTU/min";
string targetUnitName = "nW";
- Measurement expected = new Measurement (Convert.ToDouble(17584266649.0824), "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);
@@ -1916,7 +1899,7 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Milliwatts_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "BTU/min";
string targetUnitName = "mW";
- Measurement expected = new Measurement (Convert.ToDouble(1758426.66666667), "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);
@@ -1931,7 +1914,7 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_Milliwatts_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "BTU/min";
string targetUnitName = "mW";
- Measurement expected = new Measurement (Convert.ToDouble(17584.2666490824), "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);
@@ -1946,7 +1929,7 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_FtLbPerMin_Test ()
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 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);
@@ -1961,15 +1944,13 @@ public void UnitConverter_ConvertUnits_BTUperMin_to_FtLbPerMin_Test2 ()
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 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"
-
+ #endregion
+ #region "Source as ft lb/min"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -1979,7 +1960,7 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Watts_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft lb/min";
string targetUnitName = "W";
- Measurement expected = new Measurement (Convert.ToDouble(2.25969658055233), "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);
@@ -1994,7 +1975,7 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Watts_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft lb/min";
string targetUnitName = "W";
- Measurement expected = new Measurement (Convert.ToDouble(0.022596965782926), "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);
@@ -2009,7 +1990,7 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Horsepower_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft lb/min";
string targetUnitName = "hp";
- Measurement expected = new Measurement (Convert.ToDouble(0.003030303030303), "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);
@@ -2024,7 +2005,7 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Horsepower_Test2 ()
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 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);
@@ -2039,7 +2020,7 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Megawatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft lb/min";
string targetUnitName = "MW";
- Measurement expected = new Measurement (Convert.ToDouble(2.259696581E-06), "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);
@@ -2054,7 +2035,7 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Megawatt_Test2 ()
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 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);
@@ -2069,7 +2050,7 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Kilowatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft lb/min";
string targetUnitName = "kW";
- Measurement expected = new Measurement (Convert.ToDouble(0.002259696580552), "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);
@@ -2084,7 +2065,7 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Kilowatt_Test2 ()
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 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);
@@ -2099,7 +2080,7 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Microwatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft lb/min";
string targetUnitName = "µW";
- Measurement expected = new Measurement (Convert.ToDouble(2259696.58055233), "µ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);
@@ -2114,7 +2095,7 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Microwatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft lb/min";
string targetUnitName = "µW";
- Measurement expected = new Measurement (Convert.ToDouble(22596.9657829264), "µ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);
@@ -2129,7 +2110,7 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Nanowatt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft lb/min";
string targetUnitName = "nW";
- Measurement expected = new Measurement (Convert.ToDouble(2259696580.55233), "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);
@@ -2144,7 +2125,7 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Nanowatt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft lb/min";
string targetUnitName = "nW";
- Measurement expected = new Measurement (Convert.ToDouble(22596965.7829264), "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);
@@ -2159,7 +2140,7 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Milliwatts_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft lb/min";
string targetUnitName = "mW";
- Measurement expected = new Measurement (Convert.ToDouble(2259.69658055233), "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);
@@ -2174,7 +2155,7 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_Milliwatts_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft lb/min";
string targetUnitName = "mW";
- Measurement expected = new Measurement (Convert.ToDouble(22.5969657829264), "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);
@@ -2189,7 +2170,7 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_BTUperMin_Test ()
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 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);
@@ -2204,16 +2185,15 @@ public void UnitConverter_ConvertUnits_FtLbPerMin_to_BTUperMin_Test2 ()
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 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"
+ #endregion
+ #endregion
+ #region "Energy Tests"
+ #region "Source as Joule"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -2223,7 +2203,7 @@ public void UnitConverter_ConvertUnits_J_to_erg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "J";
string targetUnitName = "erg";
- Measurement expected = new Measurement (Convert.ToDouble(1000000000), "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);
@@ -2238,7 +2218,7 @@ public void UnitConverter_ConvertUnits_J_to_erg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "J";
string targetUnitName = "erg";
- Measurement expected = new Measurement (Convert.ToDouble(9999999.99), "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);
@@ -2253,7 +2233,7 @@ public void UnitConverter_ConvertUnits_J_to_cal_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "J";
string targetUnitName = "cal";
- Measurement expected = new Measurement (Convert.ToDouble(23.8845896627496), "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);
@@ -2268,7 +2248,7 @@ public void UnitConverter_ConvertUnits_J_to_cal_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "J";
string targetUnitName = "cal";
- Measurement expected = new Measurement (Convert.ToDouble(0.23884589638865), "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);
@@ -2283,7 +2263,7 @@ public void UnitConverter_ConvertUnits_J_to_Btu_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "J";
string targetUnitName = "Btu";
- Measurement expected = new Measurement (Convert.ToDouble(0.094781712031332), "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);
@@ -2298,7 +2278,7 @@ public void UnitConverter_ConvertUnits_J_to_Btu_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "J";
string targetUnitName = "Btu";
- Measurement expected = new Measurement (Convert.ToDouble(0.000947817119366), "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);
@@ -2313,7 +2293,7 @@ public void UnitConverter_ConvertUnits_J_to_therm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "J";
string targetUnitName = "therm";
- Measurement expected = new Measurement (Convert.ToDouble(9.47816988E-07), "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);
@@ -2328,7 +2308,7 @@ public void UnitConverter_ConvertUnits_J_to_therm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "J";
string targetUnitName = "therm";
- Measurement expected = new Measurement (Convert.ToDouble(9.47817E-09), "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);
@@ -2343,7 +2323,7 @@ public void UnitConverter_ConvertUnits_J_to_mJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "J";
string targetUnitName = "mJ";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -2358,7 +2338,7 @@ public void UnitConverter_ConvertUnits_J_to_mJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "J";
string targetUnitName = "mJ";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -2373,7 +2353,7 @@ public void UnitConverter_ConvertUnits_J_to_Megajoule_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "J";
string targetUnitName = "Megajoule";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -2388,7 +2368,7 @@ public void UnitConverter_ConvertUnits_J_to_Megajoule_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "J";
string targetUnitName = "Megajoule";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -2403,7 +2383,7 @@ public void UnitConverter_ConvertUnits_J_to_kJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "J";
string targetUnitName = "kJ";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -2418,7 +2398,7 @@ public void UnitConverter_ConvertUnits_J_to_kJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "J";
string targetUnitName = "kJ";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -2433,7 +2413,7 @@ public void UnitConverter_ConvertUnits_J_to_GJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "J";
string targetUnitName = "GJ";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -2448,7 +2428,7 @@ public void UnitConverter_ConvertUnits_J_to_GJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "J";
string targetUnitName = "GJ";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -2464,7 +2444,7 @@ public void UnitConverter_ConvertUnits_J_to_µJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "J";
string targetUnitName = "µJ";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "µ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);
@@ -2479,7 +2459,7 @@ public void UnitConverter_ConvertUnits_J_to_µJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "J";
string targetUnitName = "µJ";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "µ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);
@@ -2494,7 +2474,7 @@ public void UnitConverter_ConvertUnits_J_to_nJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "J";
string targetUnitName = "nJ";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000.0), "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);
@@ -2509,14 +2489,13 @@ public void UnitConverter_ConvertUnits_J_to_nJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "J";
string targetUnitName = "nJ";
- Measurement expected = new Measurement (Convert.ToDouble(999999999), "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)"
+ #endregion
+ #region "Source as Energy (erg)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -2526,7 +2505,7 @@ public void UnitConverter_ConvertUnits_erg_to_J_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "erg";
string targetUnitName = "J";
- Measurement expected = new Measurement (Convert.ToDouble(1E-05), "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);
@@ -2541,7 +2520,7 @@ public void UnitConverter_ConvertUnits_erg_to_J_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "erg";
string targetUnitName = "J";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -2556,7 +2535,7 @@ public void UnitConverter_ConvertUnits_erg_to_cal_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "erg";
string targetUnitName = "cal";
- Measurement expected = new Measurement (Convert.ToDouble(2.388458966E-06), "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);
@@ -2571,7 +2550,7 @@ public void UnitConverter_ConvertUnits_erg_to_cal_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "erg";
string targetUnitName = "cal";
- Measurement expected = new Measurement (Convert.ToDouble(2.388459E-08), "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);
@@ -2586,7 +2565,7 @@ public void UnitConverter_ConvertUnits_erg_to_Btu_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "erg";
string targetUnitName = "Btu";
- Measurement expected = new Measurement (Convert.ToDouble(9.478171E-09), "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);
@@ -2601,7 +2580,7 @@ public void UnitConverter_ConvertUnits_erg_to_Btu_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "erg";
string targetUnitName = "Btu";
- Measurement expected = new Measurement (Convert.ToDouble(9.4782E-11), "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);
@@ -2616,7 +2595,7 @@ public void UnitConverter_ConvertUnits_erg_to_therm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "erg";
string targetUnitName = "therm";
- Measurement expected = new Measurement (Convert.ToDouble(9.5E-14), "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);
@@ -2631,7 +2610,7 @@ public void UnitConverter_ConvertUnits_erg_to_therm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "erg";
string targetUnitName = "therm";
- Measurement expected = new Measurement (Convert.ToDouble(1E-15), "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);
@@ -2647,7 +2626,7 @@ public void UnitConverter_ConvertUnits_erg_to_mJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "erg";
string targetUnitName = "mJ";
- Measurement expected = new Measurement (Convert.ToDouble(0.01), "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);
@@ -2662,7 +2641,7 @@ public void UnitConverter_ConvertUnits_erg_to_mJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "erg";
string targetUnitName = "mJ";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-05), "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);
@@ -2677,7 +2656,7 @@ public void UnitConverter_ConvertUnits_erg_to_Megajoule_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "erg";
string targetUnitName = "Megajoule";
- Measurement expected = new Measurement (Convert.ToDouble(1E-11), "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);
@@ -2692,7 +2671,7 @@ public void UnitConverter_ConvertUnits_erg_to_Megajoule_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "erg";
string targetUnitName = "Megajoule";
- Measurement expected = new Measurement (Convert.ToDouble(1E-13), "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);
@@ -2708,7 +2687,7 @@ public void UnitConverter_ConvertUnits_erg_to_kJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "erg";
string targetUnitName = "kJ";
- Measurement expected = new Measurement (Convert.ToDouble(1E-08), "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);
@@ -2723,7 +2702,7 @@ public void UnitConverter_ConvertUnits_erg_to_kJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "erg";
string targetUnitName = "kJ";
- Measurement expected = new Measurement (Convert.ToDouble(1E-10), "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);
@@ -2739,7 +2718,7 @@ public void UnitConverter_ConvertUnits_erg_to_GJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "erg";
string targetUnitName = "GJ";
- Measurement expected = new Measurement (Convert.ToDouble(1E-14), "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);
@@ -2754,7 +2733,7 @@ public void UnitConverter_ConvertUnits_erg_to_GJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "erg";
string targetUnitName = "GJ";
- Measurement expected = new Measurement (Convert.ToDouble(0), "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);
@@ -2770,7 +2749,7 @@ public void UnitConverter_ConvertUnits_erg_to_µJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "erg";
string targetUnitName = "µJ";
- Measurement expected = new Measurement (Convert.ToDouble(10), "µ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);
@@ -2785,7 +2764,7 @@ public void UnitConverter_ConvertUnits_erg_to_µJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "erg";
string targetUnitName = "µJ";
- Measurement expected = new Measurement (Convert.ToDouble(0.0999999999), "µ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);
@@ -2800,7 +2779,7 @@ public void UnitConverter_ConvertUnits_erg_to_nJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "erg";
string targetUnitName = "nJ";
- Measurement expected = new Measurement (Convert.ToDouble(10000), "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);
@@ -2815,14 +2794,13 @@ public void UnitConverter_ConvertUnits_erg_to_nJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "erg";
string targetUnitName = "nJ";
- Measurement expected = new Measurement (Convert.ToDouble(99.9999999), "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)"
+ #endregion
+ #region "Source as Calorie (cal)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -2832,7 +2810,7 @@ public void UnitConverter_ConvertUnits_cal_to_J_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cal";
string targetUnitName = "J";
- Measurement expected = new Measurement (Convert.ToDouble(418.68), "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);
@@ -2847,7 +2825,7 @@ public void UnitConverter_ConvertUnits_cal_to_J_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cal";
string targetUnitName = "J";
- Measurement expected = new Measurement (Convert.ToDouble(4.1867999958132), "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);
@@ -2862,7 +2840,7 @@ public void UnitConverter_ConvertUnits_cal_to_erg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cal";
string targetUnitName = "erg";
- Measurement expected = new Measurement (Convert.ToDouble(4186800000L), "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);
@@ -2877,7 +2855,7 @@ public void UnitConverter_ConvertUnits_cal_to_erg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cal";
string targetUnitName = "erg";
- Measurement expected = new Measurement (Convert.ToDouble(41867999.958132), "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);
@@ -2892,7 +2870,7 @@ public void UnitConverter_ConvertUnits_cal_to_Btu_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cal";
string targetUnitName = "Btu";
- Measurement expected = new Measurement (Convert.ToDouble(0.396832071932955), "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);
@@ -2907,7 +2885,7 @@ public void UnitConverter_ConvertUnits_cal_to_Btu_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cal";
string targetUnitName = "Btu";
- Measurement expected = new Measurement (Convert.ToDouble(0.003968320715361), "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);
@@ -2922,7 +2900,7 @@ public void UnitConverter_ConvertUnits_cal_to_therm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cal";
string targetUnitName = "therm";
- Measurement expected = new Measurement (Convert.ToDouble(3.968320165E-06), "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);
@@ -2937,7 +2915,7 @@ public void UnitConverter_ConvertUnits_cal_to_therm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cal";
string targetUnitName = "therm";
- Measurement expected = new Measurement (Convert.ToDouble(3.9683202E-08), "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);
@@ -2952,7 +2930,7 @@ public void UnitConverter_ConvertUnits_cal_to_mJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cal";
string targetUnitName = "mJ";
- Measurement expected = new Measurement (Convert.ToDouble(418680), "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);
@@ -2967,7 +2945,7 @@ public void UnitConverter_ConvertUnits_cal_to_mJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cal";
string targetUnitName = "mJ";
- Measurement expected = new Measurement (Convert.ToDouble(4186.7999958132), "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);
@@ -2982,7 +2960,7 @@ public void UnitConverter_ConvertUnits_cal_to_Megajoule_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cal";
string targetUnitName = "Megajoule";
- Measurement expected = new Measurement (Convert.ToDouble(0.00041868), "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);
@@ -2997,7 +2975,7 @@ public void UnitConverter_ConvertUnits_cal_to_Megajoule_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cal";
string targetUnitName = "Megajoule";
- Measurement expected = new Measurement (Convert.ToDouble(4.186799996E-06), "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);
@@ -3012,7 +2990,7 @@ public void UnitConverter_ConvertUnits_cal_to_kJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cal";
string targetUnitName = "kJ";
- Measurement expected = new Measurement (Convert.ToDouble(0.41868), "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);
@@ -3027,7 +3005,7 @@ public void UnitConverter_ConvertUnits_cal_to_kJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cal";
string targetUnitName = "kJ";
- Measurement expected = new Measurement (Convert.ToDouble(0.004186799995813), "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);
@@ -3042,7 +3020,7 @@ public void UnitConverter_ConvertUnits_cal_to_GJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cal";
string targetUnitName = "GJ";
- Measurement expected = new Measurement (Convert.ToDouble(4.1868E-07), "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);
@@ -3057,7 +3035,7 @@ public void UnitConverter_ConvertUnits_cal_to_GJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cal";
string targetUnitName = "GJ";
- Measurement expected = new Measurement (Convert.ToDouble(4.1868E-09), "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);
@@ -3072,7 +3050,7 @@ public void UnitConverter_ConvertUnits_cal_to_µJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cal";
string targetUnitName = "µJ";
- Measurement expected = new Measurement (Convert.ToDouble(418680000), "µ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);
@@ -3087,7 +3065,7 @@ public void UnitConverter_ConvertUnits_cal_to_µJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cal";
string targetUnitName = "µJ";
- Measurement expected = new Measurement (Convert.ToDouble(4186799.9958132), "µ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);
@@ -3102,7 +3080,7 @@ public void UnitConverter_ConvertUnits_cal_to_nJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cal";
string targetUnitName = "nJ";
- Measurement expected = new Measurement (Convert.ToDouble(418680000000.0), "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);
@@ -3117,14 +3095,13 @@ public void UnitConverter_ConvertUnits_cal_to_nJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cal";
string targetUnitName = "nJ";
- Measurement expected = new Measurement (Convert.ToDouble(4186799995.8132), "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)"
+ #endregion
+ #region "Source as British thermal unit (Btu)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -3134,7 +3111,7 @@ public void UnitConverter_ConvertUnits_Btu_to_J_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Btu";
string targetUnitName = "J";
- Measurement expected = new Measurement (Convert.ToDouble(105505.585262), "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);
@@ -3149,7 +3126,7 @@ public void UnitConverter_ConvertUnits_Btu_to_J_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Btu";
string targetUnitName = "J";
- Measurement expected = new Measurement (Convert.ToDouble(1055.05585156494), "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);
@@ -3164,7 +3141,7 @@ public void UnitConverter_ConvertUnits_Btu_to_erg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Btu";
string targetUnitName = "erg";
- Measurement expected = new Measurement (Convert.ToDouble(1055055852620.0), "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);
@@ -3179,7 +3156,7 @@ public void UnitConverter_ConvertUnits_Btu_to_erg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Btu";
string targetUnitName = "erg";
- Measurement expected = new Measurement (Convert.ToDouble(10550558515.6494), "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);
@@ -3194,7 +3171,7 @@ public void UnitConverter_ConvertUnits_Btu_to_cal_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Btu";
string targetUnitName = "cal";
- Measurement expected = new Measurement (Convert.ToDouble(25199.5761111), "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);
@@ -3209,7 +3186,7 @@ public void UnitConverter_ConvertUnits_Btu_to_cal_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Btu";
string targetUnitName = "cal";
- Measurement expected = new Measurement (Convert.ToDouble(251.995760859004), "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);
@@ -3224,7 +3201,7 @@ public void UnitConverter_ConvertUnits_Btu_to_therm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Btu";
string targetUnitName = "therm";
- Measurement expected = new Measurement (Convert.ToDouble(0.001), "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);
@@ -3239,7 +3216,7 @@ public void UnitConverter_ConvertUnits_Btu_to_therm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Btu";
string targetUnitName = "therm";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-06), "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);
@@ -3254,7 +3231,7 @@ public void UnitConverter_ConvertUnits_Btu_to_mJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Btu";
string targetUnitName = "mJ";
- Measurement expected = new Measurement (Convert.ToDouble(105505585.262), "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);
@@ -3269,7 +3246,7 @@ public void UnitConverter_ConvertUnits_Btu_to_mJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Btu";
string targetUnitName = "mJ";
- Measurement expected = new Measurement (Convert.ToDouble(1055055.85156494), "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);
@@ -3284,7 +3261,7 @@ public void UnitConverter_ConvertUnits_Btu_to_Megajoule_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Btu";
string targetUnitName = "Megajoule";
- Measurement expected = new Measurement (Convert.ToDouble(0.105505585262), "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);
@@ -3299,7 +3276,7 @@ public void UnitConverter_ConvertUnits_Btu_to_Megajoule_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Btu";
string targetUnitName = "Megajoule";
- Measurement expected = new Measurement (Convert.ToDouble(0.001055055851565), "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);
@@ -3314,7 +3291,7 @@ public void UnitConverter_ConvertUnits_Btu_to_kJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Btu";
string targetUnitName = "kJ";
- Measurement expected = new Measurement (Convert.ToDouble(105.505585262), "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);
@@ -3329,7 +3306,7 @@ public void UnitConverter_ConvertUnits_Btu_to_kJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Btu";
string targetUnitName = "kJ";
- Measurement expected = new Measurement (Convert.ToDouble(1.05505585156494), "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);
@@ -3344,7 +3321,7 @@ public void UnitConverter_ConvertUnits_Btu_to_GJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Btu";
string targetUnitName = "GJ";
- Measurement expected = new Measurement (Convert.ToDouble(0.000105505585262), "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);
@@ -3359,7 +3336,7 @@ public void UnitConverter_ConvertUnits_Btu_to_GJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Btu";
string targetUnitName = "GJ";
- Measurement expected = new Measurement (Convert.ToDouble(1.055055852E-06), "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);
@@ -3374,7 +3351,7 @@ public void UnitConverter_ConvertUnits_Btu_to_µJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Btu";
string targetUnitName = "µJ";
- Measurement expected = new Measurement (Convert.ToDouble(105505585262.0), "µ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);
@@ -3389,7 +3366,7 @@ public void UnitConverter_ConvertUnits_Btu_to_µJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Btu";
string targetUnitName = "µJ";
- Measurement expected = new Measurement (Convert.ToDouble(1055055851.56494), "µ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);
@@ -3404,7 +3381,7 @@ public void UnitConverter_ConvertUnits_Btu_to_nJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Btu";
string targetUnitName = "nJ";
- Measurement expected = new Measurement (Convert.ToDouble(105505585262000.0), "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);
@@ -3419,14 +3396,13 @@ public void UnitConverter_ConvertUnits_Btu_to_nJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Btu";
string targetUnitName = "nJ";
- Measurement expected = new Measurement (Convert.ToDouble(1055055851564.94), "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)"
+ #endregion
+ #region "Source as Therm (therm)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -3436,7 +3412,7 @@ public void UnitConverter_ConvertUnits_therm_to_J_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "therm";
string targetUnitName = "J";
- Measurement expected = new Measurement (Convert.ToDouble(10550560000.0), "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);
@@ -3451,7 +3427,7 @@ public void UnitConverter_ConvertUnits_therm_to_J_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "therm";
string targetUnitName = "J";
- Measurement expected = new Measurement (Convert.ToDouble(105505599.894494), "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);
@@ -3466,7 +3442,7 @@ public void UnitConverter_ConvertUnits_therm_to_erg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "therm";
string targetUnitName = "erg";
- Measurement expected = new Measurement (Convert.ToDouble(1.055056E+17), "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);
@@ -3481,7 +3457,7 @@ public void UnitConverter_ConvertUnits_therm_to_erg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "therm";
string targetUnitName = "erg";
- Measurement expected = new Measurement (Convert.ToDouble(1055055998944944L), "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);
@@ -3496,7 +3472,7 @@ public void UnitConverter_ConvertUnits_therm_to_cal_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "therm";
string targetUnitName = "cal";
- Measurement expected = new Measurement (Convert.ToDouble(2519957963.1222), "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);
@@ -3511,7 +3487,7 @@ public void UnitConverter_ConvertUnits_therm_to_cal_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "therm";
string targetUnitName = "cal";
- Measurement expected = new Measurement (Convert.ToDouble(25199579.6060224), "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);
@@ -3526,7 +3502,7 @@ public void UnitConverter_ConvertUnits_therm_to_Btu_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "therm";
string targetUnitName = "Btu";
- Measurement expected = new Measurement (Convert.ToDouble(10000000), "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);
@@ -3541,7 +3517,7 @@ public void UnitConverter_ConvertUnits_therm_to_Btu_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "therm";
string targetUnitName = "Btu";
- Measurement expected = new Measurement (Convert.ToDouble(99999.9999), "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);
@@ -3556,7 +3532,7 @@ public void UnitConverter_ConvertUnits_therm_to_mJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "therm";
string targetUnitName = "mJ";
- Measurement expected = new Measurement (Convert.ToDouble(10550560000000.0), "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);
@@ -3571,7 +3547,7 @@ public void UnitConverter_ConvertUnits_therm_to_mJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "therm";
string targetUnitName = "mJ";
- Measurement expected = new Measurement (Convert.ToDouble(105505599894.494), "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);
@@ -3586,7 +3562,7 @@ public void UnitConverter_ConvertUnits_therm_to_Megajoule_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "therm";
string targetUnitName = "Megajoule";
- Measurement expected = new Measurement (Convert.ToDouble(10550.56), "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);
@@ -3601,7 +3577,7 @@ public void UnitConverter_ConvertUnits_therm_to_Megajoule_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "therm";
string targetUnitName = "Megajoule";
- Measurement expected = new Measurement (Convert.ToDouble(105.505599894494), "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);
@@ -3616,7 +3592,7 @@ public void UnitConverter_ConvertUnits_therm_to_kJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "therm";
string targetUnitName = "kJ";
- Measurement expected = new Measurement (Convert.ToDouble(10550560), "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);
@@ -3631,7 +3607,7 @@ public void UnitConverter_ConvertUnits_therm_to_kJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "therm";
string targetUnitName = "kJ";
- Measurement expected = new Measurement (Convert.ToDouble(105505.599894494), "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);
@@ -3646,7 +3622,7 @@ public void UnitConverter_ConvertUnits_therm_to_GJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "therm";
string targetUnitName = "GJ";
- Measurement expected = new Measurement (Convert.ToDouble(10.55056), "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);
@@ -3661,7 +3637,7 @@ public void UnitConverter_ConvertUnits_therm_to_GJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "therm";
string targetUnitName = "GJ";
- Measurement expected = new Measurement (Convert.ToDouble(0.105505599894494), "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);
@@ -3676,7 +3652,7 @@ public void UnitConverter_ConvertUnits_therm_to_µJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "therm";
string targetUnitName = "µJ";
- Measurement expected = new Measurement (Convert.ToDouble(1.055056E+16), "µ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);
@@ -3691,7 +3667,7 @@ public void UnitConverter_ConvertUnits_therm_to_µJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "therm";
string targetUnitName = "µJ";
- Measurement expected = new Measurement (Convert.ToDouble(105505599894494.0), "µ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);
@@ -3706,7 +3682,7 @@ public void UnitConverter_ConvertUnits_therm_to_nJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "therm";
string targetUnitName = "nJ";
- Measurement expected = new Measurement (Convert.ToDouble(1.055056E+19), "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);
@@ -3721,14 +3697,13 @@ public void UnitConverter_ConvertUnits_therm_to_nJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "therm";
string targetUnitName = "nJ";
- Measurement expected = new Measurement (Convert.ToDouble(1.05505599894494E+17), "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)"
+ #endregion
+ #region "Source as Millijoules (mJ)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -3738,7 +3713,7 @@ public void UnitConverter_ConvertUnits_mJ_to_J_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mJ";
string targetUnitName = "J";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -3753,7 +3728,7 @@ public void UnitConverter_ConvertUnits_mJ_to_J_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mJ";
string targetUnitName = "J";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -3769,7 +3744,7 @@ public void UnitConverter_ConvertUnits_mJ_to_erg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mJ";
string targetUnitName = "erg";
- Measurement expected = new Measurement (Convert.ToDouble(1000000), "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);
@@ -3784,7 +3759,7 @@ public void UnitConverter_ConvertUnits_mJ_to_erg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mJ";
string targetUnitName = "erg";
- Measurement expected = new Measurement (Convert.ToDouble(9999.99999), "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);
@@ -3799,7 +3774,7 @@ public void UnitConverter_ConvertUnits_mJ_to_cal_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mJ";
string targetUnitName = "cal";
- Measurement expected = new Measurement (Convert.ToDouble(0.02388458966275), "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);
@@ -3814,7 +3789,7 @@ public void UnitConverter_ConvertUnits_mJ_to_cal_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mJ";
string targetUnitName = "cal";
- Measurement expected = new Measurement (Convert.ToDouble(0.000238845896389), "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);
@@ -3829,7 +3804,7 @@ public void UnitConverter_ConvertUnits_mJ_to_Btu_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mJ";
string targetUnitName = "Btu";
- Measurement expected = new Measurement (Convert.ToDouble(9.4781712031E-05), "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);
@@ -3844,7 +3819,7 @@ public void UnitConverter_ConvertUnits_mJ_to_Btu_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mJ";
string targetUnitName = "Btu";
- Measurement expected = new Measurement (Convert.ToDouble(9.47817119E-07), "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);
@@ -3859,7 +3834,7 @@ public void UnitConverter_ConvertUnits_mJ_to_therm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mJ";
string targetUnitName = "therm";
- Measurement expected = new Measurement (Convert.ToDouble(9.47817E-10), "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);
@@ -3874,7 +3849,7 @@ public void UnitConverter_ConvertUnits_mJ_to_therm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mJ";
string targetUnitName = "therm";
- Measurement expected = new Measurement (Convert.ToDouble(9.478E-12), "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);
@@ -3889,7 +3864,7 @@ public void UnitConverter_ConvertUnits_mJ_to_Megajoule_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mJ";
string targetUnitName = "Megajoule";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -3904,7 +3879,7 @@ public void UnitConverter_ConvertUnits_mJ_to_Megajoule_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mJ";
string targetUnitName = "Megajoule";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -3920,7 +3895,7 @@ public void UnitConverter_ConvertUnits_mJ_to_kJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mJ";
string targetUnitName = "kJ";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -3935,7 +3910,7 @@ public void UnitConverter_ConvertUnits_mJ_to_kJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mJ";
string targetUnitName = "kJ";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -3950,7 +3925,7 @@ public void UnitConverter_ConvertUnits_mJ_to_GJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mJ";
string targetUnitName = "GJ";
- Measurement expected = new Measurement (Convert.ToDouble(1E-10), "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);
@@ -3965,7 +3940,7 @@ public void UnitConverter_ConvertUnits_mJ_to_GJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mJ";
string targetUnitName = "GJ";
- Measurement expected = new Measurement (Convert.ToDouble(1E-12), "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);
@@ -3981,7 +3956,7 @@ public void UnitConverter_ConvertUnits_mJ_to_µJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mJ";
string targetUnitName = "µJ";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "µ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);
@@ -3996,7 +3971,7 @@ public void UnitConverter_ConvertUnits_mJ_to_µJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mJ";
string targetUnitName = "µJ";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "µ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);
@@ -4011,7 +3986,7 @@ public void UnitConverter_ConvertUnits_mJ_to_nJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mJ";
string targetUnitName = "nJ";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -4026,14 +4001,13 @@ public void UnitConverter_ConvertUnits_mJ_to_nJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mJ";
string targetUnitName = "nJ";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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)"
+ #endregion
+ #region "Source as Megajoules (MJ)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -4043,7 +4017,7 @@ public void UnitConverter_ConvertUnits_Megajoule_to_J_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Megajoule";
string targetUnitName = "J";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -4058,7 +4032,7 @@ public void UnitConverter_ConvertUnits_Megajoule_to_J_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Megajoule";
string targetUnitName = "J";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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);
@@ -4073,7 +4047,7 @@ public void UnitConverter_ConvertUnits_Megajoule_to_erg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Megajoule";
string targetUnitName = "erg";
- Measurement expected = new Measurement (Convert.ToDouble(1E+15), "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);
@@ -4088,7 +4062,7 @@ public void UnitConverter_ConvertUnits_Megajoule_to_erg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Megajoule";
string targetUnitName = "erg";
- Measurement expected = new Measurement (Convert.ToDouble(9999999990000.0), "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);
@@ -4103,7 +4077,7 @@ public void UnitConverter_ConvertUnits_Megajoule_to_cal_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Megajoule";
string targetUnitName = "cal";
- Measurement expected = new Measurement (Convert.ToDouble(23884589.6627496), "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);
@@ -4118,7 +4092,7 @@ public void UnitConverter_ConvertUnits_Megajoule_to_cal_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Megajoule";
string targetUnitName = "cal";
- Measurement expected = new Measurement (Convert.ToDouble(238845.89638865), "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);
@@ -4133,7 +4107,7 @@ public void UnitConverter_ConvertUnits_Megajoule_to_Btu_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Megajoule";
string targetUnitName = "Btu";
- Measurement expected = new Measurement (Convert.ToDouble(94781.7120313317), "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);
@@ -4148,7 +4122,7 @@ public void UnitConverter_ConvertUnits_Megajoule_to_Btu_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Megajoule";
string targetUnitName = "Btu";
- Measurement expected = new Measurement (Convert.ToDouble(947.8171193655), "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);
@@ -4163,7 +4137,7 @@ public void UnitConverter_ConvertUnits_Megajoule_to_therm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Megajoule";
string targetUnitName = "therm";
- Measurement expected = new Measurement (Convert.ToDouble(0.947816987913438), "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);
@@ -4178,7 +4152,7 @@ public void UnitConverter_ConvertUnits_Megajoule_to_therm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Megajoule";
string targetUnitName = "therm";
- Measurement expected = new Measurement (Convert.ToDouble(0.009478169869656), "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);
@@ -4193,7 +4167,7 @@ public void UnitConverter_ConvertUnits_Megajoule_to_mJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Megajoule";
string targetUnitName = "mJ";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000.0), "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);
@@ -4208,7 +4182,7 @@ public void UnitConverter_ConvertUnits_Megajoule_to_mJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Megajoule";
string targetUnitName = "mJ";
- Measurement expected = new Measurement (Convert.ToDouble(999999999), "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);
@@ -4223,7 +4197,7 @@ public void UnitConverter_ConvertUnits_Megajoule_to_kJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Megajoule";
string targetUnitName = "kJ";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -4238,7 +4212,7 @@ public void UnitConverter_ConvertUnits_Megajoule_to_kJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Megajoule";
string targetUnitName = "kJ";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -4253,7 +4227,7 @@ public void UnitConverter_ConvertUnits_Megajoule_to_GJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Megajoule";
string targetUnitName = "GJ";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -4268,7 +4242,7 @@ public void UnitConverter_ConvertUnits_Megajoule_to_GJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Megajoule";
string targetUnitName = "GJ";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -4283,7 +4257,7 @@ public void UnitConverter_ConvertUnits_Megajoule_to_µJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Megajoule";
string targetUnitName = "µJ";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000.0), "µ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);
@@ -4298,7 +4272,7 @@ public void UnitConverter_ConvertUnits_Megajoule_to_µJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Megajoule";
string targetUnitName = "µJ";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000.0), "µ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);
@@ -4313,7 +4287,7 @@ public void UnitConverter_ConvertUnits_Megajoule_to_nJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Megajoule";
string targetUnitName = "nJ";
- Measurement expected = new Measurement (Convert.ToDouble(1E+17), "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);
@@ -4328,14 +4302,13 @@ public void UnitConverter_ConvertUnits_Megajoule_to_nJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Megajoule";
string targetUnitName = "nJ";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000000.0), "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)"
+ #endregion
+ #region "Source as Kilojoules (kJ)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -4345,7 +4318,7 @@ public void UnitConverter_ConvertUnits_kJ_to_J_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kJ";
string targetUnitName = "J";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -4360,7 +4333,7 @@ public void UnitConverter_ConvertUnits_kJ_to_J_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kJ";
string targetUnitName = "J";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -4375,7 +4348,7 @@ public void UnitConverter_ConvertUnits_kJ_to_erg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kJ";
string targetUnitName = "erg";
- Measurement expected = new Measurement (Convert.ToDouble(1000000000000.0), "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);
@@ -4390,7 +4363,7 @@ public void UnitConverter_ConvertUnits_kJ_to_erg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kJ";
string targetUnitName = "erg";
- Measurement expected = new Measurement (Convert.ToDouble(9999999990L), "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);
@@ -4405,7 +4378,7 @@ public void UnitConverter_ConvertUnits_kJ_to_cal_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kJ";
string targetUnitName = "cal";
- Measurement expected = new Measurement (Convert.ToDouble(23884.5896627496), "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);
@@ -4420,7 +4393,7 @@ public void UnitConverter_ConvertUnits_kJ_to_cal_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kJ";
string targetUnitName = "cal";
- Measurement expected = new Measurement (Convert.ToDouble(238.84589638865), "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);
@@ -4435,7 +4408,7 @@ public void UnitConverter_ConvertUnits_kJ_to_Btu_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kJ";
string targetUnitName = "Btu";
- Measurement expected = new Measurement (Convert.ToDouble(94.7817120313317), "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);
@@ -4450,7 +4423,7 @@ public void UnitConverter_ConvertUnits_kJ_to_Btu_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kJ";
string targetUnitName = "Btu";
- Measurement expected = new Measurement (Convert.ToDouble(0.9478171193655), "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);
@@ -4465,7 +4438,7 @@ public void UnitConverter_ConvertUnits_kJ_to_therm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kJ";
string targetUnitName = "therm";
- Measurement expected = new Measurement (Convert.ToDouble(0.000947816987913), "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);
@@ -4480,7 +4453,7 @@ public void UnitConverter_ConvertUnits_kJ_to_therm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kJ";
string targetUnitName = "therm";
- Measurement expected = new Measurement (Convert.ToDouble(9.47816987E-06), "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);
@@ -4495,7 +4468,7 @@ public void UnitConverter_ConvertUnits_kJ_to_mJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kJ";
string targetUnitName = "mJ";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -4510,7 +4483,7 @@ public void UnitConverter_ConvertUnits_kJ_to_mJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kJ";
string targetUnitName = "mJ";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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);
@@ -4525,7 +4498,7 @@ public void UnitConverter_ConvertUnits_kJ_to_Megajoule_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kJ";
string targetUnitName = "Megajoule";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -4540,7 +4513,7 @@ public void UnitConverter_ConvertUnits_kJ_to_Megajoule_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kJ";
string targetUnitName = "Megajoule";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -4555,7 +4528,7 @@ public void UnitConverter_ConvertUnits_kJ_to_GJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kJ";
string targetUnitName = "GJ";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -4570,7 +4543,7 @@ public void UnitConverter_ConvertUnits_kJ_to_GJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kJ";
string targetUnitName = "GJ";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -4585,7 +4558,7 @@ public void UnitConverter_ConvertUnits_kJ_to_µJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kJ";
string targetUnitName = "µJ";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000.0), "µ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);
@@ -4600,7 +4573,7 @@ public void UnitConverter_ConvertUnits_kJ_to_µJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kJ";
string targetUnitName = "µJ";
- Measurement expected = new Measurement (Convert.ToDouble(999999999), "µ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);
@@ -4615,7 +4588,7 @@ public void UnitConverter_ConvertUnits_kJ_to_nJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kJ";
string targetUnitName = "nJ";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000.0), "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);
@@ -4630,14 +4603,13 @@ public void UnitConverter_ConvertUnits_kJ_to_nJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kJ";
string targetUnitName = "nJ";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000.0), "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)"
+ #endregion
+ #region "Source as Gigajoules (GJ)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -4647,7 +4619,7 @@ public void UnitConverter_ConvertUnits_GJ_to_J_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "GJ";
string targetUnitName = "J";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000.0), "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);
@@ -4662,7 +4634,7 @@ public void UnitConverter_ConvertUnits_GJ_to_J_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "GJ";
string targetUnitName = "J";
- Measurement expected = new Measurement (Convert.ToDouble(999999999), "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);
@@ -4677,7 +4649,7 @@ public void UnitConverter_ConvertUnits_GJ_to_erg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "GJ";
string targetUnitName = "erg";
- Measurement expected = new Measurement (Convert.ToDouble(1E+18), "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);
@@ -4692,7 +4664,7 @@ public void UnitConverter_ConvertUnits_GJ_to_erg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "GJ";
string targetUnitName = "erg";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E+15), "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);
@@ -4707,7 +4679,7 @@ public void UnitConverter_ConvertUnits_GJ_to_cal_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "GJ";
string targetUnitName = "cal";
- Measurement expected = new Measurement (Convert.ToDouble(23884589662.75), "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);
@@ -4722,7 +4694,7 @@ public void UnitConverter_ConvertUnits_GJ_to_cal_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "GJ";
string targetUnitName = "cal";
- Measurement expected = new Measurement (Convert.ToDouble(238845896.388654), "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);
@@ -4737,7 +4709,7 @@ public void UnitConverter_ConvertUnits_GJ_to_Btu_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "GJ";
string targetUnitName = "Btu";
- Measurement expected = new Measurement (Convert.ToDouble(94781712.031332), "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);
@@ -4752,7 +4724,7 @@ public void UnitConverter_ConvertUnits_GJ_to_Btu_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "GJ";
string targetUnitName = "Btu";
- Measurement expected = new Measurement (Convert.ToDouble(947817.119365503), "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);
@@ -4767,7 +4739,7 @@ public void UnitConverter_ConvertUnits_GJ_to_therm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "GJ";
string targetUnitName = "therm";
- Measurement expected = new Measurement (Convert.ToDouble(947.816987913438), "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);
@@ -4782,7 +4754,7 @@ public void UnitConverter_ConvertUnits_GJ_to_therm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "GJ";
string targetUnitName = "therm";
- Measurement expected = new Measurement (Convert.ToDouble(9.47816986965621), "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);
@@ -4797,7 +4769,7 @@ public void UnitConverter_ConvertUnits_GJ_to_mJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "GJ";
string targetUnitName = "mJ";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000000.0), "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);
@@ -4812,7 +4784,7 @@ public void UnitConverter_ConvertUnits_GJ_to_mJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "GJ";
string targetUnitName = "mJ";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000.0), "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);
@@ -4827,7 +4799,7 @@ public void UnitConverter_ConvertUnits_GJ_to_Megajoule_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "GJ";
string targetUnitName = "Megajoule";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -4842,7 +4814,7 @@ public void UnitConverter_ConvertUnits_GJ_to_Megajoule_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "GJ";
string targetUnitName = "Megajoule";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -4857,7 +4829,7 @@ public void UnitConverter_ConvertUnits_GJ_to_kJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "GJ";
string targetUnitName = "kJ";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -4872,7 +4844,7 @@ public void UnitConverter_ConvertUnits_GJ_to_kJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "GJ";
string targetUnitName = "kJ";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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);
@@ -4887,7 +4859,7 @@ public void UnitConverter_ConvertUnits_GJ_to_µJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "GJ";
string targetUnitName = "µJ";
- Measurement expected = new Measurement (Convert.ToDouble(1E+17), "µ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);
@@ -4902,7 +4874,7 @@ public void UnitConverter_ConvertUnits_GJ_to_µJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "GJ";
string targetUnitName = "µJ";
- Measurement expected = new Measurement (Convert.ToDouble(999999999000000.0), "µ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);
@@ -4917,7 +4889,7 @@ public void UnitConverter_ConvertUnits_GJ_to_nJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "GJ";
string targetUnitName = "nJ";
- Measurement expected = new Measurement (Convert.ToDouble(1E+20), "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);
@@ -4932,14 +4904,13 @@ public void UnitConverter_ConvertUnits_GJ_to_nJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "GJ";
string targetUnitName = "nJ";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E+17), "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)"
+ #endregion
+ #region "Source as Microjoules (µJ)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -4949,7 +4920,7 @@ public void UnitConverter_ConvertUnits_µJ_to_J_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µJ";
string targetUnitName = "J";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -4964,7 +4935,7 @@ public void UnitConverter_ConvertUnits_µJ_to_J_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µJ";
string targetUnitName = "J";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -4979,7 +4950,7 @@ public void UnitConverter_ConvertUnits_µJ_to_erg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µJ";
string targetUnitName = "erg";
- Measurement expected = new Measurement (Convert.ToDouble(1000), "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);
@@ -4994,7 +4965,7 @@ public void UnitConverter_ConvertUnits_µJ_to_erg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µJ";
string targetUnitName = "erg";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999), "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);
@@ -5009,7 +4980,7 @@ public void UnitConverter_ConvertUnits_µJ_to_cal_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µJ";
string targetUnitName = "cal";
- Measurement expected = new Measurement (Convert.ToDouble(2.3884589663E-05), "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);
@@ -5024,7 +4995,7 @@ public void UnitConverter_ConvertUnits_µJ_to_cal_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µJ";
string targetUnitName = "cal";
- Measurement expected = new Measurement (Convert.ToDouble(2.38845896E-07), "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);
@@ -5039,7 +5010,7 @@ public void UnitConverter_ConvertUnits_µJ_to_Btu_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µJ";
string targetUnitName = "Btu";
- Measurement expected = new Measurement (Convert.ToDouble(9.4781712E-08), "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);
@@ -5054,7 +5025,7 @@ public void UnitConverter_ConvertUnits_µJ_to_Btu_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µJ";
string targetUnitName = "Btu";
- Measurement expected = new Measurement (Convert.ToDouble(9.47817E-10), "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);
@@ -5069,7 +5040,7 @@ public void UnitConverter_ConvertUnits_µJ_to_therm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µJ";
string targetUnitName = "therm";
- Measurement expected = new Measurement (Convert.ToDouble(9.48E-13), "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);
@@ -5084,7 +5055,7 @@ public void UnitConverter_ConvertUnits_µJ_to_therm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µJ";
string targetUnitName = "therm";
- Measurement expected = new Measurement (Convert.ToDouble(9E-15), "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);
@@ -5099,7 +5070,7 @@ public void UnitConverter_ConvertUnits_µJ_to_mJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µJ";
string targetUnitName = "mJ";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -5114,7 +5085,7 @@ public void UnitConverter_ConvertUnits_µJ_to_mJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µJ";
string targetUnitName = "mJ";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -5129,7 +5100,7 @@ public void UnitConverter_ConvertUnits_µJ_to_Megajoule_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µJ";
string targetUnitName = "Megajoule";
- Measurement expected = new Measurement (Convert.ToDouble(1E-10), "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);
@@ -5144,7 +5115,7 @@ public void UnitConverter_ConvertUnits_µJ_to_Megajoule_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µJ";
string targetUnitName = "Megajoule";
- Measurement expected = new Measurement (Convert.ToDouble(1E-12), "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);
@@ -5160,7 +5131,7 @@ public void UnitConverter_ConvertUnits_µJ_to_kJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µJ";
string targetUnitName = "kJ";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -5175,7 +5146,7 @@ public void UnitConverter_ConvertUnits_µJ_to_kJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µJ";
string targetUnitName = "kJ";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -5191,7 +5162,7 @@ public void UnitConverter_ConvertUnits_µJ_to_GJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µJ";
string targetUnitName = "GJ";
- Measurement expected = new Measurement (Convert.ToDouble(1E-13), "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);
@@ -5206,7 +5177,7 @@ public void UnitConverter_ConvertUnits_µJ_to_GJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µJ";
string targetUnitName = "GJ";
- Measurement expected = new Measurement (Convert.ToDouble(1E-15), "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);
@@ -5222,7 +5193,7 @@ public void UnitConverter_ConvertUnits_µJ_to_nJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µJ";
string targetUnitName = "nJ";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -5237,14 +5208,13 @@ public void UnitConverter_ConvertUnits_µJ_to_nJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µJ";
string targetUnitName = "nJ";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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)"
+ #endregion
+ #region "Source as Nanojoules (nJ)"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -5254,7 +5224,7 @@ public void UnitConverter_ConvertUnits_nJ_to_J_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nJ";
string targetUnitName = "J";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -5269,7 +5239,7 @@ public void UnitConverter_ConvertUnits_nJ_to_J_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nJ";
string targetUnitName = "J";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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);
@@ -5285,7 +5255,7 @@ public void UnitConverter_ConvertUnits_nJ_to_erg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nJ";
string targetUnitName = "erg";
- Measurement expected = new Measurement (Convert.ToDouble(1), "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);
@@ -5300,7 +5270,7 @@ public void UnitConverter_ConvertUnits_nJ_to_erg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nJ";
string targetUnitName = "erg";
- Measurement expected = new Measurement (Convert.ToDouble(0.00999999999), "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);
@@ -5315,7 +5285,7 @@ public void UnitConverter_ConvertUnits_nJ_to_cal_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nJ";
string targetUnitName = "cal";
- Measurement expected = new Measurement (Convert.ToDouble(2.388459E-08), "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);
@@ -5330,7 +5300,7 @@ public void UnitConverter_ConvertUnits_nJ_to_cal_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nJ";
string targetUnitName = "cal";
- Measurement expected = new Measurement (Convert.ToDouble(2.38846E-10), "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);
@@ -5345,7 +5315,7 @@ public void UnitConverter_ConvertUnits_nJ_to_Btu_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nJ";
string targetUnitName = "Btu";
- Measurement expected = new Measurement (Convert.ToDouble(9.4782E-11), "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);
@@ -5360,7 +5330,7 @@ public void UnitConverter_ConvertUnits_nJ_to_Btu_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nJ";
string targetUnitName = "Btu";
- Measurement expected = new Measurement (Convert.ToDouble(9.48E-13), "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);
@@ -5375,7 +5345,7 @@ public void UnitConverter_ConvertUnits_nJ_to_therm_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nJ";
string targetUnitName = "therm";
- Measurement expected = new Measurement (Convert.ToDouble(1E-15), "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);
@@ -5391,7 +5361,7 @@ public void UnitConverter_ConvertUnits_nJ_to_therm_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nJ";
string targetUnitName = "therm";
- Measurement expected = new Measurement (Convert.ToDouble(0), "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);
@@ -5407,7 +5377,7 @@ public void UnitConverter_ConvertUnits_nJ_to_mJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nJ";
string targetUnitName = "mJ";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -5422,7 +5392,7 @@ public void UnitConverter_ConvertUnits_nJ_to_mJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nJ";
string targetUnitName = "mJ";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -5437,7 +5407,7 @@ public void UnitConverter_ConvertUnits_nJ_to_Megajoule_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nJ";
string targetUnitName = "Megajoule";
- Measurement expected = new Measurement (Convert.ToDouble(1E-13), "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);
@@ -5452,7 +5422,7 @@ public void UnitConverter_ConvertUnits_nJ_to_Megajoule_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nJ";
string targetUnitName = "Megajoule";
- Measurement expected = new Measurement (Convert.ToDouble(1E-15), "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);
@@ -5468,7 +5438,7 @@ public void UnitConverter_ConvertUnits_nJ_to_kJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nJ";
string targetUnitName = "kJ";
- Measurement expected = new Measurement (Convert.ToDouble(1E-10), "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);
@@ -5483,7 +5453,7 @@ public void UnitConverter_ConvertUnits_nJ_to_kJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nJ";
string targetUnitName = "kJ";
- Measurement expected = new Measurement (Convert.ToDouble(1E-12), "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);
@@ -5499,7 +5469,7 @@ public void UnitConverter_ConvertUnits_nJ_to_GJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nJ";
string targetUnitName = "GJ";
- Measurement expected = new Measurement (Convert.ToDouble(0), "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);
@@ -5515,7 +5485,7 @@ public void UnitConverter_ConvertUnits_nJ_to_GJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nJ";
string targetUnitName = "GJ";
- Measurement expected = new Measurement (Convert.ToDouble(0), "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);
@@ -5531,7 +5501,7 @@ public void UnitConverter_ConvertUnits_nJ_to_µJ_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "nJ";
string targetUnitName = "µJ";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "µ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);
@@ -5546,18 +5516,15 @@ public void UnitConverter_ConvertUnits_nJ_to_µJ_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "nJ";
string targetUnitName = "µJ";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "µ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"
-
+ #endregion
+ #endregion
+ #region "Plane Angle Tests"
+ #region "Source as Radians"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -5567,7 +5534,7 @@ public void UnitConverter_ConvertUnits_rad_to_deg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "rad";
string targetUnitName = "deg";
- Measurement expected = new Measurement (Convert.ToDouble(5729.57795130823), "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);
@@ -5582,7 +5549,7 @@ public void UnitConverter_ConvertUnits_rad_to_deg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "rad";
string targetUnitName = "deg";
- Measurement expected = new Measurement (Convert.ToDouble(57.2957794557866), "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);
@@ -5597,7 +5564,7 @@ public void UnitConverter_ConvertUnits_rad_to_grad_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "rad";
string targetUnitName = "grad";
- Measurement expected = new Measurement (Convert.ToDouble(6366.19772367581), "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);
@@ -5612,7 +5579,7 @@ public void UnitConverter_ConvertUnits_rad_to_grad_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "rad";
string targetUnitName = "grad";
- Measurement expected = new Measurement (Convert.ToDouble(63.6619771730962), "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);
@@ -5627,7 +5594,7 @@ public void UnitConverter_ConvertUnits_rad_to_rev_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "rad";
string targetUnitName = "rev";
- Measurement expected = new Measurement (Convert.ToDouble(15.915494309), "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);
@@ -5642,15 +5609,13 @@ public void UnitConverter_ConvertUnits_rad_to_rev_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "rad";
string targetUnitName = "rev";
- Measurement expected = new Measurement (Convert.ToDouble(0.159154942930845), "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"
-
+ #endregion
+ #region "Source as Degrees"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -5660,7 +5625,7 @@ public void UnitConverter_ConvertUnits_deg_to_rad_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "deg";
string targetUnitName = "rad";
- Measurement expected = new Measurement (Convert.ToDouble(1.74532925199433), "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);
@@ -5675,7 +5640,7 @@ public void UnitConverter_ConvertUnits_deg_to_rad_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "deg";
string targetUnitName = "rad";
- Measurement expected = new Measurement (Convert.ToDouble(0.01745329250249), "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);
@@ -5690,7 +5655,7 @@ public void UnitConverter_ConvertUnits_deg_to_grad_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "deg";
string targetUnitName = "grad";
- Measurement expected = new Measurement (Convert.ToDouble(111.111111111111), "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);
@@ -5705,7 +5670,7 @@ public void UnitConverter_ConvertUnits_deg_to_grad_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "deg";
string targetUnitName = "grad";
- Measurement expected = new Measurement (Convert.ToDouble(1.11111111), "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);
@@ -5720,7 +5685,7 @@ public void UnitConverter_ConvertUnits_deg_to_rev_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "deg";
string targetUnitName = "rev";
- Measurement expected = new Measurement (Convert.ToDouble(0.277777777777778), "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);
@@ -5735,15 +5700,13 @@ public void UnitConverter_ConvertUnits_deg_to_rev_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "deg";
string targetUnitName = "rev";
- Measurement expected = new Measurement (Convert.ToDouble(0.002777777775), "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"
-
+ #endregion
+ #region "Source as Gradians"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -5753,7 +5716,7 @@ public void UnitConverter_ConvertUnits_grad_to_rad_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "grad";
string targetUnitName = "rad";
- Measurement expected = new Measurement (Convert.ToDouble(1.5707963267949), "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);
@@ -5768,7 +5731,7 @@ public void UnitConverter_ConvertUnits_grad_to_rad_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "grad";
string targetUnitName = "rad";
- Measurement expected = new Measurement (Convert.ToDouble(0.015707963252241), "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);
@@ -5783,7 +5746,7 @@ public void UnitConverter_ConvertUnits_grad_to_deg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "grad";
string targetUnitName = "deg";
- Measurement expected = new Measurement (Convert.ToDouble(90), "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);
@@ -5798,7 +5761,7 @@ public void UnitConverter_ConvertUnits_grad_to_deg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "grad";
string targetUnitName = "deg";
- Measurement expected = new Measurement (Convert.ToDouble(0.8999999991), "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);
@@ -5813,7 +5776,7 @@ public void UnitConverter_ConvertUnits_grad_to_rev_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "grad";
string targetUnitName = "rev";
- Measurement expected = new Measurement (Convert.ToDouble(0.25), "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);
@@ -5828,15 +5791,13 @@ public void UnitConverter_ConvertUnits_grad_to_rev_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "grad";
string targetUnitName = "rev";
- Measurement expected = new Measurement (Convert.ToDouble(0.0024999999975), "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"
-
+ #endregion
+ #region "Source as Revolutions"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -5846,7 +5807,7 @@ public void UnitConverter_ConvertUnits_rev_to_rad_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "rev";
string targetUnitName = "rad";
- Measurement expected = new Measurement (Convert.ToDouble(628.318530725441), "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);
@@ -5861,7 +5822,7 @@ public void UnitConverter_ConvertUnits_rev_to_rad_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "rev";
string targetUnitName = "rad";
- Measurement expected = new Measurement (Convert.ToDouble(6.28318530097123), "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);
@@ -5876,7 +5837,7 @@ public void UnitConverter_ConvertUnits_rev_to_deg_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "rev";
string targetUnitName = "deg";
- Measurement expected = new Measurement (Convert.ToDouble(36000), "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);
@@ -5891,7 +5852,7 @@ public void UnitConverter_ConvertUnits_rev_to_deg_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "rev";
string targetUnitName = "deg";
- Measurement expected = new Measurement (Convert.ToDouble(359.99999964), "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);
@@ -5906,7 +5867,7 @@ public void UnitConverter_ConvertUnits_rev_to_grad_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "rev";
string targetUnitName = "grad";
- Measurement expected = new Measurement (Convert.ToDouble(40000), "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);
@@ -5921,18 +5882,15 @@ public void UnitConverter_ConvertUnits_rev_to_grad_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "rev";
string targetUnitName = "grad";
- Measurement expected = new Measurement (Convert.ToDouble(399.9999996), "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"
-
+ #endregion
+ #endregion
+ #region "Volume Tests"
+ #region "Source as Cubic Inches"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -5942,7 +5900,7 @@ public void UnitConverter_ConvertUnits_in3_to_ft3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in3";
string targetUnitName = "ft3";
- Measurement expected = new Measurement (Convert.ToDouble(0.05787037037037), "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);
@@ -5957,7 +5915,7 @@ public void UnitConverter_ConvertUnits_in3_to_ft3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in3";
string targetUnitName = "ft3";
- Measurement expected = new Measurement (Convert.ToDouble(0.000578703703125), "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);
@@ -5972,7 +5930,7 @@ public void UnitConverter_ConvertUnits_in3_to_yd3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in3";
string targetUnitName = "yd3";
- Measurement expected = new Measurement (Convert.ToDouble(0.002143347050754), "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);
@@ -5987,7 +5945,7 @@ public void UnitConverter_ConvertUnits_in3_to_yd3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in3";
string targetUnitName = "yd3";
- Measurement expected = new Measurement (Convert.ToDouble(2.1433470486E-05), "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);
@@ -6002,7 +5960,7 @@ public void UnitConverter_ConvertUnits_in3_to_m3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in3";
string targetUnitName = "m3";
- Measurement expected = new Measurement (Convert.ToDouble(0.0016387064), "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);
@@ -6017,7 +5975,7 @@ public void UnitConverter_ConvertUnits_in3_to_m3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in3";
string targetUnitName = "m3";
- Measurement expected = new Measurement (Convert.ToDouble(1.6387063984E-05), "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);
@@ -6032,7 +5990,7 @@ public void UnitConverter_ConvertUnits_in3_to_cc_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in3";
string targetUnitName = "cc";
- Measurement expected = new Measurement (Convert.ToDouble(1638.7064), "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);
@@ -6047,7 +6005,7 @@ public void UnitConverter_ConvertUnits_in3_to_cc_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in3";
string targetUnitName = "cc";
- Measurement expected = new Measurement (Convert.ToDouble(16.387063983613), "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);
@@ -6062,7 +6020,7 @@ public void UnitConverter_ConvertUnits_in3_to_L_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in3";
string targetUnitName = "L";
- Measurement expected = new Measurement (Convert.ToDouble(1.6387064), "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);
@@ -6077,7 +6035,7 @@ public void UnitConverter_ConvertUnits_in3_to_L_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in3";
string targetUnitName = "L";
- Measurement expected = new Measurement (Convert.ToDouble(0.016387063983613), "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);
@@ -6092,7 +6050,7 @@ public void UnitConverter_ConvertUnits_in3_to_floz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in3";
string targetUnitName = "fl oz";
- Measurement expected = new Measurement (Convert.ToDouble(55.4112554112554), "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);
@@ -6107,7 +6065,7 @@ public void UnitConverter_ConvertUnits_in3_to_floz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in3";
string targetUnitName = "fl oz";
- Measurement expected = new Measurement (Convert.ToDouble(0.554112553558442), "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);
@@ -6122,7 +6080,7 @@ public void UnitConverter_ConvertUnits_in3_to_gal_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in3";
string targetUnitName = "gal";
- Measurement expected = new Measurement (Convert.ToDouble(0.432900432900433), "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);
@@ -6137,7 +6095,7 @@ public void UnitConverter_ConvertUnits_in3_to_gal_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in3";
string targetUnitName = "gal";
- Measurement expected = new Measurement (Convert.ToDouble(0.004329004324675), "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);
@@ -6152,7 +6110,7 @@ public void UnitConverter_ConvertUnits_in3_to_pt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in3";
string targetUnitName = "pt";
- Measurement expected = new Measurement (Convert.ToDouble(3.46320346320346), "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);
@@ -6167,7 +6125,7 @@ public void UnitConverter_ConvertUnits_in3_to_pt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in3";
string targetUnitName = "pt";
- Measurement expected = new Measurement (Convert.ToDouble(0.034632034597403), "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);
@@ -6182,7 +6140,7 @@ public void UnitConverter_ConvertUnits_in3_to_qt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in3";
string targetUnitName = "qt";
- Measurement expected = new Measurement (Convert.ToDouble(1.73160173160173), "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);
@@ -6197,15 +6155,13 @@ public void UnitConverter_ConvertUnits_in3_to_qt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in3";
string targetUnitName = "qt";
- Measurement expected = new Measurement (Convert.ToDouble(0.017316017298701), "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"
-
+ #endregion
+ #region "Source as Cubic Feet"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -6215,7 +6171,7 @@ public void UnitConverter_ConvertUnits_ft3_to_in3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft3";
string targetUnitName = "in3";
- Measurement expected = new Measurement (Convert.ToDouble(172800), "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);
@@ -6230,7 +6186,7 @@ public void UnitConverter_ConvertUnits_ft3_to_in3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft3";
string targetUnitName = "in3";
- Measurement expected = new Measurement (Convert.ToDouble(1727.999998272), "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);
@@ -6245,7 +6201,7 @@ public void UnitConverter_ConvertUnits_ft3_to_yd3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft3";
string targetUnitName = "yd3";
- Measurement expected = new Measurement (Convert.ToDouble(3.7037037037037), "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);
@@ -6260,7 +6216,7 @@ public void UnitConverter_ConvertUnits_ft3_to_yd3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft3";
string targetUnitName = "yd3";
- Measurement expected = new Measurement (Convert.ToDouble(0.037037037), "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);
@@ -6275,7 +6231,7 @@ public void UnitConverter_ConvertUnits_ft3_to_m3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft3";
string targetUnitName = "m3";
- Measurement expected = new Measurement (Convert.ToDouble(2.8316846592), "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);
@@ -6290,7 +6246,7 @@ public void UnitConverter_ConvertUnits_ft3_to_m3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft3";
string targetUnitName = "m3";
- Measurement expected = new Measurement (Convert.ToDouble(0.028316846563683), "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);
@@ -6305,7 +6261,7 @@ public void UnitConverter_ConvertUnits_ft3_to_cc_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft3";
string targetUnitName = "cc";
- Measurement expected = new Measurement (Convert.ToDouble(2831684.6592), "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);
@@ -6320,7 +6276,7 @@ public void UnitConverter_ConvertUnits_ft3_to_cc_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft3";
string targetUnitName = "cc";
- Measurement expected = new Measurement (Convert.ToDouble(28316.8465636832), "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);
@@ -6335,7 +6291,7 @@ public void UnitConverter_ConvertUnits_ft3_to_L_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft3";
string targetUnitName = "L";
- Measurement expected = new Measurement (Convert.ToDouble(2831.6846592), "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);
@@ -6350,7 +6306,7 @@ public void UnitConverter_ConvertUnits_ft3_to_L_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft3";
string targetUnitName = "L";
- Measurement expected = new Measurement (Convert.ToDouble(28.3168465636832), "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);
@@ -6365,7 +6321,7 @@ public void UnitConverter_ConvertUnits_ft3_to_floz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft3";
string targetUnitName = "fl oz";
- Measurement expected = new Measurement (Convert.ToDouble(95750.6493506493), "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);
@@ -6380,7 +6336,7 @@ public void UnitConverter_ConvertUnits_ft3_to_floz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft3";
string targetUnitName = "fl oz";
- Measurement expected = new Measurement (Convert.ToDouble(957.506492548987), "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);
@@ -6395,7 +6351,7 @@ public void UnitConverter_ConvertUnits_ft3_to_gal_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft3";
string targetUnitName = "gal";
- Measurement expected = new Measurement (Convert.ToDouble(748.051948051948), "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);
@@ -6410,7 +6366,7 @@ public void UnitConverter_ConvertUnits_ft3_to_gal_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft3";
string targetUnitName = "gal";
- Measurement expected = new Measurement (Convert.ToDouble(7.48051947303896), "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);
@@ -6425,7 +6381,7 @@ public void UnitConverter_ConvertUnits_ft3_to_pt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft3";
string targetUnitName = "pt";
- Measurement expected = new Measurement (Convert.ToDouble(5984.41558441558), "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);
@@ -6440,7 +6396,7 @@ public void UnitConverter_ConvertUnits_ft3_to_pt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft3";
string targetUnitName = "pt";
- Measurement expected = new Measurement (Convert.ToDouble(59.8441557843117), "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);
@@ -6455,7 +6411,7 @@ public void UnitConverter_ConvertUnits_ft3_to_qt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft3";
string targetUnitName = "qt";
- Measurement expected = new Measurement (Convert.ToDouble(2992.20779220779), "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);
@@ -6470,15 +6426,13 @@ public void UnitConverter_ConvertUnits_ft3_to_qt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft3";
string targetUnitName = "qt";
- Measurement expected = new Measurement (Convert.ToDouble(29.9220778921558), "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"
-
+ #endregion
+ #region "Source as Cubic Yards"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -6488,7 +6442,7 @@ public void UnitConverter_ConvertUnits_yd3_to_in3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd3";
string targetUnitName = "in3";
- Measurement expected = new Measurement (Convert.ToDouble(4665600), "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);
@@ -6503,7 +6457,7 @@ public void UnitConverter_ConvertUnits_yd3_to_in3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd3";
string targetUnitName = "in3";
- Measurement expected = new Measurement (Convert.ToDouble(46655.999953344), "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);
@@ -6518,7 +6472,7 @@ public void UnitConverter_ConvertUnits_yd3_to_ft3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd3";
string targetUnitName = "ft3";
- Measurement expected = new Measurement (Convert.ToDouble(2700), "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);
@@ -6533,7 +6487,7 @@ public void UnitConverter_ConvertUnits_yd3_to_ft3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd3";
string targetUnitName = "ft3";
- Measurement expected = new Measurement (Convert.ToDouble(26.999999973), "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);
@@ -6548,7 +6502,7 @@ public void UnitConverter_ConvertUnits_yd3_to_m3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd3";
string targetUnitName = "m3";
- Measurement expected = new Measurement (Convert.ToDouble(76.4554857984), "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);
@@ -6563,7 +6517,7 @@ public void UnitConverter_ConvertUnits_yd3_to_m3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd3";
string targetUnitName = "m3";
- Measurement expected = new Measurement (Convert.ToDouble(0.764554857219445), "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);
@@ -6578,7 +6532,7 @@ public void UnitConverter_ConvertUnits_yd3_to_cc_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd3";
string targetUnitName = "cc";
- Measurement expected = new Measurement (Convert.ToDouble(76455485.7984), "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);
@@ -6593,7 +6547,7 @@ public void UnitConverter_ConvertUnits_yd3_to_cc_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd3";
string targetUnitName = "cc";
- Measurement expected = new Measurement (Convert.ToDouble(764554.857219445), "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);
@@ -6608,7 +6562,7 @@ public void UnitConverter_ConvertUnits_yd3_to_L_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd3";
string targetUnitName = "L";
- Measurement expected = new Measurement (Convert.ToDouble(76455.4857984), "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);
@@ -6623,7 +6577,7 @@ public void UnitConverter_ConvertUnits_yd3_to_L_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd3";
string targetUnitName = "L";
- Measurement expected = new Measurement (Convert.ToDouble(764.554857219445), "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);
@@ -6638,7 +6592,7 @@ public void UnitConverter_ConvertUnits_yd3_to_floz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd3";
string targetUnitName = "fl oz";
- Measurement expected = new Measurement (Convert.ToDouble(2585267.53246753), "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);
@@ -6653,7 +6607,7 @@ public void UnitConverter_ConvertUnits_yd3_to_floz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd3";
string targetUnitName = "fl oz";
- Measurement expected = new Measurement (Convert.ToDouble(25852.6752988226), "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);
@@ -6668,7 +6622,7 @@ public void UnitConverter_ConvertUnits_yd3_to_gal_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd3";
string targetUnitName = "gal";
- Measurement expected = new Measurement (Convert.ToDouble(20197.4025974026), "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);
@@ -6683,7 +6637,7 @@ public void UnitConverter_ConvertUnits_yd3_to_gal_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd3";
string targetUnitName = "gal";
- Measurement expected = new Measurement (Convert.ToDouble(201.974025772052), "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);
@@ -6698,7 +6652,7 @@ public void UnitConverter_ConvertUnits_yd3_to_pt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd3";
string targetUnitName = "pt";
- Measurement expected = new Measurement (Convert.ToDouble(161579.220779221), "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);
@@ -6713,7 +6667,7 @@ public void UnitConverter_ConvertUnits_yd3_to_pt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd3";
string targetUnitName = "pt";
- Measurement expected = new Measurement (Convert.ToDouble(1615.79220617642), "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);
@@ -6728,7 +6682,7 @@ public void UnitConverter_ConvertUnits_yd3_to_qt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd3";
string targetUnitName = "qt";
- Measurement expected = new Measurement (Convert.ToDouble(80789.6103896104), "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);
@@ -6743,15 +6697,13 @@ public void UnitConverter_ConvertUnits_yd3_to_qt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd3";
string targetUnitName = "qt";
- Measurement expected = new Measurement (Convert.ToDouble(807.896103088208), "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"
-
+ #endregion
+ #region "Source as Cubic Meters"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -6761,7 +6713,7 @@ public void UnitConverter_ConvertUnits_m3_to_in3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m3";
string targetUnitName = "in3";
- Measurement expected = new Measurement (Convert.ToDouble(6102374.40947323), "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);
@@ -6776,7 +6728,7 @@ public void UnitConverter_ConvertUnits_m3_to_in3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m3";
string targetUnitName = "in3";
- Measurement expected = new Measurement (Convert.ToDouble(61023.7440337085), "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);
@@ -6791,7 +6743,7 @@ public void UnitConverter_ConvertUnits_m3_to_ft3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m3";
string targetUnitName = "ft3";
- Measurement expected = new Measurement (Convert.ToDouble(3531.46667214886), "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);
@@ -6806,7 +6758,7 @@ public void UnitConverter_ConvertUnits_m3_to_ft3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m3";
string targetUnitName = "ft3";
- Measurement expected = new Measurement (Convert.ToDouble(35.3146666861739), "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);
@@ -6821,7 +6773,7 @@ public void UnitConverter_ConvertUnits_m3_to_yd3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m3";
string targetUnitName = "yd3";
- Measurement expected = new Measurement (Convert.ToDouble(130.795061931439), "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);
@@ -6836,7 +6788,7 @@ public void UnitConverter_ConvertUnits_m3_to_yd3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m3";
string targetUnitName = "yd3";
- Measurement expected = new Measurement (Convert.ToDouble(1.30795061800644), "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);
@@ -6851,7 +6803,7 @@ public void UnitConverter_ConvertUnits_m3_to_cc_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m3";
string targetUnitName = "cc";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -6866,7 +6818,7 @@ public void UnitConverter_ConvertUnits_m3_to_cc_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m3";
string targetUnitName = "cc";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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);
@@ -6881,7 +6833,7 @@ public void UnitConverter_ConvertUnits_m3_to_L_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m3";
string targetUnitName = "L";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -6896,7 +6848,7 @@ public void UnitConverter_ConvertUnits_m3_to_L_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m3";
string targetUnitName = "L";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -6911,7 +6863,7 @@ public void UnitConverter_ConvertUnits_m3_to_floz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m3";
string targetUnitName = "fl oz";
- Measurement expected = new Measurement (Convert.ToDouble(3381402.2701843), "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);
@@ -6926,7 +6878,7 @@ public void UnitConverter_ConvertUnits_m3_to_floz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m3";
string targetUnitName = "fl oz";
- Measurement expected = new Measurement (Convert.ToDouble(33814.022668029), "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);
@@ -6941,7 +6893,7 @@ public void UnitConverter_ConvertUnits_m3_to_gal_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m3";
string targetUnitName = "gal";
- Measurement expected = new Measurement (Convert.ToDouble(26417.2052358148), "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);
@@ -6956,7 +6908,7 @@ public void UnitConverter_ConvertUnits_m3_to_gal_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m3";
string targetUnitName = "gal";
- Measurement expected = new Measurement (Convert.ToDouble(264.172052093976), "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);
@@ -6971,7 +6923,7 @@ public void UnitConverter_ConvertUnits_m3_to_pt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m3";
string targetUnitName = "pt";
- Measurement expected = new Measurement (Convert.ToDouble(211337.641886519), "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);
@@ -6986,7 +6938,7 @@ public void UnitConverter_ConvertUnits_m3_to_pt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m3";
string targetUnitName = "pt";
- Measurement expected = new Measurement (Convert.ToDouble(2113.37641675181), "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);
@@ -7001,7 +6953,7 @@ public void UnitConverter_ConvertUnits_m3_to_qt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m3";
string targetUnitName = "qt";
- Measurement expected = new Measurement (Convert.ToDouble(105668.820943259), "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);
@@ -7016,15 +6968,13 @@ public void UnitConverter_ConvertUnits_m3_to_qt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m3";
string targetUnitName = "qt";
- Measurement expected = new Measurement (Convert.ToDouble(1056.68820837591), "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"
-
+ #endregion
+ #region "Source as Cubic Centimeters"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -7034,7 +6984,7 @@ public void UnitConverter_ConvertUnits_cc_to_in3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cc";
string targetUnitName = "in3";
- Measurement expected = new Measurement (Convert.ToDouble(6.10237440947323), "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);
@@ -7049,7 +6999,7 @@ public void UnitConverter_ConvertUnits_cc_to_in3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cc";
string targetUnitName = "in3";
- Measurement expected = new Measurement (Convert.ToDouble(0.061023744033709), "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);
@@ -7064,7 +7014,7 @@ public void UnitConverter_ConvertUnits_cc_to_ft3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cc";
string targetUnitName = "ft3";
- Measurement expected = new Measurement (Convert.ToDouble(0.003531466672149), "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);
@@ -7079,7 +7029,7 @@ public void UnitConverter_ConvertUnits_cc_to_ft3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cc";
string targetUnitName = "ft3";
- Measurement expected = new Measurement (Convert.ToDouble(3.5314666686E-05), "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);
@@ -7094,7 +7044,7 @@ public void UnitConverter_ConvertUnits_cc_to_yd3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cc";
string targetUnitName = "yd3";
- Measurement expected = new Measurement (Convert.ToDouble(0.000130795061931), "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);
@@ -7109,7 +7059,7 @@ public void UnitConverter_ConvertUnits_cc_to_yd3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cc";
string targetUnitName = "yd3";
- Measurement expected = new Measurement (Convert.ToDouble(1.307950618E-06), "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);
@@ -7124,7 +7074,7 @@ public void UnitConverter_ConvertUnits_cc_to_m3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cc";
string targetUnitName = "m3";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -7139,7 +7089,7 @@ public void UnitConverter_ConvertUnits_cc_to_m3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cc";
string targetUnitName = "m3";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -7154,7 +7104,7 @@ public void UnitConverter_ConvertUnits_cc_to_L_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cc";
string targetUnitName = "L";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -7169,7 +7119,7 @@ public void UnitConverter_ConvertUnits_cc_to_L_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cc";
string targetUnitName = "L";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -7184,7 +7134,7 @@ public void UnitConverter_ConvertUnits_cc_to_floz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cc";
string targetUnitName = "fl oz";
- Measurement expected = new Measurement (Convert.ToDouble(3.3814022701843), "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);
@@ -7199,7 +7149,7 @@ public void UnitConverter_ConvertUnits_cc_to_floz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cc";
string targetUnitName = "fl oz";
- Measurement expected = new Measurement (Convert.ToDouble(0.033814022668029), "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);
@@ -7214,7 +7164,7 @@ public void UnitConverter_ConvertUnits_cc_to_gal_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cc";
string targetUnitName = "gal";
- Measurement expected = new Measurement (Convert.ToDouble(0.026417205235815), "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);
@@ -7229,7 +7179,7 @@ public void UnitConverter_ConvertUnits_cc_to_gal_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cc";
string targetUnitName = "gal";
- Measurement expected = new Measurement (Convert.ToDouble(0.000264172052094), "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);
@@ -7244,7 +7194,7 @@ public void UnitConverter_ConvertUnits_cc_to_pt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cc";
string targetUnitName = "pt";
- Measurement expected = new Measurement (Convert.ToDouble(0.211337641886519), "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);
@@ -7259,7 +7209,7 @@ public void UnitConverter_ConvertUnits_cc_to_pt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cc";
string targetUnitName = "pt";
- Measurement expected = new Measurement (Convert.ToDouble(0.002113376416752), "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);
@@ -7274,7 +7224,7 @@ public void UnitConverter_ConvertUnits_cc_to_qt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cc";
string targetUnitName = "qt";
- Measurement expected = new Measurement (Convert.ToDouble(0.105668820943259), "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);
@@ -7289,15 +7239,13 @@ public void UnitConverter_ConvertUnits_cc_to_qt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cc";
string targetUnitName = "qt";
- Measurement expected = new Measurement (Convert.ToDouble(0.001056688208376), "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"
-
+ #endregion
+ #region "Source as Liters"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -7307,7 +7255,7 @@ public void UnitConverter_ConvertUnits_L_to_in3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "L";
string targetUnitName = "in3";
- Measurement expected = new Measurement (Convert.ToDouble(6102.37440947323), "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);
@@ -7322,7 +7270,7 @@ public void UnitConverter_ConvertUnits_L_to_in3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "L";
string targetUnitName = "in3";
- Measurement expected = new Measurement (Convert.ToDouble(61.0237440337085), "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);
@@ -7337,7 +7285,7 @@ public void UnitConverter_ConvertUnits_L_to_ft3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "L";
string targetUnitName = "ft3";
- Measurement expected = new Measurement (Convert.ToDouble(3.53146667214886), "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);
@@ -7352,7 +7300,7 @@ public void UnitConverter_ConvertUnits_L_to_ft3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "L";
string targetUnitName = "ft3";
- Measurement expected = new Measurement (Convert.ToDouble(0.035314666686174), "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);
@@ -7367,7 +7315,7 @@ public void UnitConverter_ConvertUnits_L_to_yd3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "L";
string targetUnitName = "yd3";
- Measurement expected = new Measurement (Convert.ToDouble(0.130795061931439), "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);
@@ -7382,7 +7330,7 @@ public void UnitConverter_ConvertUnits_L_to_yd3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "L";
string targetUnitName = "yd3";
- Measurement expected = new Measurement (Convert.ToDouble(0.001307950618006), "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);
@@ -7397,7 +7345,7 @@ public void UnitConverter_ConvertUnits_L_to_m3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "L";
string targetUnitName = "m3";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -7412,7 +7360,7 @@ public void UnitConverter_ConvertUnits_L_to_m3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "L";
string targetUnitName = "m3";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -7427,7 +7375,7 @@ public void UnitConverter_ConvertUnits_L_to_cc_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "L";
string targetUnitName = "cc";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -7442,7 +7390,7 @@ public void UnitConverter_ConvertUnits_L_to_cc_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "L";
string targetUnitName = "cc";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -7457,7 +7405,7 @@ public void UnitConverter_ConvertUnits_L_to_floz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "L";
string targetUnitName = "fl oz";
- Measurement expected = new Measurement (Convert.ToDouble(3381.4022701843), "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);
@@ -7472,7 +7420,7 @@ public void UnitConverter_ConvertUnits_L_to_floz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "L";
string targetUnitName = "fl oz";
- Measurement expected = new Measurement (Convert.ToDouble(33.814022668029), "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);
@@ -7487,7 +7435,7 @@ public void UnitConverter_ConvertUnits_L_to_gal_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "L";
string targetUnitName = "gal";
- Measurement expected = new Measurement (Convert.ToDouble(26.4172052358148), "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);
@@ -7502,7 +7450,7 @@ public void UnitConverter_ConvertUnits_L_to_gal_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "L";
string targetUnitName = "gal";
- Measurement expected = new Measurement (Convert.ToDouble(0.264172052093976), "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);
@@ -7517,7 +7465,7 @@ public void UnitConverter_ConvertUnits_L_to_pt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "L";
string targetUnitName = "pt";
- Measurement expected = new Measurement (Convert.ToDouble(211.337641886519), "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);
@@ -7532,7 +7480,7 @@ public void UnitConverter_ConvertUnits_L_to_pt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "L";
string targetUnitName = "pt";
- Measurement expected = new Measurement (Convert.ToDouble(2.11337641675181), "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);
@@ -7547,7 +7495,7 @@ public void UnitConverter_ConvertUnits_L_to_qt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "L";
string targetUnitName = "qt";
- Measurement expected = new Measurement (Convert.ToDouble(105.668820943259), "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);
@@ -7562,15 +7510,13 @@ public void UnitConverter_ConvertUnits_L_to_qt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "L";
string targetUnitName = "qt";
- Measurement expected = new Measurement (Convert.ToDouble(1.05668820837591), "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"
-
+ #endregion
+ #region "Source as Fluid Ounces"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -7580,7 +7526,7 @@ public void UnitConverter_ConvertUnits_floz_to_in3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "fl oz";
string targetUnitName = "in3";
- Measurement expected = new Measurement (Convert.ToDouble(180.46875), "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);
@@ -7595,7 +7541,7 @@ public void UnitConverter_ConvertUnits_floz_to_in3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "fl oz";
string targetUnitName = "in3";
- Measurement expected = new Measurement (Convert.ToDouble(1.80468749819531), "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);
@@ -7610,7 +7556,7 @@ public void UnitConverter_ConvertUnits_floz_to_ft3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "fl oz";
string targetUnitName = "ft3";
- Measurement expected = new Measurement (Convert.ToDouble(0.104437934027778), "ft3");
+ Measurement expected = new Measurement (Convert.ToDouble (0.104437934027778), "ft3");
Measurement actual = default(Measurement);
actual = target.ConvertUnits (value, currentUnitName, targetUnitName);
@@ -7626,7 +7572,7 @@ public void UnitConverter_ConvertUnits_floz_to_ft3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "fl oz";
string targetUnitName = "ft3";
- Measurement expected = new Measurement (Convert.ToDouble(0.001044379339233), "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);
@@ -7641,7 +7587,7 @@ public void UnitConverter_ConvertUnits_floz_to_yd3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "fl oz";
string targetUnitName = "yd3";
- Measurement expected = new Measurement (Convert.ToDouble(0.003868071630658), "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);
@@ -7656,7 +7602,7 @@ public void UnitConverter_ConvertUnits_floz_to_yd3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "fl oz";
string targetUnitName = "yd3";
- Measurement expected = new Measurement (Convert.ToDouble(3.8680716268E-05), "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);
@@ -7671,7 +7617,7 @@ public void UnitConverter_ConvertUnits_floz_to_m3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "fl oz";
string targetUnitName = "m3";
- Measurement expected = new Measurement (Convert.ToDouble(0.00295735295625), "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);
@@ -7686,7 +7632,7 @@ public void UnitConverter_ConvertUnits_floz_to_m3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "fl oz";
string targetUnitName = "m3";
- Measurement expected = new Measurement (Convert.ToDouble(2.9573529533E-05), "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);
@@ -7701,7 +7647,7 @@ public void UnitConverter_ConvertUnits_floz_to_cc_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "fl oz";
string targetUnitName = "cc";
- Measurement expected = new Measurement (Convert.ToDouble(2957.35295625), "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);
@@ -7716,7 +7662,7 @@ public void UnitConverter_ConvertUnits_floz_to_cc_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "fl oz";
string targetUnitName = "cc";
- Measurement expected = new Measurement (Convert.ToDouble(29.5735295329265), "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);
@@ -7731,7 +7677,7 @@ public void UnitConverter_ConvertUnits_floz_to_L_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "fl oz";
string targetUnitName = "L";
- Measurement expected = new Measurement (Convert.ToDouble(2.95735295625), "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);
@@ -7746,7 +7692,7 @@ public void UnitConverter_ConvertUnits_floz_to_L_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "fl oz";
string targetUnitName = "L";
- Measurement expected = new Measurement (Convert.ToDouble(0.029573529532926), "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);
@@ -7761,7 +7707,7 @@ public void UnitConverter_ConvertUnits_floz_to_gal_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "fl oz";
string targetUnitName = "gal";
- Measurement expected = new Measurement (Convert.ToDouble(0.78125), "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);
@@ -7776,7 +7722,7 @@ public void UnitConverter_ConvertUnits_floz_to_gal_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "fl oz";
string targetUnitName = "gal";
- Measurement expected = new Measurement (Convert.ToDouble(0.007812499992188), "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);
@@ -7791,7 +7737,7 @@ public void UnitConverter_ConvertUnits_floz_to_pt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "fl oz";
string targetUnitName = "pt";
- Measurement expected = new Measurement (Convert.ToDouble(6.25), "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);
@@ -7806,7 +7752,7 @@ public void UnitConverter_ConvertUnits_floz_to_pt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "fl oz";
string targetUnitName = "pt";
- Measurement expected = new Measurement (Convert.ToDouble(0.0624999999375), "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);
@@ -7821,7 +7767,7 @@ public void UnitConverter_ConvertUnits_floz_to_qt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "fl oz";
string targetUnitName = "qt";
- Measurement expected = new Measurement (Convert.ToDouble(3.125), "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);
@@ -7836,15 +7782,13 @@ public void UnitConverter_ConvertUnits_floz_to_qt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "fl oz";
string targetUnitName = "qt";
- Measurement expected = new Measurement (Convert.ToDouble(0.03124999996875), "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"
-
+ #endregion
+ #region "Source as Gallons"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -7854,7 +7798,7 @@ public void UnitConverter_ConvertUnits_gal_to_in3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "gal";
string targetUnitName = "in3";
- Measurement expected = new Measurement (Convert.ToDouble(23100), "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);
@@ -7869,7 +7813,7 @@ public void UnitConverter_ConvertUnits_gal_to_in3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "gal";
string targetUnitName = "in3";
- Measurement expected = new Measurement (Convert.ToDouble(230.999999769), "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);
@@ -7884,7 +7828,7 @@ public void UnitConverter_ConvertUnits_gal_to_ft3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "gal";
string targetUnitName = "ft3";
- Measurement expected = new Measurement (Convert.ToDouble(13.3680555555556), "ft3");
+ Measurement expected = new Measurement (Convert.ToDouble (13.3680555555556), "ft3");
Measurement actual = default(Measurement);
actual = target.ConvertUnits (value, currentUnitName, targetUnitName);
@@ -7900,7 +7844,7 @@ public void UnitConverter_ConvertUnits_gal_to_ft3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "gal";
string targetUnitName = "ft3";
- Measurement expected = new Measurement (Convert.ToDouble(0.133680555421875), "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);
@@ -7915,7 +7859,7 @@ public void UnitConverter_ConvertUnits_gal_to_yd3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "gal";
string targetUnitName = "yd3";
- Measurement expected = new Measurement (Convert.ToDouble(0.49511316872428), "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);
@@ -7930,7 +7874,7 @@ public void UnitConverter_ConvertUnits_gal_to_yd3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "gal";
string targetUnitName = "yd3";
- Measurement expected = new Measurement (Convert.ToDouble(0.004951131682292), "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);
@@ -7945,7 +7889,7 @@ public void UnitConverter_ConvertUnits_gal_to_m3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "gal";
string targetUnitName = "m3";
- Measurement expected = new Measurement (Convert.ToDouble(0.3785411784), "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);
@@ -7960,7 +7904,7 @@ public void UnitConverter_ConvertUnits_gal_to_m3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "gal";
string targetUnitName = "m3";
- Measurement expected = new Measurement (Convert.ToDouble(0.003785411780215), "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);
@@ -7975,7 +7919,7 @@ public void UnitConverter_ConvertUnits_gal_to_cc_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "gal";
string targetUnitName = "cc";
- Measurement expected = new Measurement (Convert.ToDouble(378541.1784), "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);
@@ -7990,7 +7934,7 @@ public void UnitConverter_ConvertUnits_gal_to_cc_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "gal";
string targetUnitName = "cc";
- Measurement expected = new Measurement (Convert.ToDouble(3785.41178021459), "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);
@@ -8005,7 +7949,7 @@ public void UnitConverter_ConvertUnits_gal_to_L_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "gal";
string targetUnitName = "L";
- Measurement expected = new Measurement (Convert.ToDouble(378.5411784), "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);
@@ -8020,7 +7964,7 @@ public void UnitConverter_ConvertUnits_gal_to_L_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "gal";
string targetUnitName = "L";
- Measurement expected = new Measurement (Convert.ToDouble(3.78541178021459), "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);
@@ -8035,7 +7979,7 @@ public void UnitConverter_ConvertUnits_gal_to_floz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "gal";
string targetUnitName = "fl oz";
- Measurement expected = new Measurement (Convert.ToDouble(12800), "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);
@@ -8050,7 +7994,7 @@ public void UnitConverter_ConvertUnits_gal_to_floz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "gal";
string targetUnitName = "fl oz";
- Measurement expected = new Measurement (Convert.ToDouble(127.999999872), "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);
@@ -8065,7 +8009,7 @@ public void UnitConverter_ConvertUnits_gal_to_pt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "gal";
string targetUnitName = "pt";
- Measurement expected = new Measurement (Convert.ToDouble(800), "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);
@@ -8080,7 +8024,7 @@ public void UnitConverter_ConvertUnits_gal_to_pt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "gal";
string targetUnitName = "pt";
- Measurement expected = new Measurement (Convert.ToDouble(7.999999992), "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);
@@ -8095,7 +8039,7 @@ public void UnitConverter_ConvertUnits_gal_to_qt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "gal";
string targetUnitName = "qt";
- Measurement expected = new Measurement (Convert.ToDouble(400), "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);
@@ -8110,15 +8054,13 @@ public void UnitConverter_ConvertUnits_gal_to_qt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "gal";
string targetUnitName = "qt";
- Measurement expected = new Measurement (Convert.ToDouble(3.999999996), "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"
-
+ #endregion
+ #region "Source as Pints"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -8128,7 +8070,7 @@ public void UnitConverter_ConvertUnits_pt_to_in3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "pt";
string targetUnitName = "in3";
- Measurement expected = new Measurement (Convert.ToDouble(2887.5), "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);
@@ -8143,7 +8085,7 @@ public void UnitConverter_ConvertUnits_pt_to_in3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "pt";
string targetUnitName = "in3";
- Measurement expected = new Measurement (Convert.ToDouble(28.874999971125), "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);
@@ -8158,7 +8100,7 @@ public void UnitConverter_ConvertUnits_pt_to_ft3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "pt";
string targetUnitName = "ft3";
- Measurement expected = new Measurement (Convert.ToDouble(1.67100694444444), "ft3");
+ Measurement expected = new Measurement (Convert.ToDouble (1.67100694444444), "ft3");
Measurement actual = default(Measurement);
actual = target.ConvertUnits (value, currentUnitName, targetUnitName);
@@ -8174,7 +8116,7 @@ public void UnitConverter_ConvertUnits_pt_to_ft3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "pt";
string targetUnitName = "ft3";
- Measurement expected = new Measurement (Convert.ToDouble(0.016710069427734), "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);
@@ -8189,7 +8131,7 @@ public void UnitConverter_ConvertUnits_pt_to_yd3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "pt";
string targetUnitName = "yd3";
- Measurement expected = new Measurement (Convert.ToDouble(0.061889146090535), "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);
@@ -8204,7 +8146,7 @@ public void UnitConverter_ConvertUnits_pt_to_yd3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "pt";
string targetUnitName = "yd3";
- Measurement expected = new Measurement (Convert.ToDouble(0.000618891460286), "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);
@@ -8219,7 +8161,7 @@ public void UnitConverter_ConvertUnits_pt_to_m3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "pt";
string targetUnitName = "m3";
- Measurement expected = new Measurement (Convert.ToDouble(0.0473176473), "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);
@@ -8234,7 +8176,7 @@ public void UnitConverter_ConvertUnits_pt_to_m3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "pt";
string targetUnitName = "m3";
- Measurement expected = new Measurement (Convert.ToDouble(0.000473176472527), "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);
@@ -8249,7 +8191,7 @@ public void UnitConverter_ConvertUnits_pt_to_cc_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "pt";
string targetUnitName = "cc";
- Measurement expected = new Measurement (Convert.ToDouble(47317.6473), "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);
@@ -8264,7 +8206,7 @@ public void UnitConverter_ConvertUnits_pt_to_cc_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "pt";
string targetUnitName = "cc";
- Measurement expected = new Measurement (Convert.ToDouble(473.176472526824), "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);
@@ -8279,7 +8221,7 @@ public void UnitConverter_ConvertUnits_pt_to_L_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "pt";
string targetUnitName = "L";
- Measurement expected = new Measurement (Convert.ToDouble(47.3176473), "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);
@@ -8294,7 +8236,7 @@ public void UnitConverter_ConvertUnits_pt_to_L_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "pt";
string targetUnitName = "L";
- Measurement expected = new Measurement (Convert.ToDouble(0.473176472526824), "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);
@@ -8309,7 +8251,7 @@ public void UnitConverter_ConvertUnits_pt_to_floz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "pt";
string targetUnitName = "fl oz";
- Measurement expected = new Measurement (Convert.ToDouble(1600), "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);
@@ -8324,7 +8266,7 @@ public void UnitConverter_ConvertUnits_pt_to_floz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "pt";
string targetUnitName = "fl oz";
- Measurement expected = new Measurement (Convert.ToDouble(15.999999984), "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);
@@ -8339,7 +8281,7 @@ public void UnitConverter_ConvertUnits_pt_to_gal_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "pt";
string targetUnitName = "gal";
- Measurement expected = new Measurement (Convert.ToDouble(12.5), "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);
@@ -8354,7 +8296,7 @@ public void UnitConverter_ConvertUnits_pt_to_gal_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "pt";
string targetUnitName = "gal";
- Measurement expected = new Measurement (Convert.ToDouble(0.124999999875), "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);
@@ -8369,7 +8311,7 @@ public void UnitConverter_ConvertUnits_pt_to_qt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "pt";
string targetUnitName = "qt";
- Measurement expected = new Measurement (Convert.ToDouble(50), "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);
@@ -8384,15 +8326,13 @@ public void UnitConverter_ConvertUnits_pt_to_qt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "pt";
string targetUnitName = "qt";
- Measurement expected = new Measurement (Convert.ToDouble(0.4999999995), "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"
-
+ #endregion
+ #region "Source as Quarts"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -8402,7 +8342,7 @@ public void UnitConverter_ConvertUnits_qt_to_in3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "qt";
string targetUnitName = "in3";
- Measurement expected = new Measurement (Convert.ToDouble(5775), "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);
@@ -8417,7 +8357,7 @@ public void UnitConverter_ConvertUnits_qt_to_in3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "qt";
string targetUnitName = "in3";
- Measurement expected = new Measurement (Convert.ToDouble(57.74999994225), "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);
@@ -8432,7 +8372,7 @@ public void UnitConverter_ConvertUnits_qt_to_ft3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "qt";
string targetUnitName = "ft3";
- Measurement expected = new Measurement (Convert.ToDouble(3.34201388888889), "ft3");
+ Measurement expected = new Measurement (Convert.ToDouble (3.34201388888889), "ft3");
Measurement actual = default(Measurement);
actual = target.ConvertUnits (value, currentUnitName, targetUnitName);
@@ -8448,7 +8388,7 @@ public void UnitConverter_ConvertUnits_qt_to_ft3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "qt";
string targetUnitName = "ft3";
- Measurement expected = new Measurement (Convert.ToDouble(0.033420138855469), "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);
@@ -8463,7 +8403,7 @@ public void UnitConverter_ConvertUnits_qt_to_yd3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "qt";
string targetUnitName = "yd3";
- Measurement expected = new Measurement (Convert.ToDouble(0.12377829218107), "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);
@@ -8478,7 +8418,7 @@ public void UnitConverter_ConvertUnits_qt_to_yd3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "qt";
string targetUnitName = "yd3";
- Measurement expected = new Measurement (Convert.ToDouble(0.001237782920573), "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);
@@ -8493,7 +8433,7 @@ public void UnitConverter_ConvertUnits_qt_to_m3_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "qt";
string targetUnitName = "m3";
- Measurement expected = new Measurement (Convert.ToDouble(0.0946352946), "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);
@@ -8508,7 +8448,7 @@ public void UnitConverter_ConvertUnits_qt_to_m3_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "qt";
string targetUnitName = "m3";
- Measurement expected = new Measurement (Convert.ToDouble(0.000946352945054), "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);
@@ -8523,7 +8463,7 @@ public void UnitConverter_ConvertUnits_qt_to_cc_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "qt";
string targetUnitName = "cc";
- Measurement expected = new Measurement (Convert.ToDouble(94635.2946), "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);
@@ -8538,7 +8478,7 @@ public void UnitConverter_ConvertUnits_qt_to_cc_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "qt";
string targetUnitName = "cc";
- Measurement expected = new Measurement (Convert.ToDouble(946.352945053647), "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);
@@ -8553,7 +8493,7 @@ public void UnitConverter_ConvertUnits_qt_to_L_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "qt";
string targetUnitName = "L";
- Measurement expected = new Measurement (Convert.ToDouble(94.6352946), "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);
@@ -8568,7 +8508,7 @@ public void UnitConverter_ConvertUnits_qt_to_L_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "qt";
string targetUnitName = "L";
- Measurement expected = new Measurement (Convert.ToDouble(0.946352945053647), "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);
@@ -8583,7 +8523,7 @@ public void UnitConverter_ConvertUnits_qt_to_floz_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "qt";
string targetUnitName = "fl oz";
- Measurement expected = new Measurement (Convert.ToDouble(3200), "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);
@@ -8598,7 +8538,7 @@ public void UnitConverter_ConvertUnits_qt_to_floz_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "qt";
string targetUnitName = "fl oz";
- Measurement expected = new Measurement (Convert.ToDouble(31.999999968), "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);
@@ -8613,7 +8553,7 @@ public void UnitConverter_ConvertUnits_qt_to_gal_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "qt";
string targetUnitName = "gal";
- Measurement expected = new Measurement (Convert.ToDouble(25), "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);
@@ -8628,7 +8568,7 @@ public void UnitConverter_ConvertUnits_qt_to_gal_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "qt";
string targetUnitName = "gal";
- Measurement expected = new Measurement (Convert.ToDouble(0.24999999975), "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);
@@ -8643,7 +8583,7 @@ public void UnitConverter_ConvertUnits_qt_to_pt_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "qt";
string targetUnitName = "pt";
- Measurement expected = new Measurement (Convert.ToDouble(200), "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);
@@ -8658,13 +8598,13 @@ public void UnitConverter_ConvertUnits_qt_to_pt_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "qt";
string targetUnitName = "pt";
- Measurement expected = new Measurement (Convert.ToDouble(1.999999998), "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
+ #endregion
+ #endregion
+ #endregion
}
}
diff --git a/Cubico.Tests/UnitConverterTest4.cs b/Cubico.Tests/UnitConverterTest4.cs
index 37fa844..3b7a596 100644
--- a/Cubico.Tests/UnitConverterTest4.cs
+++ b/Cubico.Tests/UnitConverterTest4.cs
@@ -5,21 +5,18 @@
namespace Cubico.Tests
{
[TestFixture]
- public class UnitConverterTest4
+ public class UnitConverterTest4
{
TestContext testContextInstance;
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 "UnitConverter.ConvertUnits"
- #region "Area Tests"
- #region "Source as Square Meters"
-
+ #region "UnitConverter.ConvertUnits"
+ #region "Area Tests"
+ #region "Source as Square Meters"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -29,7 +26,7 @@ public void UnitConverter_ConvertUnits_m2_to_ft2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m2";
string targetUnitName = "ft2";
- Measurement expected = new Measurement (Convert.ToDouble(1076.39104167097), "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);
@@ -44,7 +41,7 @@ public void UnitConverter_ConvertUnits_m2_to_ft2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m2";
string targetUnitName = "ft2";
- Measurement expected = new Measurement (Convert.ToDouble(10.7639104059458), "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);
@@ -59,7 +56,7 @@ public void UnitConverter_ConvertUnits_m2_to_mi2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m2";
string targetUnitName = "mi2";
- Measurement expected = new Measurement (Convert.ToDouble(3.8610215854E-05), "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);
@@ -74,7 +71,7 @@ public void UnitConverter_ConvertUnits_m2_to_mi2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m2";
string targetUnitName = "mi2";
- Measurement expected = new Measurement (Convert.ToDouble(3.86102158E-07), "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);
@@ -89,7 +86,7 @@ public void UnitConverter_ConvertUnits_m2_to_acre_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m2";
string targetUnitName = "acre";
- Measurement expected = new Measurement (Convert.ToDouble(0.024710538146717), "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);
@@ -104,7 +101,7 @@ public void UnitConverter_ConvertUnits_m2_to_acre_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m2";
string targetUnitName = "acre";
- Measurement expected = new Measurement (Convert.ToDouble(0.00024710538122), "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);
@@ -119,7 +116,7 @@ public void UnitConverter_ConvertUnits_m2_to_in2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m2";
string targetUnitName = "in2";
- Measurement expected = new Measurement (Convert.ToDouble(155000.31000062), "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);
@@ -134,7 +131,7 @@ public void UnitConverter_ConvertUnits_m2_to_in2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m2";
string targetUnitName = "in2";
- Measurement expected = new Measurement (Convert.ToDouble(1550.0030984562), "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);
@@ -149,7 +146,7 @@ public void UnitConverter_ConvertUnits_m2_to_cm2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m2";
string targetUnitName = "cm2";
- Measurement expected = new Measurement (Convert.ToDouble(1000000), "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);
@@ -164,7 +161,7 @@ public void UnitConverter_ConvertUnits_m2_to_cm2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m2";
string targetUnitName = "cm2";
- Measurement expected = new Measurement (Convert.ToDouble(9999.99999), "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);
@@ -179,7 +176,7 @@ public void UnitConverter_ConvertUnits_m2_to_yd2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m2";
string targetUnitName = "yd2";
- Measurement expected = new Measurement (Convert.ToDouble(119.599004630108), "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);
@@ -194,7 +191,7 @@ public void UnitConverter_ConvertUnits_m2_to_yd2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m2";
string targetUnitName = "yd2";
- Measurement expected = new Measurement (Convert.ToDouble(1.19599004510509), "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);
@@ -209,7 +206,7 @@ public void UnitConverter_ConvertUnits_m2_to_km2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m2";
string targetUnitName = "km2";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -224,7 +221,7 @@ public void UnitConverter_ConvertUnits_m2_to_km2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m2";
string targetUnitName = "km2";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -239,7 +236,7 @@ public void UnitConverter_ConvertUnits_m2_to_ha_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "m2";
string targetUnitName = "ha";
- Measurement expected = new Measurement (Convert.ToDouble(0.01), "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);
@@ -254,15 +251,13 @@ public void UnitConverter_ConvertUnits_m2_to_ha_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "m2";
string targetUnitName = "ha";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-05), "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"
-
+ #endregion
+ #region "Source as Square Feet"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -272,7 +267,7 @@ public void UnitConverter_ConvertUnits_ft2_to_m2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft2";
string targetUnitName = "m2";
- Measurement expected = new Measurement (Convert.ToDouble(9.290304), "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);
@@ -287,7 +282,7 @@ public void UnitConverter_ConvertUnits_ft2_to_m2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft2";
string targetUnitName = "m2";
- Measurement expected = new Measurement (Convert.ToDouble(0.092903039907097), "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);
@@ -302,7 +297,7 @@ public void UnitConverter_ConvertUnits_ft2_to_mi2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft2";
string targetUnitName = "mi2";
- Measurement expected = new Measurement (Convert.ToDouble(3.587006428E-06), "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);
@@ -317,7 +312,7 @@ public void UnitConverter_ConvertUnits_ft2_to_mi2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft2";
string targetUnitName = "mi2";
- Measurement expected = new Measurement (Convert.ToDouble(3.5870064E-08), "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);
@@ -332,7 +327,7 @@ public void UnitConverter_ConvertUnits_ft2_to_acre_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft2";
string targetUnitName = "acre";
- Measurement expected = new Measurement (Convert.ToDouble(0.002295684113866), "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);
@@ -347,7 +342,7 @@ public void UnitConverter_ConvertUnits_ft2_to_acre_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft2";
string targetUnitName = "acre";
- Measurement expected = new Measurement (Convert.ToDouble(2.2956841116E-05), "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);
@@ -362,7 +357,7 @@ public void UnitConverter_ConvertUnits_ft2_to_in2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft2";
string targetUnitName = "in2";
- Measurement expected = new Measurement (Convert.ToDouble(14400), "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);
@@ -377,7 +372,7 @@ public void UnitConverter_ConvertUnits_ft2_to_in2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft2";
string targetUnitName = "in2";
- Measurement expected = new Measurement (Convert.ToDouble(143.999999856), "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);
@@ -392,7 +387,7 @@ public void UnitConverter_ConvertUnits_ft2_to_cm2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft2";
string targetUnitName = "cm2";
- Measurement expected = new Measurement (Convert.ToDouble(92903.04), "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);
@@ -407,7 +402,7 @@ public void UnitConverter_ConvertUnits_ft2_to_cm2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft2";
string targetUnitName = "cm2";
- Measurement expected = new Measurement (Convert.ToDouble(929.03039907097), "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);
@@ -422,7 +417,7 @@ public void UnitConverter_ConvertUnits_ft2_to_yd2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft2";
string targetUnitName = "yd2";
- Measurement expected = new Measurement (Convert.ToDouble(11.1111111111111), "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);
@@ -437,7 +432,7 @@ public void UnitConverter_ConvertUnits_ft2_to_yd2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft2";
string targetUnitName = "yd2";
- Measurement expected = new Measurement (Convert.ToDouble(0.111111111), "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);
@@ -452,7 +447,7 @@ public void UnitConverter_ConvertUnits_ft2_to_km2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft2";
string targetUnitName = "km2";
- Measurement expected = new Measurement (Convert.ToDouble(9.290304E-06), "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);
@@ -467,7 +462,7 @@ public void UnitConverter_ConvertUnits_ft2_to_km2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft2";
string targetUnitName = "km2";
- Measurement expected = new Measurement (Convert.ToDouble(9.290304E-08), "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);
@@ -482,7 +477,7 @@ public void UnitConverter_ConvertUnits_ft2_to_ha_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ft2";
string targetUnitName = "ha";
- Measurement expected = new Measurement (Convert.ToDouble(0.0009290304), "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);
@@ -497,15 +492,13 @@ public void UnitConverter_ConvertUnits_ft2_to_ha_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ft2";
string targetUnitName = "ha";
- Measurement expected = new Measurement (Convert.ToDouble(9.290303991E-06), "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"
-
+ #endregion
+ #region "Source as Square Miles"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -515,7 +508,7 @@ public void UnitConverter_ConvertUnits_mi2_to_m2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi2";
string targetUnitName = "m2";
- Measurement expected = new Measurement (Convert.ToDouble(258998811.0336), "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);
@@ -530,7 +523,7 @@ public void UnitConverter_ConvertUnits_mi2_to_m2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi2";
string targetUnitName = "m2";
- Measurement expected = new Measurement (Convert.ToDouble(2589988.10774601), "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);
@@ -545,7 +538,7 @@ public void UnitConverter_ConvertUnits_mi2_to_ft2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi2";
string targetUnitName = "ft2";
- Measurement expected = new Measurement (Convert.ToDouble(2787840000L), "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);
@@ -560,7 +553,7 @@ public void UnitConverter_ConvertUnits_mi2_to_ft2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi2";
string targetUnitName = "ft2";
- Measurement expected = new Measurement (Convert.ToDouble(27878399.9721216), "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);
@@ -575,7 +568,7 @@ public void UnitConverter_ConvertUnits_mi2_to_acre_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi2";
string targetUnitName = "acre";
- Measurement expected = new Measurement (Convert.ToDouble(64000), "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);
@@ -590,7 +583,7 @@ public void UnitConverter_ConvertUnits_mi2_to_acre_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi2";
string targetUnitName = "acre";
- Measurement expected = new Measurement (Convert.ToDouble(639.99999936), "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);
@@ -605,7 +598,7 @@ public void UnitConverter_ConvertUnits_mi2_to_in2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi2";
string targetUnitName = "in2";
- Measurement expected = new Measurement (Convert.ToDouble(401448960000L), "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);
@@ -620,7 +613,7 @@ public void UnitConverter_ConvertUnits_mi2_to_in2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi2";
string targetUnitName = "in2";
- Measurement expected = new Measurement (Convert.ToDouble(4014489595.98551), "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);
@@ -635,7 +628,7 @@ public void UnitConverter_ConvertUnits_mi2_to_cm2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi2";
string targetUnitName = "cm2";
- Measurement expected = new Measurement (Convert.ToDouble(2589988110336L), "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);
@@ -650,7 +643,7 @@ public void UnitConverter_ConvertUnits_mi2_to_cm2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi2";
string targetUnitName = "cm2";
- Measurement expected = new Measurement (Convert.ToDouble(25899881077.46), "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);
@@ -665,7 +658,7 @@ public void UnitConverter_ConvertUnits_mi2_to_yd2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi2";
string targetUnitName = "yd2";
- Measurement expected = new Measurement (Convert.ToDouble(309760000), "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);
@@ -680,7 +673,7 @@ public void UnitConverter_ConvertUnits_mi2_to_yd2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi2";
string targetUnitName = "yd2";
- Measurement expected = new Measurement (Convert.ToDouble(3097599.9969024), "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);
@@ -695,7 +688,7 @@ public void UnitConverter_ConvertUnits_mi2_to_km2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi2";
string targetUnitName = "km2";
- Measurement expected = new Measurement (Convert.ToDouble(258.9988110336), "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);
@@ -710,7 +703,7 @@ public void UnitConverter_ConvertUnits_mi2_to_km2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi2";
string targetUnitName = "km2";
- Measurement expected = new Measurement (Convert.ToDouble(2.589988107746), "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);
@@ -725,7 +718,7 @@ public void UnitConverter_ConvertUnits_mi2_to_ha_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mi2";
string targetUnitName = "ha";
- Measurement expected = new Measurement (Convert.ToDouble(25899.88110336), "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);
@@ -741,15 +734,13 @@ public void UnitConverter_ConvertUnits_mi2_to_ha_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mi2";
string targetUnitName = "ha";
- Measurement expected = new Measurement (Convert.ToDouble(258.998810774601), "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"
-
+ #endregion
+ #region "Source as Acres"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -759,7 +750,7 @@ public void UnitConverter_ConvertUnits_acre_to_m2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "acre";
string targetUnitName = "m2";
- Measurement expected = new Measurement (Convert.ToDouble(404685.64224), "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);
@@ -774,7 +765,7 @@ public void UnitConverter_ConvertUnits_acre_to_m2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "acre";
string targetUnitName = "m2";
- Measurement expected = new Measurement (Convert.ToDouble(4046.85641835314), "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);
@@ -789,7 +780,7 @@ public void UnitConverter_ConvertUnits_acre_to_ft2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "acre";
string targetUnitName = "ft2";
- Measurement expected = new Measurement (Convert.ToDouble(4356000), "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);
@@ -804,7 +795,7 @@ public void UnitConverter_ConvertUnits_acre_to_ft2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "acre";
string targetUnitName = "ft2";
- Measurement expected = new Measurement (Convert.ToDouble(43559.99995644), "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);
@@ -819,7 +810,7 @@ public void UnitConverter_ConvertUnits_acre_to_mi2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "acre";
string targetUnitName = "mi2";
- Measurement expected = new Measurement (Convert.ToDouble(0.15625), "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);
@@ -834,7 +825,7 @@ public void UnitConverter_ConvertUnits_acre_to_mi2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "acre";
string targetUnitName = "mi2";
- Measurement expected = new Measurement (Convert.ToDouble(0.001562499998438), "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);
@@ -849,7 +840,7 @@ public void UnitConverter_ConvertUnits_acre_to_in2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "acre";
string targetUnitName = "in2";
- Measurement expected = new Measurement (Convert.ToDouble(627264000), "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);
@@ -864,7 +855,7 @@ public void UnitConverter_ConvertUnits_acre_to_in2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "acre";
string targetUnitName = "in2";
- Measurement expected = new Measurement (Convert.ToDouble(6272639.99372736), "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);
@@ -879,7 +870,7 @@ public void UnitConverter_ConvertUnits_acre_to_cm2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "acre";
string targetUnitName = "cm2";
- Measurement expected = new Measurement (Convert.ToDouble(4046856422.4), "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);
@@ -894,7 +885,7 @@ public void UnitConverter_ConvertUnits_acre_to_cm2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "acre";
string targetUnitName = "cm2";
- Measurement expected = new Measurement (Convert.ToDouble(40468564.1835314), "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);
@@ -909,7 +900,7 @@ public void UnitConverter_ConvertUnits_acre_to_yd2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "acre";
string targetUnitName = "yd2";
- Measurement expected = new Measurement (Convert.ToDouble(484000), "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);
@@ -924,7 +915,7 @@ public void UnitConverter_ConvertUnits_acre_to_yd2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "acre";
string targetUnitName = "yd2";
- Measurement expected = new Measurement (Convert.ToDouble(4839.99999516), "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);
@@ -939,7 +930,7 @@ public void UnitConverter_ConvertUnits_acre_to_km2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "acre";
string targetUnitName = "km2";
- Measurement expected = new Measurement (Convert.ToDouble(0.40468564224), "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);
@@ -954,7 +945,7 @@ public void UnitConverter_ConvertUnits_acre_to_km2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "acre";
string targetUnitName = "km2";
- Measurement expected = new Measurement (Convert.ToDouble(0.004046856418353), "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);
@@ -969,7 +960,7 @@ public void UnitConverter_ConvertUnits_acre_to_ha_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "acre";
string targetUnitName = "ha";
- Measurement expected = new Measurement (Convert.ToDouble(40.468564224), "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);
@@ -985,15 +976,13 @@ public void UnitConverter_ConvertUnits_acre_to_ha_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "acre";
string targetUnitName = "ha";
- Measurement expected = new Measurement (Convert.ToDouble(0.404685641835314), "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"
-
+ #endregion
+ #region "Source as Square Inches"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -1003,7 +992,7 @@ public void UnitConverter_ConvertUnits_in2_to_m2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in2";
string targetUnitName = "m2";
- Measurement expected = new Measurement (Convert.ToDouble(0.064516), "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);
@@ -1018,7 +1007,7 @@ public void UnitConverter_ConvertUnits_in2_to_m2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in2";
string targetUnitName = "m2";
- Measurement expected = new Measurement (Convert.ToDouble(0.000645159999355), "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);
@@ -1033,7 +1022,7 @@ public void UnitConverter_ConvertUnits_in2_to_ft2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in2";
string targetUnitName = "ft2";
- Measurement expected = new Measurement (Convert.ToDouble(0.694444444444444), "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);
@@ -1048,7 +1037,7 @@ public void UnitConverter_ConvertUnits_in2_to_ft2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in2";
string targetUnitName = "ft2";
- Measurement expected = new Measurement (Convert.ToDouble(0.0069444444375), "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);
@@ -1063,7 +1052,7 @@ public void UnitConverter_ConvertUnits_in2_to_mi2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in2";
string targetUnitName = "mi2";
- Measurement expected = new Measurement (Convert.ToDouble(2.4909767E-08), "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);
@@ -1078,7 +1067,7 @@ public void UnitConverter_ConvertUnits_in2_to_mi2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in2";
string targetUnitName = "mi2";
- Measurement expected = new Measurement (Convert.ToDouble(2.49098E-10), "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);
@@ -1093,7 +1082,7 @@ public void UnitConverter_ConvertUnits_in2_to_acre_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in2";
string targetUnitName = "acre";
- Measurement expected = new Measurement (Convert.ToDouble(1.5942250791E-05), "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);
@@ -1108,7 +1097,7 @@ public void UnitConverter_ConvertUnits_in2_to_acre_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in2";
string targetUnitName = "acre";
- Measurement expected = new Measurement (Convert.ToDouble(1.59422508E-07), "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);
@@ -1123,7 +1112,7 @@ public void UnitConverter_ConvertUnits_in2_to_cm2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in2";
string targetUnitName = "cm2";
- Measurement expected = new Measurement (Convert.ToDouble(645.16), "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);
@@ -1138,7 +1127,7 @@ public void UnitConverter_ConvertUnits_in2_to_cm2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in2";
string targetUnitName = "cm2";
- Measurement expected = new Measurement (Convert.ToDouble(6.4515999935484), "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);
@@ -1153,7 +1142,7 @@ public void UnitConverter_ConvertUnits_in2_to_yd2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in2";
string targetUnitName = "yd2";
- Measurement expected = new Measurement (Convert.ToDouble(0.07716049382716), "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);
@@ -1168,7 +1157,7 @@ public void UnitConverter_ConvertUnits_in2_to_yd2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in2";
string targetUnitName = "yd2";
- Measurement expected = new Measurement (Convert.ToDouble(0.0007716049375), "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);
@@ -1183,7 +1172,7 @@ public void UnitConverter_ConvertUnits_in2_to_km2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in2";
string targetUnitName = "km2";
- Measurement expected = new Measurement (Convert.ToDouble(6.4516E-08), "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);
@@ -1198,7 +1187,7 @@ public void UnitConverter_ConvertUnits_in2_to_km2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in2";
string targetUnitName = "km2";
- Measurement expected = new Measurement (Convert.ToDouble(6.4516E-10), "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);
@@ -1213,7 +1202,7 @@ public void UnitConverter_ConvertUnits_in2_to_ha_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "in2";
string targetUnitName = "ha";
- Measurement expected = new Measurement (Convert.ToDouble(6.4516E-06), "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);
@@ -1228,15 +1217,13 @@ public void UnitConverter_ConvertUnits_in2_to_ha_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "in2";
string targetUnitName = "ha";
- Measurement expected = new Measurement (Convert.ToDouble(6.4516E-08), "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"
-
+ #endregion
+ #region "Source as Square Centimeters"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -1246,7 +1233,7 @@ public void UnitConverter_ConvertUnits_cm2_to_ft2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm2";
string targetUnitName = "ft2";
- Measurement expected = new Measurement (Convert.ToDouble(0.107639104167097), "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);
@@ -1261,7 +1248,7 @@ public void UnitConverter_ConvertUnits_cm2_to_ft2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm2";
string targetUnitName = "ft2";
- Measurement expected = new Measurement (Convert.ToDouble(0.001076391040595), "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);
@@ -1276,7 +1263,7 @@ public void UnitConverter_ConvertUnits_cm2_to_mi2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm2";
string targetUnitName = "mi2";
- Measurement expected = new Measurement (Convert.ToDouble(3.861022E-09), "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);
@@ -1291,7 +1278,7 @@ public void UnitConverter_ConvertUnits_cm2_to_mi2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm2";
string targetUnitName = "mi2";
- Measurement expected = new Measurement (Convert.ToDouble(3.861E-11), "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);
@@ -1306,7 +1293,7 @@ public void UnitConverter_ConvertUnits_cm2_to_acre_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm2";
string targetUnitName = "acre";
- Measurement expected = new Measurement (Convert.ToDouble(2.471053815E-06), "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);
@@ -1321,7 +1308,7 @@ public void UnitConverter_ConvertUnits_cm2_to_acre_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm2";
string targetUnitName = "acre";
- Measurement expected = new Measurement (Convert.ToDouble(2.4710538E-08), "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);
@@ -1336,7 +1323,7 @@ public void UnitConverter_ConvertUnits_cm2_to_in2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm2";
string targetUnitName = "in2";
- Measurement expected = new Measurement (Convert.ToDouble(15.500031000062), "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);
@@ -1351,7 +1338,7 @@ public void UnitConverter_ConvertUnits_cm2_to_in2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm2";
string targetUnitName = "in2";
- Measurement expected = new Measurement (Convert.ToDouble(0.15500030984562), "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);
@@ -1366,7 +1353,7 @@ public void UnitConverter_ConvertUnits_cm2_to_m2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm2";
string targetUnitName = "m2";
- Measurement expected = new Measurement (Convert.ToDouble(0.01), "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);
@@ -1381,7 +1368,7 @@ public void UnitConverter_ConvertUnits_cm2_to_m2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm2";
string targetUnitName = "m2";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-05), "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);
@@ -1396,7 +1383,7 @@ public void UnitConverter_ConvertUnits_cm2_to_yd2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm2";
string targetUnitName = "yd2";
- Measurement expected = new Measurement (Convert.ToDouble(0.011959900463011), "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);
@@ -1411,7 +1398,7 @@ public void UnitConverter_ConvertUnits_cm2_to_yd2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm2";
string targetUnitName = "yd2";
- Measurement expected = new Measurement (Convert.ToDouble(0.000119599004511), "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);
@@ -1426,7 +1413,7 @@ public void UnitConverter_ConvertUnits_cm2_to_km2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm2";
string targetUnitName = "km2";
- Measurement expected = new Measurement (Convert.ToDouble(1E-08), "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);
@@ -1441,7 +1428,7 @@ public void UnitConverter_ConvertUnits_cm2_to_km2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm2";
string targetUnitName = "km2";
- Measurement expected = new Measurement (Convert.ToDouble(1E-10), "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);
@@ -1456,7 +1443,7 @@ public void UnitConverter_ConvertUnits_cm2_to_ha_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cm2";
string targetUnitName = "ha";
- Measurement expected = new Measurement (Convert.ToDouble(1E-06), "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);
@@ -1471,15 +1458,13 @@ public void UnitConverter_ConvertUnits_cm2_to_ha_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cm2";
string targetUnitName = "ha";
- Measurement expected = new Measurement (Convert.ToDouble(1E-08), "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"
-
+ #endregion
+ #region "Source as Square Yards"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -1489,7 +1474,7 @@ public void UnitConverter_ConvertUnits_yd2_to_m2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd2";
string targetUnitName = "m2";
- Measurement expected = new Measurement (Convert.ToDouble(83.612736), "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);
@@ -1504,7 +1489,7 @@ public void UnitConverter_ConvertUnits_yd2_to_m2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd2";
string targetUnitName = "m2";
- Measurement expected = new Measurement (Convert.ToDouble(0.836127359163873), "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);
@@ -1519,7 +1504,7 @@ public void UnitConverter_ConvertUnits_yd2_to_ft2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd2";
string targetUnitName = "ft2";
- Measurement expected = new Measurement (Convert.ToDouble(900), "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);
@@ -1534,7 +1519,7 @@ public void UnitConverter_ConvertUnits_yd2_to_ft2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd2";
string targetUnitName = "ft2";
- Measurement expected = new Measurement (Convert.ToDouble(8.999999991), "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);
@@ -1549,7 +1534,7 @@ public void UnitConverter_ConvertUnits_yd2_to_mi2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd2";
string targetUnitName = "mi2";
- Measurement expected = new Measurement (Convert.ToDouble(3.2283057851E-05), "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);
@@ -1564,7 +1549,7 @@ public void UnitConverter_ConvertUnits_yd2_to_mi2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd2";
string targetUnitName = "mi2";
- Measurement expected = new Measurement (Convert.ToDouble(3.22830578E-07), "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);
@@ -1579,7 +1564,7 @@ public void UnitConverter_ConvertUnits_yd2_to_acre_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd2";
string targetUnitName = "acre";
- Measurement expected = new Measurement (Convert.ToDouble(0.020661157024793), "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);
@@ -1594,7 +1579,7 @@ public void UnitConverter_ConvertUnits_yd2_to_acre_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd2";
string targetUnitName = "acre";
- Measurement expected = new Measurement (Convert.ToDouble(0.000206611570041), "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);
@@ -1609,7 +1594,7 @@ public void UnitConverter_ConvertUnits_yd2_to_in2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd2";
string targetUnitName = "in2";
- Measurement expected = new Measurement (Convert.ToDouble(129600), "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);
@@ -1624,7 +1609,7 @@ public void UnitConverter_ConvertUnits_yd2_to_in2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd2";
string targetUnitName = "in2";
- Measurement expected = new Measurement (Convert.ToDouble(1295.999998704), "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);
@@ -1639,7 +1624,7 @@ public void UnitConverter_ConvertUnits_yd2_to_cm2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd2";
string targetUnitName = "cm2";
- Measurement expected = new Measurement (Convert.ToDouble(836127.36), "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);
@@ -1655,7 +1640,7 @@ public void UnitConverter_ConvertUnits_yd2_to_cm2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd2";
string targetUnitName = "cm2";
- Measurement expected = new Measurement (Convert.ToDouble(8361.27359163873), "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);
@@ -1670,7 +1655,7 @@ public void UnitConverter_ConvertUnits_yd2_to_km2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd2";
string targetUnitName = "km2";
- Measurement expected = new Measurement (Convert.ToDouble(8.3612736E-05), "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);
@@ -1685,7 +1670,7 @@ public void UnitConverter_ConvertUnits_yd2_to_km2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd2";
string targetUnitName = "km2";
- Measurement expected = new Measurement (Convert.ToDouble(8.36127359E-07), "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);
@@ -1700,7 +1685,7 @@ public void UnitConverter_ConvertUnits_yd2_to_ha_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "yd2";
string targetUnitName = "ha";
- Measurement expected = new Measurement (Convert.ToDouble(0.0083612736), "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);
@@ -1715,15 +1700,13 @@ public void UnitConverter_ConvertUnits_yd2_to_ha_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "yd2";
string targetUnitName = "ha";
- Measurement expected = new Measurement (Convert.ToDouble(8.3612735916E-05), "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"
-
+ #endregion
+ #region "Source as Square Kilometers"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -1733,7 +1716,7 @@ public void UnitConverter_ConvertUnits_km2_to_m2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km2";
string targetUnitName = "m2";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -1748,7 +1731,7 @@ public void UnitConverter_ConvertUnits_km2_to_m2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km2";
string targetUnitName = "m2";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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);
@@ -1763,7 +1746,7 @@ public void UnitConverter_ConvertUnits_km2_to_ft2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km2";
string targetUnitName = "ft2";
- Measurement expected = new Measurement (Convert.ToDouble(1076391041.67097), "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);
@@ -1778,7 +1761,7 @@ public void UnitConverter_ConvertUnits_km2_to_ft2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km2";
string targetUnitName = "ft2";
- Measurement expected = new Measurement (Convert.ToDouble(10763910.4059458), "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);
@@ -1793,7 +1776,7 @@ public void UnitConverter_ConvertUnits_km2_to_mi2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km2";
string targetUnitName = "mi2";
- Measurement expected = new Measurement (Convert.ToDouble(38.6102158542446), "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);
@@ -1808,7 +1791,7 @@ public void UnitConverter_ConvertUnits_km2_to_mi2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km2";
string targetUnitName = "mi2";
- Measurement expected = new Measurement (Convert.ToDouble(0.386102158156344), "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);
@@ -1823,7 +1806,7 @@ public void UnitConverter_ConvertUnits_km2_to_acre_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km2";
string targetUnitName = "acre";
- Measurement expected = new Measurement (Convert.ToDouble(24710.5381467165), "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);
@@ -1838,7 +1821,7 @@ public void UnitConverter_ConvertUnits_km2_to_acre_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km2";
string targetUnitName = "acre";
- Measurement expected = new Measurement (Convert.ToDouble(247.10538122006), "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);
@@ -1854,7 +1837,7 @@ public void UnitConverter_ConvertUnits_km2_to_in2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km2";
string targetUnitName = "in2";
- Measurement expected = new Measurement (Convert.ToDouble(155000310000.62), "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);
@@ -1869,7 +1852,7 @@ public void UnitConverter_ConvertUnits_km2_to_in2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km2";
string targetUnitName = "in2";
- Measurement expected = new Measurement (Convert.ToDouble(1550003098.4562), "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);
@@ -1884,7 +1867,7 @@ public void UnitConverter_ConvertUnits_km2_to_cm2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km2";
string targetUnitName = "cm2";
- Measurement expected = new Measurement (Convert.ToDouble(1000000000000L), "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);
@@ -1899,7 +1882,7 @@ public void UnitConverter_ConvertUnits_km2_to_cm2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km2";
string targetUnitName = "cm2";
- Measurement expected = new Measurement (Convert.ToDouble(9999999990L), "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);
@@ -1914,7 +1897,7 @@ public void UnitConverter_ConvertUnits_km2_to_yd2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km2";
string targetUnitName = "yd2";
- Measurement expected = new Measurement (Convert.ToDouble(119599004.630108), "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);
@@ -1929,7 +1912,7 @@ public void UnitConverter_ConvertUnits_km2_to_yd2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km2";
string targetUnitName = "yd2";
- Measurement expected = new Measurement (Convert.ToDouble(1195990.04510509), "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);
@@ -1944,7 +1927,7 @@ public void UnitConverter_ConvertUnits_km2_to_ha_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "km2";
string targetUnitName = "ha";
- Measurement expected = new Measurement (Convert.ToDouble(10000), "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);
@@ -1959,15 +1942,13 @@ public void UnitConverter_ConvertUnits_km2_to_ha_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "km2";
string targetUnitName = "ha";
- Measurement expected = new Measurement (Convert.ToDouble(99.9999999), "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"
-
+ #endregion
+ #region "Source as Hectares"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -1977,7 +1958,7 @@ public void UnitConverter_ConvertUnits_ha_to_m2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ha";
string targetUnitName = "m2";
- Measurement expected = new Measurement (Convert.ToDouble(1000000.0), "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);
@@ -1992,7 +1973,7 @@ public void UnitConverter_ConvertUnits_ha_to_m2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ha";
string targetUnitName = "m2";
- Measurement expected = new Measurement (Convert.ToDouble(9999.99999), "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);
@@ -2007,7 +1988,7 @@ public void UnitConverter_ConvertUnits_ha_to_ft2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ha";
string targetUnitName = "ft2";
- Measurement expected = new Measurement (Convert.ToDouble(10763910.4167097), "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);
@@ -2022,7 +2003,7 @@ public void UnitConverter_ConvertUnits_ha_to_ft2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ha";
string targetUnitName = "ft2";
- Measurement expected = new Measurement (Convert.ToDouble(107639.104059458), "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);
@@ -2037,7 +2018,7 @@ public void UnitConverter_ConvertUnits_ha_to_mi2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ha";
string targetUnitName = "mi2";
- Measurement expected = new Measurement (Convert.ToDouble(0.386102158542446), "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);
@@ -2052,7 +2033,7 @@ public void UnitConverter_ConvertUnits_ha_to_mi2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ha";
string targetUnitName = "mi2";
- Measurement expected = new Measurement (Convert.ToDouble(0.003861021581563), "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);
@@ -2067,7 +2048,7 @@ public void UnitConverter_ConvertUnits_ha_to_acre_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ha";
string targetUnitName = "acre";
- Measurement expected = new Measurement (Convert.ToDouble(247.105381467165), "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);
@@ -2082,7 +2063,7 @@ public void UnitConverter_ConvertUnits_ha_to_acre_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ha";
string targetUnitName = "acre";
- Measurement expected = new Measurement (Convert.ToDouble(2.4710538122006), "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);
@@ -2097,7 +2078,7 @@ public void UnitConverter_ConvertUnits_ha_to_in2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ha";
string targetUnitName = "in2";
- Measurement expected = new Measurement (Convert.ToDouble(1550003100.0062), "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);
@@ -2112,7 +2093,7 @@ public void UnitConverter_ConvertUnits_ha_to_in2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ha";
string targetUnitName = "in2";
- Measurement expected = new Measurement (Convert.ToDouble(15500030.984562), "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);
@@ -2127,7 +2108,7 @@ public void UnitConverter_ConvertUnits_ha_to_cm2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ha";
string targetUnitName = "cm2";
- Measurement expected = new Measurement (Convert.ToDouble(10000000000L), "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);
@@ -2142,7 +2123,7 @@ public void UnitConverter_ConvertUnits_ha_to_cm2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ha";
string targetUnitName = "cm2";
- Measurement expected = new Measurement (Convert.ToDouble(99999999.9), "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);
@@ -2157,7 +2138,7 @@ public void UnitConverter_ConvertUnits_ha_to_yd2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ha";
string targetUnitName = "yd2";
- Measurement expected = new Measurement (Convert.ToDouble(1195990.04630108), "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);
@@ -2172,7 +2153,7 @@ public void UnitConverter_ConvertUnits_ha_to_yd2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ha";
string targetUnitName = "yd2";
- Measurement expected = new Measurement (Convert.ToDouble(11959.9004510509), "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);
@@ -2187,7 +2168,7 @@ public void UnitConverter_ConvertUnits_ha_to_km2_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "ha";
string targetUnitName = "km2";
- Measurement expected = new Measurement (Convert.ToDouble(1), "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);
@@ -2202,17 +2183,15 @@ public void UnitConverter_ConvertUnits_ha_to_km2_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "ha";
string targetUnitName = "km2";
- Measurement expected = new Measurement (Convert.ToDouble(0.00999999999), "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"
-
+ #endregion
+ #endregion
+ #region "Absorbed Radiation Dose Tests"
+ #region "Source as Gray"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -2222,7 +2201,7 @@ public void UnitConverter_ConvertUnits_Gy_to_cGy_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gy";
string targetUnitName = "cGy";
- Measurement expected = new Measurement (Convert.ToDouble(10000), "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);
@@ -2237,7 +2216,7 @@ public void UnitConverter_ConvertUnits_Gy_to_cGy_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gy";
string targetUnitName = "cGy";
- Measurement expected = new Measurement (Convert.ToDouble(99.9999999), "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);
@@ -2252,7 +2231,7 @@ public void UnitConverter_ConvertUnits_Gy_to_mGy_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gy";
string targetUnitName = "mGy";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -2267,7 +2246,7 @@ public void UnitConverter_ConvertUnits_Gy_to_mGy_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gy";
string targetUnitName = "mGy";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -2282,7 +2261,7 @@ public void UnitConverter_ConvertUnits_Gy_to_µGy_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gy";
string targetUnitName = "µGy";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "µ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);
@@ -2297,7 +2276,7 @@ public void UnitConverter_ConvertUnits_Gy_to_µGy_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gy";
string targetUnitName = "µGy";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "µ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);
@@ -2312,7 +2291,7 @@ public void UnitConverter_ConvertUnits_Gy_to_kGy_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "Gy";
string targetUnitName = "kGy";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -2327,15 +2306,13 @@ public void UnitConverter_ConvertUnits_Gy_to_kGy_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "Gy";
string targetUnitName = "kGy";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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"
-
+ #endregion
+ #region "Source as Centigray"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -2345,7 +2322,7 @@ public void UnitConverter_ConvertUnits_cGy_to_Gy_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cGy";
string targetUnitName = "Gy";
- Measurement expected = new Measurement (Convert.ToDouble(1), "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);
@@ -2360,7 +2337,7 @@ public void UnitConverter_ConvertUnits_cGy_to_Gy_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cGy";
string targetUnitName = "Gy";
- Measurement expected = new Measurement (Convert.ToDouble(0.00999999999), "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);
@@ -2375,7 +2352,7 @@ public void UnitConverter_ConvertUnits_cGy_to_mGy_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cGy";
string targetUnitName = "mGy";
- Measurement expected = new Measurement (Convert.ToDouble(1000), "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);
@@ -2390,7 +2367,7 @@ public void UnitConverter_ConvertUnits_cGy_to_mGy_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cGy";
string targetUnitName = "mGy";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999), "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);
@@ -2405,7 +2382,7 @@ public void UnitConverter_ConvertUnits_cGy_to_µGy_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cGy";
string targetUnitName = "µGy";
- Measurement expected = new Measurement (Convert.ToDouble(1000000), "µ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);
@@ -2420,7 +2397,7 @@ public void UnitConverter_ConvertUnits_cGy_to_µGy_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cGy";
string targetUnitName = "µGy";
- Measurement expected = new Measurement (Convert.ToDouble(9999.99999), "µ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);
@@ -2435,7 +2412,7 @@ public void UnitConverter_ConvertUnits_cGy_to_kGy_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "cGy";
string targetUnitName = "kGy";
- Measurement expected = new Measurement (Convert.ToDouble(0.001), "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);
@@ -2450,15 +2427,13 @@ public void UnitConverter_ConvertUnits_cGy_to_kGy_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "cGy";
string targetUnitName = "kGy";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-06), "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"
-
+ #endregion
+ #region "Source as Milligray"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -2468,7 +2443,7 @@ public void UnitConverter_ConvertUnits_mGy_to_Gy_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mGy";
string targetUnitName = "Gy";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -2483,7 +2458,7 @@ public void UnitConverter_ConvertUnits_mGy_to_Gy_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mGy";
string targetUnitName = "Gy";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -2498,7 +2473,7 @@ public void UnitConverter_ConvertUnits_mGy_to_cGy_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mGy";
string targetUnitName = "cGy";
- Measurement expected = new Measurement (Convert.ToDouble(10), "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);
@@ -2513,7 +2488,7 @@ public void UnitConverter_ConvertUnits_mGy_to_cGy_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mGy";
string targetUnitName = "cGy";
- Measurement expected = new Measurement (Convert.ToDouble(0.0999999999), "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);
@@ -2528,7 +2503,7 @@ public void UnitConverter_ConvertUnits_mGy_to_µGy_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mGy";
string targetUnitName = "µGy";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "µ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);
@@ -2543,7 +2518,7 @@ public void UnitConverter_ConvertUnits_mGy_to_µGy_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mGy";
string targetUnitName = "µGy";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "µ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);
@@ -2558,7 +2533,7 @@ public void UnitConverter_ConvertUnits_mGy_to_kGy_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "mGy";
string targetUnitName = "kGy";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -2573,15 +2548,13 @@ public void UnitConverter_ConvertUnits_mGy_to_kGy_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "mGy";
string targetUnitName = "kGy";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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"
-
+ #endregion
+ #region "Source as Microgray"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -2591,7 +2564,7 @@ public void UnitConverter_ConvertUnits_µGy_to_Gy_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µGy";
string targetUnitName = "Gy";
- Measurement expected = new Measurement (Convert.ToDouble(0.0001), "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);
@@ -2606,7 +2579,7 @@ public void UnitConverter_ConvertUnits_µGy_to_Gy_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µGy";
string targetUnitName = "Gy";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-07), "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);
@@ -2621,7 +2594,7 @@ public void UnitConverter_ConvertUnits_µGy_to_cGy_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µGy";
string targetUnitName = "cGy";
- Measurement expected = new Measurement (Convert.ToDouble(0.01), "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);
@@ -2636,7 +2609,7 @@ public void UnitConverter_ConvertUnits_µGy_to_cGy_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µGy";
string targetUnitName = "cGy";
- Measurement expected = new Measurement (Convert.ToDouble(9.99999999E-05), "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);
@@ -2651,7 +2624,7 @@ public void UnitConverter_ConvertUnits_µGy_to_mGy_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µGy";
string targetUnitName = "mGy";
- Measurement expected = new Measurement (Convert.ToDouble(0.1), "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);
@@ -2666,7 +2639,7 @@ public void UnitConverter_ConvertUnits_µGy_to_mGy_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µGy";
string targetUnitName = "mGy";
- Measurement expected = new Measurement (Convert.ToDouble(0.000999999999), "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);
@@ -2681,7 +2654,7 @@ public void UnitConverter_ConvertUnits_µGy_to_kGy_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "µGy";
string targetUnitName = "kGy";
- Measurement expected = new Measurement (Convert.ToDouble(1E-07), "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);
@@ -2696,15 +2669,13 @@ public void UnitConverter_ConvertUnits_µGy_to_kGy_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "µGy";
string targetUnitName = "kGy";
- Measurement expected = new Measurement (Convert.ToDouble(1E-09), "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"
-
+ #endregion
+ #region "Source as Kilogray"
[Test]
[TestCase(UnitTestCategory.Integration)]
[TestCase(UnitTestCategory.UnitConversion)]
@@ -2714,7 +2685,7 @@ public void UnitConverter_ConvertUnits_kGy_to_Gy_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kGy";
string targetUnitName = "Gy";
- Measurement expected = new Measurement (Convert.ToDouble(100000), "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);
@@ -2729,7 +2700,7 @@ public void UnitConverter_ConvertUnits_kGy_to_Gy_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kGy";
string targetUnitName = "Gy";
- Measurement expected = new Measurement (Convert.ToDouble(999.999999), "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);
@@ -2744,7 +2715,7 @@ public void UnitConverter_ConvertUnits_kGy_to_cGy_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kGy";
string targetUnitName = "cGy";
- Measurement expected = new Measurement (Convert.ToDouble(10000000), "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);
@@ -2759,7 +2730,7 @@ public void UnitConverter_ConvertUnits_kGy_to_cGy_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kGy";
string targetUnitName = "cGy";
- Measurement expected = new Measurement (Convert.ToDouble(99999.9999), "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);
@@ -2774,7 +2745,7 @@ public void UnitConverter_ConvertUnits_kGy_to_mGy_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kGy";
string targetUnitName = "mGy";
- Measurement expected = new Measurement (Convert.ToDouble(100000000), "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);
@@ -2789,7 +2760,7 @@ public void UnitConverter_ConvertUnits_kGy_to_mGy_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kGy";
string targetUnitName = "mGy";
- Measurement expected = new Measurement (Convert.ToDouble(999999.999), "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);
@@ -2804,7 +2775,7 @@ public void UnitConverter_ConvertUnits_kGy_to_µGy_Test ()
double value = Convert.ToDouble (100);
string currentUnitName = "kGy";
string targetUnitName = "µGy";
- Measurement expected = new Measurement (Convert.ToDouble(100000000000L), "µ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);
@@ -2819,18 +2790,16 @@ public void UnitConverter_ConvertUnits_kGy_to_µGy_Test2 ()
double value = Convert.ToDouble (0.999999999);
string currentUnitName = "kGy";
string targetUnitName = "µGy";
- Measurement expected = new Measurement (Convert.ToDouble(999999999), "µ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
+ #endregion
+ #endregion
+ #endregion
+ #region "UnitConverter.UnitConverter()"
+ // A test for UnitConverter Constructor
[Test]
[TestCase(UnitTestCategory.Unit)]
public void UnitConverterConstructorTest ()
@@ -2838,10 +2807,8 @@ public void UnitConverterConstructorTest ()
UnitConverter target = new UnitConverter ();
Assert.IsNotNull (target);
}
-
- #endregion
- #region "Empty and Null Tests"
-
+ #endregion
+ #region "Empty and Null Tests"
[Test]
[TestCase(UnitTestCategory.Unit)]
public void UnitConverter_ConvertUnitsNullTest ()
@@ -2913,7 +2880,6 @@ public void UnitConverter_ConvertUnitsEmptyTest3 ()
Assert.AreNotEqual (expected, actual);
Assert.AreEqual (expected.ConversionResult, actual.ConversionResult);
}
-
- #endregion
+ #endregion
}
}
\ No newline at end of file
diff --git a/Cubico.Tests/UnitProviderTest.cs b/Cubico.Tests/UnitProviderTest.cs
index 9130b33..553457c 100644
--- a/Cubico.Tests/UnitProviderTest.cs
+++ b/Cubico.Tests/UnitProviderTest.cs
@@ -11,13 +11,11 @@ public class UnitProviderTest
{
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 ()
@@ -28,7 +26,6 @@ public void UnitTypesTest ()
Assert.IsNotNull (actual);
Assert.IsTrue (actual.Count > 0);
}
-
// A test for Units
[Test]
public void UnitsTest ()
@@ -39,7 +36,6 @@ public void UnitsTest ()
Assert.IsNotNull (actual);
Assert.IsTrue (actual.Count > 0);
}
-
// A test for Symbols
[Test]
public void SymbolsTest ()
diff --git a/Cubico.Tests/UnitTest.cs b/Cubico.Tests/UnitTest.cs
index 538c291..3f52c3b 100644
--- a/Cubico.Tests/UnitTest.cs
+++ b/Cubico.Tests/UnitTest.cs
@@ -9,34 +9,29 @@ public class UnitTest
{
TestContext testContextInstance;
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 "Unit.Unit()"
-
+ #region "Unit.Unit()"
[Test]
- public void UnitNewTest ()
+ public void UnitNewTest ()
{
Unit testObj = new Unit ();
Assert.IsNotNull (testObj);
Assert.IsTrue (testObj.ID == 0);
- Assert.IsTrue (string.IsNullOrEmpty(testObj.DefaultSymbol));
+ 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));
+ Assert.IsTrue (string.IsNullOrEmpty (testObj.Name));
}
-
- #endregion
- #region "Unit.Unit(UnitType)"
-
+ #endregion
+ #region "Unit.Unit(UnitType)"
[Test]
[ExpectedException(typeof(ArgumentNullException))]
public void UnitNewEfUnitUnitTypeNullTest ()
@@ -47,7 +42,7 @@ public void UnitNewEfUnitUnitTypeNullTest ()
}
[Test]
- public void UnitNewEfUnitUnitTypeTest ()
+ public void UnitNewEfUnitUnitTypeTest ()
{
UnitType testunittype = new UnitType {
ID = 99,
@@ -67,12 +62,10 @@ public void UnitNewEfUnitUnitTypeTest ()
Assert.IsTrue (testObj.Modifiers.Count == 0);
// Assert.IsTrue(testUnit.UnitModifiers(0).Value = testObj.Modifiers(0).Value)
}
-
- #endregion
- #region "Unit.ParentType"
-
+ #endregion
+ #region "Unit.ParentType"
[Test]
- public void UnitParentTypeTest ()
+ public void UnitParentTypeTest ()
{
UnitType testUnitType = new UnitType {
ID = 99,
@@ -89,7 +82,7 @@ public void UnitParentTypeTest ()
}
[Test]
- public void UnitParentTypeNullTest ()
+ public void UnitParentTypeNullTest ()
{
Unit testObj = new Unit ();
@@ -97,12 +90,10 @@ public void UnitParentTypeNullTest ()
Assert.IsNull (testObj.UnitType);
}
-
- #endregion
- #region "Unit.ID"
-
+ #endregion
+ #region "Unit.ID"
[Test]
- public void UnitIDTest ()
+ public void UnitIDTest ()
{
Unit testObj = new Unit ();
@@ -110,12 +101,10 @@ public void UnitIDTest ()
Assert.AreEqual (99, testObj.ID);
}
-
- #endregion
- #region "Unit.Name"
-
+ #endregion
+ #region "Unit.Name"
[Test]
- public void UnitNameTest ()
+ public void UnitNameTest ()
{
Unit testObj = new Unit ();
@@ -123,12 +112,10 @@ public void UnitNameTest ()
Assert.AreEqual ("Test Name", testObj.Name);
}
-
- #endregion
- #region "IEquatable"
-
+ #endregion
+ #region "IEquatable"
[Test]
- public void Unit_EqualityTest ()
+ public void Unit_EqualityTest ()
{
Unit expected = unitPro.Units ["Feet"];
Unit target = unitPro.Units ["Feet"];
@@ -137,7 +124,7 @@ public void Unit_EqualityTest ()
}
[Test]
- public void Unit_EqualityTest2 ()
+ public void Unit_EqualityTest2 ()
{
Unit expected = unitPro.Units ["Feet"];
Unit target = unitPro.Units ["Inch"];
@@ -146,7 +133,7 @@ public void Unit_EqualityTest2 ()
}
[Test]
- public void Unit_EqualityTest3 ()
+ public void Unit_EqualityTest3 ()
{
Unit expected = null;
Unit target = unitPro.Units ["Inch"];
@@ -155,7 +142,7 @@ public void Unit_EqualityTest3 ()
}
[Test]
- public void Unit_EqualityTest4 ()
+ public void Unit_EqualityTest4 ()
{
Unit expected = unitPro.Units ["Inch"];
Unit target = null;
@@ -164,7 +151,7 @@ public void Unit_EqualityTest4 ()
}
[Test]
- public void Unit_EqualityTest5 ()
+ public void Unit_EqualityTest5 ()
{
Unit expected = null;
Unit target = null;
@@ -173,7 +160,7 @@ public void Unit_EqualityTest5 ()
}
[Test]
- public void Unit_EqualityTest6 ()
+ public void Unit_EqualityTest6 ()
{
Unit expected = unitPro.Units ["Feet"];
Unit target = unitPro.Units ["Inch"];
@@ -182,7 +169,7 @@ public void Unit_EqualityTest6 ()
}
[Test]
- public void Unit_EqualityTest7 ()
+ public void Unit_EqualityTest7 ()
{
Unit expected = unitPro.Units ["Feet"];
Unit target = null;
@@ -191,7 +178,7 @@ public void Unit_EqualityTest7 ()
}
[Test]
- public void Unit_EqualityTest8 ()
+ public void Unit_EqualityTest8 ()
{
Unit expected = null;
Unit target = unitPro.Units ["Feet"];
@@ -200,7 +187,7 @@ public void Unit_EqualityTest8 ()
}
[Test]
- public void Unit_EqualityTest8_1 ()
+ public void Unit_EqualityTest8_1 ()
{
Unit expected = null;
Unit target = null;
@@ -209,75 +196,74 @@ public void Unit_EqualityTest8_1 ()
}
[Test]
- public void Unit_EqualityTest9 ()
+ public void Unit_EqualityTest9 ()
{
Unit expected = unitPro.Units ["Inch"];
Unit target = unitPro.Units ["Feet"];
- Assert.IsFalse (expected.Equals(target));
+ Assert.IsFalse (expected.Equals (target));
}
[Test]
- public void Unit_EqualityTest10 ()
+ public void Unit_EqualityTest10 ()
{
Unit expected = unitPro.Units ["Feet"];
Unit target = unitPro.Units ["Feet"];
- Assert.IsTrue (expected.Equals(target));
+ Assert.IsTrue (expected.Equals (target));
}
[Test]
- public void Unit_EqualityTest11 ()
+ public void Unit_EqualityTest11 ()
{
Unit expected = unitPro.Units ["Feet"];
Unit target = unitPro.Units ["Inch"];
- Assert.IsFalse (expected.Equals(target));
+ Assert.IsFalse (expected.Equals (target));
}
[Test]
- public void Unit_EqualityTest12 ()
+ public void Unit_EqualityTest12 ()
{
Unit expected = unitPro.Units ["Feet"];
Unit target = null;
- Assert.IsFalse (expected.Equals(target));
+ Assert.IsFalse (expected.Equals (target));
}
[Test]
- public void Unit_EqualityTest13 ()
+ public void Unit_EqualityTest13 ()
{
Unit expected = unitPro.Units ["Feet"];
Unit target = unitPro.Units ["Feet"];
- Assert.IsTrue (expected.Equals((object)target));
+ Assert.IsTrue (expected.Equals ((object)target));
}
[Test]
- public void Unit_EqualityTest14 ()
+ public void Unit_EqualityTest14 ()
{
Unit expected = unitPro.Units ["Feet"];
Unit target = unitPro.Units ["Inch"];
- Assert.IsFalse (expected.Equals((object)target));
+ Assert.IsFalse (expected.Equals ((object)target));
}
[Test]
- public void Unit_EqualityTest154 ()
+ public void Unit_EqualityTest154 ()
{
Unit expected = unitPro.Units ["Feet"];
Unit target = null;
- Assert.IsFalse (expected.Equals((object)target));
+ Assert.IsFalse (expected.Equals ((object)target));
}
[Test]
- public void Unit_EqualityTest15 ()
+ public void Unit_EqualityTest15 ()
{
Unit expected = unitPro.Units ["Feet"];
- Assert.IsTrue (expected.GetHashCode() == expected.Name.GetHashCode());
+ Assert.IsTrue (expected.GetHashCode () == expected.Name.GetHashCode ());
}
-
- #endregion
+ #endregion
}
\ No newline at end of file
diff --git a/Cubico.Tests/UnitTestCategory.cs b/Cubico.Tests/UnitTestCategory.cs
index 0fec8c5..b76dfae 100644
--- a/Cubico.Tests/UnitTestCategory.cs
+++ b/Cubico.Tests/UnitTestCategory.cs
@@ -2,16 +2,16 @@
public class UnitTestCategory
{
- //Integration Test: Relies on external dependencies in order to complete, such as a database, file system or network.
+ // Integration Test: Relies on external dependencies in order to complete, such as a database, file system or network.
public const string Integration = "Integration";
- //Unit Test occurs within the code.
+ // Unit Test occurs within the code.
public const string Unit = "Unit";
- //CRUD Test: The test performs Create, Retrieve, Update, Delete calls on the database.
+ // CRUD Test: The test performs Create, Retrieve, Update, Delete calls on the database.
public const string CRUD = "CRUD";
- //Unit Test takes more than 3 seconds.
+ // Unit Test takes more than 3 seconds.
public const string SlowTest = "SlowTest";
- //Unit Test specifically for unit conversions drawing from the database.
+ // Unit Test specifically for unit conversions drawing from the database.
public const string UnitConversion = "UnitConversion";
- //Unit Test for expected exceptions.
+ // Unit Test for expected exceptions.
public const string ExceptionTest = "ExceptionTest";
}
\ No newline at end of file
diff --git a/Cubico.Tests/UnitTypeTest.cs b/Cubico.Tests/UnitTypeTest.cs
index c7fe0b6..9d68e68 100644
--- a/Cubico.Tests/UnitTypeTest.cs
+++ b/Cubico.Tests/UnitTypeTest.cs
@@ -7,17 +7,14 @@ public class UnitTypeTest
{
TestContext testContextInstance;
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 "UnitType.UnitType()"
-
+ #region "UnitType.UnitType()"
[Test]
- public void UnitTypeNewTest ()
+ public void UnitTypeNewTest ()
{
UnitType testObj = new UnitType ();
@@ -25,14 +22,12 @@ public void UnitTypeNewTest ()
Assert.IsTrue (testObj.ID == 0);
Assert.IsNotNull (testObj.Units);
Assert.IsTrue (testObj.Units.Count == 0);
- Assert.IsTrue (string.IsNullOrEmpty(testObj.Name));
+ Assert.IsTrue (string.IsNullOrEmpty (testObj.Name));
}
-
- #endregion
- #region "UnitType.ID"
-
+ #endregion
+ #region "UnitType.ID"
[Test]
- public void UnitTypeIDTest ()
+ public void UnitTypeIDTest ()
{
UnitType testObj = new UnitType ();
@@ -40,12 +35,10 @@ public void UnitTypeIDTest ()
Assert.AreEqual (99, testObj.ID);
}
-
- #endregion
- #region "UnitType.Name"
-
+ #endregion
+ #region "UnitType.Name"
[Test]
- public void UnitTypeNameTest ()
+ public void UnitTypeNameTest ()
{
UnitType testObj = new UnitType ();
@@ -53,12 +46,10 @@ public void UnitTypeNameTest ()
Assert.AreEqual ("Test Name", testObj.Name);
}
-
- #endregion
- #region "IEquatable"
-
+ #endregion
+ #region "IEquatable"
[Test]
- public void UnitType_EqualityTest ()
+ public void UnitType_EqualityTest ()
{
UnitType expected = unitPro.UnitTypes ["Length"];
UnitType target = unitPro.UnitTypes ["Length"];
@@ -67,7 +58,7 @@ public void UnitType_EqualityTest ()
}
[Test]
- public void UnitType_EqualityTest2 ()
+ public void UnitType_EqualityTest2 ()
{
UnitType expected = unitPro.UnitTypes ["Length"];
UnitType target = unitPro.UnitTypes ["Mass"];
@@ -76,7 +67,7 @@ public void UnitType_EqualityTest2 ()
}
[Test]
- public void UnitType_EqualityTest3 ()
+ public void UnitType_EqualityTest3 ()
{
UnitType expected = null;
UnitType target = unitPro.UnitTypes ["Mass"];
@@ -85,7 +76,7 @@ public void UnitType_EqualityTest3 ()
}
[Test]
- public void UnitType_EqualityTest4 ()
+ public void UnitType_EqualityTest4 ()
{
UnitType expected = unitPro.UnitTypes ["Mass"];
UnitType target = null;
@@ -94,7 +85,7 @@ public void UnitType_EqualityTest4 ()
}
[Test]
- public void UnitType_EqualityTest5 ()
+ public void UnitType_EqualityTest5 ()
{
UnitType expected = null;
UnitType target = null;
@@ -103,7 +94,7 @@ public void UnitType_EqualityTest5 ()
}
[Test]
- public void UnitType_EqualityTest6 ()
+ public void UnitType_EqualityTest6 ()
{
UnitType expected = unitPro.UnitTypes ["Length"];
UnitType target = unitPro.UnitTypes ["Mass"];
@@ -112,7 +103,7 @@ public void UnitType_EqualityTest6 ()
}
[Test]
- public void UnitType_EqualityTest7 ()
+ public void UnitType_EqualityTest7 ()
{
UnitType expected = unitPro.UnitTypes ["Length"];
UnitType target = null;
@@ -121,7 +112,7 @@ public void UnitType_EqualityTest7 ()
}
[Test]
- public void UnitType_EqualityTest8 ()
+ public void UnitType_EqualityTest8 ()
{
UnitType expected = null;
UnitType target = unitPro.UnitTypes ["Length"];
@@ -130,7 +121,7 @@ public void UnitType_EqualityTest8 ()
}
[Test]
- public void UnitType_EqualityTest8_1 ()
+ public void UnitType_EqualityTest8_1 ()
{
UnitType expected = null;
UnitType target = null;
@@ -139,75 +130,74 @@ public void UnitType_EqualityTest8_1 ()
}
[Test]
- public void UnitType_EqualityTest9 ()
+ public void UnitType_EqualityTest9 ()
{
UnitType expected = unitPro.UnitTypes ["Mass"];
UnitType target = unitPro.UnitTypes ["Length"];
- Assert.IsFalse (expected.Equals(target));
+ Assert.IsFalse (expected.Equals (target));
}
[Test]
- public void UnitType_EqualityTest10 ()
+ public void UnitType_EqualityTest10 ()
{
UnitType expected = unitPro.UnitTypes ["Length"];
UnitType target = unitPro.UnitTypes ["Length"];
- Assert.IsTrue (expected.Equals(target));
+ Assert.IsTrue (expected.Equals (target));
}
[Test]
- public void UnitType_EqualityTest11 ()
+ public void UnitType_EqualityTest11 ()
{
UnitType expected = unitPro.UnitTypes ["Length"];
UnitType target = unitPro.UnitTypes ["Mass"];
- Assert.IsFalse (expected.Equals(target));
+ Assert.IsFalse (expected.Equals (target));
}
[Test]
- public void UnitType_EqualityTest12 ()
+ public void UnitType_EqualityTest12 ()
{
UnitType expected = unitPro.UnitTypes ["Length"];
UnitType target = null;
- Assert.IsFalse (expected.Equals(target));
+ Assert.IsFalse (expected.Equals (target));
}
[Test]
- public void UnitType_EqualityTest13 ()
+ public void UnitType_EqualityTest13 ()
{
UnitType expected = unitPro.UnitTypes ["Length"];
UnitType target = unitPro.UnitTypes ["Length"];
- Assert.IsTrue (expected.Equals((object)target));
+ Assert.IsTrue (expected.Equals ((object)target));
}
[Test]
- public void UnitType_EqualityTest14 ()
+ public void UnitType_EqualityTest14 ()
{
UnitType expected = unitPro.UnitTypes ["Length"];
UnitType target = unitPro.UnitTypes ["Mass"];
- Assert.IsFalse (expected.Equals((object)target));
+ Assert.IsFalse (expected.Equals ((object)target));
}
[Test]
- public void UnitType_EqualityTest154 ()
+ public void UnitType_EqualityTest154 ()
{
UnitType expected = unitPro.UnitTypes ["Length"];
UnitType target = null;
- Assert.IsFalse (expected.Equals((object)target));
+ Assert.IsFalse (expected.Equals ((object)target));
}
[Test]
- public void UnitType_EqualityTest15 ()
+ public void UnitType_EqualityTest15 ()
{
UnitType expected = unitPro.UnitTypes ["Length"];
- Assert.IsTrue (expected.GetHashCode() == expected.Name.GetHashCode());
+ Assert.IsTrue (expected.GetHashCode () == expected.Name.GetHashCode ());
}
-
- #endregion
+ #endregion
}
\ No newline at end of file
diff --git a/Cubico.userprefs b/Cubico.userprefs
deleted file mode 100644
index 0e663a0..0000000
--- a/Cubico.userprefs
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Cubico/ConversionResult.cs b/Cubico/ConversionResult.cs
index 777fe2e..79b0e7f 100644
--- a/Cubico/ConversionResult.cs
+++ b/Cubico/ConversionResult.cs
@@ -7,8 +7,7 @@ namespace Cubico
[DataContract]
public class ConversionResult : IEquatable
{
- #region "Constructors"
-
+ #region "Constructors"
public ConversionResult ()
{
_result = Cubico.Result.NoError;
@@ -38,14 +37,12 @@ public ConversionResult (Result result)
{
_result = result;
}
-
- #endregion
- #region "Properties"
-
+ #endregion
+ #region "Properties"
Result _result;
[DataMember]
- public Result Result {
+ public Result Result {
get { return _result; }
set { _result = value; }
}
@@ -53,7 +50,7 @@ public Result Result {
double _value;
[DataMember]
- public double Value {
+ public double Value {
get { return _value; }
set { _value = value; }
}
@@ -61,14 +58,12 @@ public double Value {
string _symbol;
[DataMember]
- public string Symbol {
+ public string Symbol {
get { return _symbol; }
set { _symbol = value; }
}
-
- #endregion
- #region "IEquatable"
-
+ #endregion
+ #region "IEquatable"
public override int GetHashCode ()
{
return (this.Value.ToString () + this.Symbol.ToString () + this.Result.ToString ()).GetHashCode ();
@@ -78,7 +73,7 @@ public override bool Equals (object obj)
{
if (obj == null) {
return false;
- } else if (!object.ReferenceEquals (obj.GetType(), typeof(ConversionResult))) {
+ } else if (!object.ReferenceEquals (obj.GetType (), typeof(ConversionResult))) {
return false;
}
@@ -113,7 +108,6 @@ public bool Equals (ConversionResult other)
{
return left.Equals (right);
}
-
- #endregion
+ #endregion
}
}
\ No newline at end of file
diff --git a/Cubico/Measurement.cs b/Cubico/Measurement.cs
index a12008f..96d1350 100644
--- a/Cubico/Measurement.cs
+++ b/Cubico/Measurement.cs
@@ -5,7 +5,7 @@
namespace Cubico
{
- // A structure that defines a measurement with a numeric value and a unit of measure.
+ // A structure that defines a measurement with a numeric value and a unit of measure.
[Serializable]
[DataContract]
[KnownType(typeof(Unit))]
@@ -15,14 +15,13 @@ namespace Cubico
[KnownType(typeof(ConversionResult))]
public struct Measurement : IEquatable, IComparable
{
- #region "Private Fields"
-
+ #region "Private Fields"
MeasurementFlags _flags;
UnitConverter _uc;
double _maxbound;
double _minbound;
- double _standardValue;
- // Unit _standardUnit;
+ public double _standardValue;
+ //Unit _standardUnit;
double _value;
Unit _unit;
string _symbol;
@@ -30,10 +29,8 @@ public struct Measurement : IEquatable, IComparable
public event EventHandler OnValueChanged;
public event EventHandler OnUnitChanged;
-
- #endregion
- #region "Constructors"
-
+ #endregion
+ #region "Constructors"
internal Measurement (string unitSymbol)
{
// Reference the unit converter that created us.
@@ -114,27 +111,22 @@ internal Measurement (double value, Unit unit, Result conversionResult = Result.
OnValueChanged = null;
OnUnitChanged = null;
}
-
- #endregion
- #region "measurement flags and properties methods"
-
- // Gets a reference to the current unit of the measurement.
+ #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.
+ // 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.
+ // Gets the unit converter associated with this measurement.
public UnitConverter Converter {
get { return _uc; }
}
-
- // Displays the result of a conversion.
+ // 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; }
@@ -154,8 +146,7 @@ public string Symbol {
}
}
}
-
- // Gets the current value of the measurement in string form.
+ // Gets the current value of the measurement in string form.
public string FullValue {
get {
string str = _value.ToString ();
@@ -185,11 +176,9 @@ public bool IsValid {
}
}
}
-
- #endregion
- #region "Value getting and setting methods"
-
- // Sets the unit of the measurement.
+ #endregion
+ #region "Value getting and setting methods"
+ // Sets the unit of the measurement.
internal Result SetUnit (string unitSymbol)
{
Unit unit = _uc.GetUnitBySymbol (unitSymbol);
@@ -211,8 +200,7 @@ internal Result SetUnit (string unitSymbol)
return Result.NoError;
}
}
-
- // Given a string in the format "[value] [unit]" parses and applies the value and unit.
+ // Given a string in the format "[value] [unit]" parses and applies the value and unit.
internal Result SetValue (string measurement)
{
if (string.IsNullOrEmpty (measurement)) {
@@ -247,8 +235,7 @@ internal Result SetValue (string measurement)
SetValue (d);
return res;
}
-
- // Sets a value in the currently set unit format.
+ // Sets a value in the currently set unit format.
internal Result SetValue (double value)
{
Measurement res = default(Measurement);
@@ -270,8 +257,7 @@ internal Result SetValue (double value)
return res.ConversionResult;
}
-
- // Gets the value of the measurement in the specified units.
+ // Gets the value of the measurement in the specified units.
public Measurement GetValueAs (string unitSymbol)
{
return _uc.ConvertUnits (_value, _unit.Name, unitSymbol);
@@ -288,11 +274,9 @@ public string GetStringValueAs (string unitSymbol)
return res.FullValue;
}
}
-
- #endregion
- #region "Validation methods"
-
- // Validates input to the measurement.
+ #endregion
+ #region "Validation methods"
+ // Validates input to the measurement.
public Result ValidateEntry (string entry)
{
string unit = null;
@@ -341,11 +325,9 @@ Result ValidateEntryUnitData (string unit, double x)
return Result.NoError;
}
-
- #endregion
- #region "Bounds setting methods"
-
- // Sets the maximum bound of the measurement.
+ #endregion
+ #region "Bounds setting methods"
+ // Sets the maximum bound of the measurement.
public Result SetMaxBound (double maxbound, string unitSymbol)
{
if (string.IsNullOrEmpty (unitSymbol)) {
@@ -362,8 +344,7 @@ public Result SetMaxBound (double maxbound, string unitSymbol)
return Result.NoError;
}
-
- // Sets the minimum bound of the measurement.
+ // Sets the minimum bound of the measurement.
public Result SetMinBound (double minbound, string unitSymbol)
{
if (string.IsNullOrEmpty (unitSymbol)) {
@@ -380,17 +361,14 @@ public Result SetMinBound (double minbound, string unitSymbol)
return Result.NoError;
}
-
- #endregion
- #region "Operator overloads"
-
- // Gets a string representation of the measurement.
+ #endregion
+ #region "Operator overloads"
+ // Gets a string representation of the measurement.
public override string ToString ()
{
return this.FullValue;
}
-
- // Adds two measurements together.
+ // Adds two measurements together.
public static Measurement operator + (Measurement d1, Measurement d2)
{
double x = 0;
@@ -409,8 +387,7 @@ public override string ToString ()
var result = new Measurement (x + y, d1.Unit);
return result;
}
-
- // Subtracts two measurements.
+ // Subtracts two measurements.
public static Measurement operator - (Measurement d1, Measurement d2)
{
double x = 0;
@@ -429,8 +406,7 @@ public override string ToString ()
var result = new Measurement (x - y, d1.Unit);
return result;
}
-
- // Multiplies two measurements.
+ // Multiplies two measurements.
public static Measurement operator * (Measurement d1, Measurement d2)
{
double x = 0;
@@ -449,8 +425,7 @@ public override string ToString ()
var result = new Measurement (x * y, d1.Unit);
return result;
}
-
- // Divides two measurements.
+ // Divides two measurements.
public static Measurement operator / (Measurement d1, Measurement d2)
{
double x = 0;
@@ -499,10 +474,8 @@ public override string ToString ()
{
return (left.CompareTo (right) >= 0);
}
-
- #endregion
- #region "IEquatable(Of Measurement)"
-
+ #endregion
+ #region "IEquatable(Of Measurement)"
public override int GetHashCode ()
{
Measurement MeRes = default(Measurement);
@@ -523,7 +496,7 @@ public override int GetHashCode ()
public override bool Equals (object obj)
{
- if (obj == null || !object.ReferenceEquals (obj.GetType(), typeof(Measurement))) {
+ if (obj == null || !object.ReferenceEquals (obj.GetType (), typeof(Measurement))) {
return false;
}
@@ -565,10 +538,8 @@ public bool Equals (Measurement other)
}
}
}
-
- #endregion
- #region "ICompareTo(Of Measurement)"
-
+ #endregion
+ #region "ICompareTo(Of Measurement)"
public int CompareTo (Measurement other)
{
if (other.ConversionResult != Result.NoError) {
@@ -596,7 +567,6 @@ public int CompareTo (Measurement other)
return meRes.Value.CompareTo (otherRes.Value);
}
-
- #endregion
+ #endregion
}
}
\ No newline at end of file
diff --git a/Cubico/MeasurementFlags.cs b/Cubico/MeasurementFlags.cs
index 16c82f3..9515ba1 100644
--- a/Cubico/MeasurementFlags.cs
+++ b/Cubico/MeasurementFlags.cs
@@ -3,17 +3,11 @@
namespace Cubico
{
[Flags]
- public enum MeasurementFlags : int
+ 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
+ ForceUnit = 1, // Stops the data string unit being changed by reading user input.
+ UseMaxBound = 2, // Enforces a maximum value on the data string.
+ UseMinBound = 4 // Enforces a minimum value on the data string.
}
}
\ No newline at end of file
diff --git a/Cubico/Modifier.cs b/Cubico/Modifier.cs
index 8250212..38f6f59 100644
--- a/Cubico/Modifier.cs
+++ b/Cubico/Modifier.cs
@@ -7,15 +7,12 @@ namespace Cubico
[Serializable]
public partial class Modifier
{
- #region "Contructors"
-
+ #region "Contructors"
public Modifier () : base()
{
}
-
#endregion
#region "Primitive Properties"
-
[DataMember]
public int ID { get; set; }
@@ -33,10 +30,8 @@ public Modifier () : base()
[DataMember]
public Nullable Precision { get; set; }
-
#endregion
#region "ChangeTracking"
-
bool _isDeserializing;
protected bool IsDeserializing {
@@ -78,15 +73,12 @@ public void OnSerializedMethod (StreamingContext context)
protected virtual void ClearNavigationProperties ()
{
}
-
#endregion
- #region "Properties"
-
+ #region "Properties"
[DataMember]
public Unit ParentUnit { get; set; }
public ModifierType ModifierType { get; set; }
-
#endregion
}
}
\ No newline at end of file
diff --git a/Cubico/Result.cs b/Cubico/Result.cs
index 7073c38..a7d36c3 100644
--- a/Cubico/Result.cs
+++ b/Cubico/Result.cs
@@ -2,34 +2,15 @@
{
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
+ NoError = 0, // No error occured.
+ GenericError, // A general error occured.
+ UnitNotFound, // Specified unit was not found.
+ GroupNotFound, // Specified unit group was not found.
+ UnitExists, // Unit exists.
+ BadUnit, // Specified unit was invalid.
+ BadValue, // Specified value was invalid.
+ UnitMismatch, // Two units were used that are not in the same group.
+ ValueTooHigh, // An input value was too high.
+ ValueTooLow // An input value was too low.
}
}
\ No newline at end of file
diff --git a/Cubico/Symbol.cs b/Cubico/Symbol.cs
index 45103fe..5ca353c 100644
--- a/Cubico/Symbol.cs
+++ b/Cubico/Symbol.cs
@@ -3,15 +3,14 @@
namespace Cubico
{
- // Represents a unit of measure's symbol, or alternate methods to identify a unit of measure.
- // Inch = ", inches, in, in. etc.
+ // 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"
-
+ #region "Constructors"
public Symbol ()
{
}
@@ -24,10 +23,8 @@ public Symbol (Unit unit)
this.Unit = unit;
}
-
- #endregion
+ #endregion
#region "Primitive Properties"
-
[DataMember]
public int Id { get; set; }
@@ -39,10 +36,8 @@ public Symbol (Unit unit)
[DataMember]
public int UnitId { get; set; }
-
#endregion
#region "Navigation Properties"
-
[DataMember]
public Unit Unit {
get { return _unit; }
@@ -56,10 +51,8 @@ public Unit Unit {
}
Unit _unit;
-
#endregion
#region "ChangeTracking"
-
bool _isDeserializing;
protected bool IsDeserializing {
@@ -97,10 +90,8 @@ public void OnSerializedMethod (StreamingContext context)
{
IsSerializing = false;
}
-
#endregion
#region "Association Fixup"
-
void FixupUnit (Unit previousValue)
{
if (IsDeserializing) {
@@ -119,10 +110,8 @@ void FixupUnit (Unit previousValue)
UnitId = Unit.ID;
}
}
-
#endregion
- #region "IEquatable"
-
+ #region "IEquatable"
public override int GetHashCode ()
{
return this.Value.GetHashCode ();
@@ -132,7 +121,7 @@ public override bool Equals (object obj)
{
if ((object)obj == null) {
return false;
- } else if (!object.ReferenceEquals (obj.GetType(), this.GetType ())) {
+ } else if (!object.ReferenceEquals (obj.GetType (), this.GetType ())) {
return false;
} else {
return this.Equals ((Symbol)obj);
@@ -167,9 +156,7 @@ public bool Equals (Symbol other)
return left.Equals (right);
}
}
-
- #endregion
-
+ #endregion
public override string ToString ()
{
return this.Value;
diff --git a/Cubico/Unit.cs b/Cubico/Unit.cs
index e2e8f2c..2451070 100644
--- a/Cubico/Unit.cs
+++ b/Cubico/Unit.cs
@@ -12,8 +12,7 @@ namespace Cubico
[Serializable]
public partial class Unit : IEquatable
{
- #region "Constructors"
-
+ #region "Constructors"
public Unit () : base()
{
}
@@ -38,29 +37,25 @@ public bool IsDefault {
return false;
}
}
-
#endregion
- #region "Primitive Properties"
-
+ #region "Primitive Properties"
[DataMember]
- public int ID { get; set; }
+ public int ID { get; set; }
[DataMember]
- public string Name { get; set; }
+ public string Name { get; set; }
[DataMember]
- public int UnitTypeID { get; set; }
-
- #endregion
- #region "Navigation Properties"
-
+ public int UnitTypeID { get; set; }
+ #endregion
+ #region "Navigation Properties"
[DataMember]
- public UnitType UnitType { get; set; }
+ public UnitType UnitType { get; set; }
private List _symbols;
[DataMember]
- public List Symbols {
+ public List Symbols {
get {
if (_symbols == null && IsSerializing == false) {
_symbols = new List ();
@@ -77,7 +72,7 @@ public List Symbols {
private List _sources;
[DataMember]
- public List Sources {
+ public List Sources {
get {
if (_sources == null && IsSerializing == false) {
_sources = new List ();
@@ -94,7 +89,7 @@ public List Sources {
private List _modifiers;
[DataMember]
- public List Modifiers {
+ public List Modifiers {
get {
if (_modifiers == null && IsSerializing == false) {
_modifiers = new List ();
@@ -107,10 +102,8 @@ public List Modifiers {
}
}
}
-
- #endregion
- #region "ChangeTracking"
-
+ #endregion
+ #region "ChangeTracking"
private bool _isDeserializing;
protected bool IsDeserializing {
@@ -119,13 +112,13 @@ protected bool IsDeserializing {
}
[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;
}
@@ -138,13 +131,13 @@ protected bool IsSerializing {
}
[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;
}
@@ -156,10 +149,8 @@ protected virtual void ClearNavigationProperties ()
Sources.Clear ();
Modifiers.Clear ();
}
-
- #endregion
- #region "Properties"
-
+ #endregion
+ #region "Properties"
public string DefaultSymbol {
get {
Symbol symbol = (from s in this.Symbols
@@ -173,10 +164,8 @@ public string DefaultSymbol {
}
}
}
-
#endregion
- #region "IEquatable"
-
+ #region "IEquatable"
public override int GetHashCode ()
{
return this.Name.GetHashCode ();
@@ -186,7 +175,7 @@ public override bool Equals (object obj)
{
if ((object)obj == null) {
return false;
- } else if (!object.ReferenceEquals (obj.GetType(), this.GetType ())) {
+ } else if (!object.ReferenceEquals (obj.GetType (), this.GetType ())) {
return false;
} else {
return this.Equals ((Unit)obj);
@@ -221,9 +210,7 @@ public bool Equals (Unit other)
return left.Equals (right);
}
}
-
- #endregion
-
+ #endregion
public override string ToString ()
{
return this.Name;
diff --git a/Cubico/UnitConverter.cs b/Cubico/UnitConverter.cs
index 730a1ec..8c24237 100644
--- a/Cubico/UnitConverter.cs
+++ b/Cubico/UnitConverter.cs
@@ -7,14 +7,13 @@ namespace Cubico
{
public class UnitConverter
{
- //TODO: Fix this; was Previously NaN
+ //TODO: Fix this; was Previously NaN
const double _failsafeValue = 0;
- Dictionary _SymbolDictionary;
+ public Dictionary _SymbolDictionary;
Dictionary _IndividualSymbolDictionary;
Dictionary _UnitDictionary;
Dictionary _UnitTypeDictionary;
-
- // Constructor, sets up the unit converter.
+ // Constructor, sets up the unit converter.
public UnitConverter ()
{
//Set up the tables we need
@@ -25,10 +24,8 @@ public UnitConverter ()
_UnitTypeDictionary = unitPro.UnitTypes;
}
-
- #region "Unit related methods"
-
- // Given the full name of the unit, returns the unit entry.
+ #region "Unit related methods"
+ // Given the full name of the unit, returns the unit entry.
public Unit GetUnitByName (string unitName)
{
if (string.IsNullOrEmpty (unitName)) {
@@ -41,8 +38,7 @@ public Unit GetUnitByName (string unitName)
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.
+ // Given a unit symbol, gets the unit entry.
public Unit GetUnitBySymbol (string unitSymbol)
{
if (string.IsNullOrWhiteSpace (unitSymbol)) {
@@ -65,11 +61,9 @@ public Unit GetUnitBySymbol (string unitSymbol)
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.
+ #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)) {
@@ -86,8 +80,7 @@ public bool IsCompatible (string leftSymbol, string rightSymbol)
return (this.GetUnitType (leftUnit.Name) == this.GetUnitType (rightUnit.Name));
}
-
- // Creates a new unit group and adds it to the group table.
+ // Creates a new unit group and adds it to the group table.
Result CreateNewGroup (string groupName)
{
//Create the new group
@@ -98,8 +91,7 @@ Result CreateNewGroup (string groupName)
return Result.NoError;
}
-
- // Adds the named unit to the specified group.
+ // Adds the named unit to the specified group.
Result AddUnitToGroup (string unitName, string unitTypeName)
{
Unit unit = this._UnitDictionary [unitName];
@@ -120,8 +112,7 @@ Result AddUnitToGroup (string unitName, string unitTypeName)
return Result.NoError;
}
-
- // Given the name of a unit, searches for the unit group it belongs to.
+ // Given the name of a unit, searches for the unit group it belongs to.
UnitType GetUnitType (string unitName)
{
if (string.IsNullOrEmpty (unitName)) {
@@ -143,11 +134,9 @@ UnitType GetUnitType (string unitName)
return null;
}
}
-
- #endregion
- #region "Conversion methods"
-
- // Performs a unit conversion between two units, given a value to convert.
+ #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;
@@ -175,8 +164,7 @@ public Measurement ConvertUnits (double value, string currentUnitName, string ta
return ConvertCurrentToTarget (x, currentUnit.Name, targetUnit.Name);
}
-
- // Performs a unit conversion from the standard value into the specified unit.
+ // Performs a unit conversion from the standard value into the specified unit.
public Measurement ConvertCurrentToTarget (double value, string currentUnitName, string targetUnitName)
{
double x = value;
@@ -241,15 +229,13 @@ orderby m.Order
return new Measurement (output, targetUnit);
}
-
- #endregion
- #region "Parsing routines"
-
+ #endregion
+ #region "Parsing routines"
// Parses a number string with operators.
- ConversionResult ParseNumberString(string input)
+ ConversionResult ParseNumberString (string input)
{
- if (string.IsNullOrEmpty(input)) {
- throw new ArgumentException("input must have a value");
+ if (string.IsNullOrEmpty (input)) {
+ throw new ArgumentException ("input must have a value");
}
//Default value
@@ -258,30 +244,29 @@ ConversionResult ParseNumberString(string input)
//Split the numbers on the ^ operator
string[] numbers = null;
- numbers = input.Split(new char[] { '^' });
+ 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]);
+ value = Convert.ToDouble (numbers [0]);
} catch {
- return new ConversionResult(0, Result.BadValue);
+ 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])));
+ 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 (0, Result.BadValue);
}
}
- return new ConversionResult(value);
+ return new ConversionResult (value);
}
-
- // Given a string in the format "[value] [unit]", splits and returns the parts.
+ // Given a string in the format "[value] [unit]", splits and returns the parts.
public Measurement ParseUnitString (string input)
{
//Defaults
@@ -307,7 +292,7 @@ public Measurement ParseUnitString (string input)
break; // TODO: might not be correct. Was : Exit While
}
}
- System.Math.Max (System.Threading.Interlocked.Increment(ref i), i - 1);
+ System.Math.Max (System.Threading.Interlocked.Increment (ref i), i - 1);
}
s1 = input.Substring (0, i);
@@ -336,7 +321,6 @@ public Measurement ParseUnitString (string input)
return new Measurement (value, symbol);
}
-
- #endregion
+ #endregion
}
}
\ No newline at end of file
diff --git a/Cubico/UnitData.xml b/Cubico/UnitData.xml
index 299b20d..6e4469c 100644
--- a/Cubico/UnitData.xml
+++ b/Cubico/UnitData.xml
@@ -1,1636 +1,1636 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Cubico/UnitProvider.cs b/Cubico/UnitProvider.cs
index 9e8b097..722f3cd 100644
--- a/Cubico/UnitProvider.cs
+++ b/Cubico/UnitProvider.cs
@@ -7,29 +7,25 @@
namespace Cubico
{
- // Facilitates the loading and caching of the unit of measure data.
+ // Facilitates the loading and caching of the unit of measure data.
public class UnitProvider
{
- #region "Constructors"
-
+ #region "Constructors"
public UnitProvider ()
{
if (_dataFile == null) {
this.LoadDataFile ();
}
}
-
- #endregion
- #region "Properties"
-
+ #endregion
+ #region "Properties"
static XmlDocument _dataFile;
protected XmlDocument DataFile {
get{ return _dataFile;}
set{ _dataFile = value;}
}
-
- //Singleton
+ //Singleton
static Dictionary _unitTypes;
public Dictionary UnitTypes {
@@ -65,11 +61,9 @@ public Dictionary Symbols {
return _symbols;
}
}
-
- #endregion
- #region "Methods"
- #region "File Load Methods"
-
+ #endregion
+ #region "Methods"
+ #region "File Load Methods"
void LoadDataFile ()
{
const string fileName = "Cubico.UnitData.xml";
@@ -283,19 +277,15 @@ void ProcessUnitTypes (XmlNode parentNode)
}
}
}
-
- #endregion
- #region "UnitTypes"
-
- //TODO: Change to ReadOnlyDictionary when .Net 4.0 is available
+ #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
+ #endregion
+ #region "Units"
+ //TODO: Change to ReadOnlyDictionary when .Net 4.0 is available
Dictionary GetAllUnits ()
{
var unitDict = new Dictionary ();
@@ -317,11 +307,8 @@ Dictionary GetAllUnits ()
return unitDict;
}
-
- #endregion
- #region "Symbols"
-
-
+ #endregion
+ #region "Symbols"
public Dictionary IndividualSymbols {
get {
if (_individualSymbols == null) {
@@ -330,8 +317,7 @@ public Dictionary IndividualSymbols {
return _individualSymbols;
}
}
-
- //TODO: Change to ReadOnlyDictionary when .Net 4.0 is available
+ //TODO: Change to ReadOnlyDictionary when .Net 4.0 is available
Dictionary GetAllSymbols ()
{
var unitDict = new Dictionary ();
@@ -368,8 +354,7 @@ Dictionary GetAllSymbols ()
return unitDict;
}
-
- //TODO: Change to ReadOnlyDictionary when .Net 4.0 is available
+ //TODO: Change to ReadOnlyDictionary when .Net 4.0 is available
Dictionary GetAllIndividualSymbols ()
{
var unitDict = new Dictionary ();
@@ -394,8 +379,7 @@ Dictionary GetAllIndividualSymbols ()
return unitDict;
}
-
- #endregion
- #endregion
+ #endregion
+ #endregion
}
}
\ No newline at end of file
diff --git a/Cubico/UnitType.cs b/Cubico/UnitType.cs
index ccfb07c..0743666 100644
--- a/Cubico/UnitType.cs
+++ b/Cubico/UnitType.cs
@@ -6,21 +6,18 @@ namespace Cubico
{
[DataContract(IsReference = true)]
[KnownType(typeof(Unit))]
- [Serializable()]
+ [Serializable]
public partial class UnitType : IEquatable
{
- #region "Constructors"
-
+ #region "Constructors"
public UnitType () : base()
{
}
-
#endregion
#region "Primitive Properties"
-
int _iD;
- [DataMember()]
+ [DataMember]
public int ID {
get { return _iD; }
set {
@@ -32,7 +29,7 @@ public int ID {
string _name;
- [DataMember()]
+ [DataMember]
public string Name {
get { return _name; }
set {
@@ -44,7 +41,7 @@ public string Name {
string _description;
- [DataMember()]
+ [DataMember]
public string Description {
get { return _description; }
set {
@@ -53,11 +50,9 @@ public string Description {
}
}
}
-
#endregion
#region "Navigation Properties"
-
- [DataMember()]
+ [DataMember]
public List Units {
get {
if (_units == null && IsSerializing == false) {
@@ -73,10 +68,8 @@ public List Units {
}
List _units;
-
#endregion
#region "ChangeTracking"
-
bool _isDeserializing;
protected bool IsDeserializing {
@@ -84,13 +77,13 @@ protected bool IsDeserializing {
set { _isDeserializing = value; }
}
- [OnDeserializing()]
+ [OnDeserializing]
public void OnDeserializingMethod (StreamingContext context)
{
IsDeserializing = true;
}
- [OnDeserialized()]
+ [OnDeserialized]
public void OnDeserializedMethod (StreamingContext context)
{
IsDeserializing = false;
@@ -103,13 +96,13 @@ protected bool IsSerializing {
set { _isSerializing = value; }
}
- [OnSerializing()]
+ [OnSerializing]
public void OnSerializingMethod (StreamingContext context)
{
IsSerializing = true;
}
- [OnSerialized()]
+ [OnSerialized]
public void OnSerializedMethod (StreamingContext context)
{
IsSerializing = false;
@@ -119,10 +112,8 @@ protected virtual void ClearNavigationProperties ()
{
Units.Clear ();
}
-
#endregion
#region "IEquatable(Of UnitType)"
-
public override int GetHashCode ()
{
return (this.Name).GetHashCode ();
@@ -130,7 +121,7 @@ public override int GetHashCode ()
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;
}
@@ -167,7 +158,6 @@ public bool Equals (UnitType other)
return left.Equals (right);
}
}
-
#endregion
}
}
\ No newline at end of file
diff --git a/README.md b/README.md
index bf6ad8a..6c06866 100644
--- a/README.md
+++ b/README.md
@@ -2,24 +2,46 @@
An extensive Measurement & Unit Conversion library for .Net.
## What can it be used for?
-Taking and storing measurements reliably and performing calculations even between different units of measure
-and keeping the ability to send measurements over webservices while making it very easy to work with. And of
-course it can be used as an extensible unit converter giving the ability to easily add units of measure and their
-calculation between units very easily and precisely.
+Taking and storing measurements reliably, performing calculations between different units of measurement, and sending measurements over webservices, making it very easy to work with! Also, it can be used as an extensible unit converter, providing the ability to easily add units of measurement and their calculations between units very easily and precisely.
## Example Usage
- var length = new Measurement(2, "ft");
- var add = new Measurement(12, "in");
- var result = length + add;
- Console.WriteLine(result.GetValueAs("yrd").ToString()); //1 yard
+```csharp
+var length_in_ft = new Measurement(2, "ft");
+var length_in_in = new Measurement(12, "in");
+var result = length_in_ft + length_in_in;
+Console.WriteLine(result.GetValueAs("yrd").ToString()); // = 1 yard
+```
## Unit Categories to Date
-Length, Temperature, Mass, Area, Volume, Time, Speed, Force, Momentum, Power, Energy, Plane Angle, Fluid Volume
+* Area
+* Energy
+* Fluid Volume
+* Force
+* Length
+* Mass
+* Momentum
+* Plane Angle
+* Power
+* Speed
+* Temperature
+* Time
+* Volume
## Accuracy & Precision
-The accuracy of the unit conversions is one of the missions for this library. From my experience, alot of the
-unit converters out there are not precise especially when scientific precision is needed. And since using
-double precision is not precise by definition, it becomes very hard to come up with unit conversions that are
-precise. This library has come up with approximately 2000 unit tests testing each conversion with various test
-scenarios.
\ No newline at end of file
+The accuracy of unit conversions is one of the missions for this library. From experience, a lot of the unit converters out there are not precise, especially when scientific precision is needed. Since using double precision is not precise by definition, it becomes very hard to come up with unit conversions that are precise. This library has come up with approximately 2000 unit tests, each testing a conversion with various test scenarios.
+
+## License
+Copyright 2012-2013.
+
+This software is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except for what is in compliance with the License.
+
+You may obtain a copy of this license at
+
+```
+http://www.apache.org/licenses/LICENSE-2.0
+```
+
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or implied.
+
+See the License for the specific language governing permissions and limitations.