public void IsNull_NullValueArguments()
{
DataTable table = new DataTable();
// add the row, with the value in the column
DataColumn staticColumn = table.Columns.Add("static", typeof(string), null);
DataRow row = table.Rows.Add("the value");
try
{
row.IsNull((string)null);
Assert.False(true);
}
catch (ArgumentNullException)
{
// do nothing as null columns aren't allowed
}
try
{
row.IsNull("");
Assert.False(true);
}
catch (ArgumentException)
{
// do nothing as we can't find a col with no name
}
try
{
row.IsNull(null, DataRowVersion.Default);
Assert.False(true);
}
catch (ArgumentNullException)
{
// do nothing as null columns aren't allowed
}
}