public void NullUtils_GetFloat_Value_Success() { var reader = new StubDataReader(new StubResultSet("unit_test").AddRow(6F)); reader.Read(); Assert.AreEqual(6F, NullUtils.GetFloat(reader, "unit_test"), "GetFloat(value) did not return the expected value"); }
public void NullUtils_GetFloat_Null_Success() { var reader = new StubDataReader(new StubResultSet("unit_test").AddRow(DBNull.Value)); reader.Read(); Assert.AreEqual(default(float), NullUtils.GetFloat(reader, "unit_test"), "GetFloat(null) should have returned the default float value"); }