public void As_converts_cell_value_type_to_generic_argument_type()
        {
            var newCell = new ExcelCell("2");

            Assert.AreEqual(2, newCell.Cast <int>());
            Assert.AreEqual(typeof(int), newCell.Cast <int>().GetType());
        }
        public void ValueAs_returns_default_generic_value_when_value_is_DBNull()
        {
            var newCell = new ExcelCell(DBNull.Value);

            Assert.AreEqual(0, newCell.Cast <int>());
        }
Beispiel #3
0
 public void ValueAs_returns_default_generic_value_when_value_is_DBNull()
 {
     var newCell = new ExcelCell(DBNull.Value);
     Assert.AreEqual(0, newCell.Cast<int>());
 }
Beispiel #4
0
 public void As_converts_cell_value_type_to_generic_argument_type()
 {
     var newCell = new ExcelCell("2");
     Assert.AreEqual(2, newCell.Cast<int>());
     Assert.AreEqual(typeof(int), newCell.Cast<int>().GetType());
 }