Exemple #1
0
 public void UnitConverter_GetUnitBySymbol_UnrecognizedSymbol_Test()
 {
     UnitConverter target = new UnitConverter ();
     string unitName = "BogusUnitSymbol";
     Unit actual = default(Unit);
     actual = target.GetUnitByName (unitName);
     Assert.Fail ();
 }
Exemple #2
0
        public void UnitConverter_GetUnitByNameNull_Test()
        {
            UnitConverter target = new UnitConverter ();

            Unit actual = default(Unit);
            actual = target.GetUnitByName (null);

            Assert.Fail ();
        }
Exemple #3
0
 public void UnitConverter_GetUnitByName_Test()
 {
     UnitConverter target = new UnitConverter ();
     string unitName = "Celsius";
     Unit expected = unitPro.Units ["Celsius"];
     Unit actual = default(Unit);
     actual = target.GetUnitByName (unitName);
     Assert.AreEqual (expected, actual);
 }
Exemple #4
0
        public void UnitConverter_GetUnitByNameEmpty_Test()
        {
            UnitConverter target = new UnitConverter ();

            Unit actual = default(Unit);
            actual = target.GetUnitByName (string.Empty);

            Assert.Fail ();
        }