public void NullUtils_GetDouble_Value_Success() { var reader = new StubDataReader(new StubResultSet("unit_test").AddRow(4D)); reader.Read(); Assert.AreEqual(4D, NullUtils.GetDouble(reader, "unit_test"), "GetDouble(value) did not return the expected value"); }
public void NullUtils_GetDouble_Null_Success() { var reader = new StubDataReader(new StubResultSet("unit_test").AddRow(DBNull.Value)); reader.Read(); Assert.AreEqual(default(double), NullUtils.GetDouble(reader, "unit_test"), "GetDouble(null) should have returned the default double value"); }