public void NullUtils_GetInt16_Value_Success() { var reader = new StubDataReader(new StubResultSet("unit_test").AddRow((short)78)); reader.Read(); Assert.AreEqual((short)78, NullUtils.GetInt16(reader, "unit_test"), "GetInt16(value) did not return the expected value"); }
public void NullUtils_GetInt16_Null_Success() { var reader = new StubDataReader(new StubResultSet("unit_test").AddRow(DBNull.Value)); reader.Read(); Assert.AreEqual(default(short), NullUtils.GetInt16(reader, "unit_test"), "GetInt16(null) should have returned the default short value"); }