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

IsNull_BeforeGetValue() private method

private IsNull_BeforeGetValue ( ) : void
return void
        public void IsNull_BeforeGetValue()
        {
            DataTable table = new DataTable();

            // add the row, with the value in the column
            DataColumn staticColumn = table.Columns.Add("static", typeof(string), null); // static
            DataRow row = table.Rows.Add("the value");
            Assert.False(row.IsNull("static"));
            Assert.Equal("the value", row["static"]);

            // add the first derived column
            DataColumn firstColumn = table.Columns.Add("first", typeof(string), "static"); // first -> static
            Assert.False(row.IsNull("first"));
            Assert.Equal("the value", row["first"]);

            // add the second level of related
            DataColumn secondColumn = table.Columns.Add("second", typeof(string), "first"); // second -> first -> static
            Assert.False(row.IsNull("second"));
            Assert.Equal("the value", row["second"]);
        }
DataRowTest2