예제 #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 ();
 }
예제 #2
0
        public void UnitConverter_GetUnitByNameNull_Test()
        {
            UnitConverter target = new UnitConverter ();

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

            Assert.Fail ();
        }
예제 #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);
 }
예제 #4
0
        public void UnitConverter_GetUnitByNameEmpty_Test()
        {
            UnitConverter target = new UnitConverter ();

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

            Assert.Fail ();
        }