示例#1
0
 public void ConvertKilogramsToGrams(double kilograms, double expectedGrams) =>
 Assert.Equal(expectedGrams, UnitOfMeasureHelper.ConvertKilogramsToGrams(kilograms));
示例#2
0
 public void ConvertGramsToKilograms(double grams, double expectedKilograms) =>
 Assert.Equal(expectedKilograms, UnitOfMeasureHelper.ConvertGramsToKilograms(grams));
示例#3
0
 public void ConvertMetersToCentimetersTest(double centimeters, double expectedMeters) =>
 Assert.Equal(expectedMeters, UnitOfMeasureHelper.ConvertMetersToCentimeters(centimeters));
示例#4
0
 public void DimensionsToString(double val, UnitOfMeasure u, string expected)
 {
     Assert.AreEqual(expected, UnitOfMeasureHelper.DimensionToString(val, u));
 }
示例#5
0
 public void Converts(double val, UnitOfMeasure from, UnitOfMeasure to, double expected)
 {
     Assert.AreEqual(expected, UnitOfMeasureHelper.Convert(val, from, to));
 }
示例#6
0
 public void Precisions(UnitOfMeasure u, int expectedPrecision)
 {
     Assert.AreEqual(UnitOfMeasureHelper.GetPrecisionForUnit(u), expectedPrecision);
 }