System.Data.Tests.DataRowTest2.IsNull_NullValueArguments C# (CSharp) Method

IsNull_NullValueArguments() private method

private IsNull_NullValueArguments ( ) : void
return void
        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
            }
        }
DataRowTest2