public void DataView()
{
DataTable dt = DataProvider.CreateParentDataTable();
DataView dv = new DataView(dt);
DataRowView drv1 = dv[0];
DataRowView drv2 = dv[4];
// check DataRowView.DataView
Assert.Equal(dv, drv1.DataView);
// compare DataRowView.DataView
Assert.Equal(drv2.DataView, drv1.DataView);
//check that the DataRowView still has the same DataView even when the source table changed
// check that the DataRowView still has the same DataView
dv.Table = null;
Assert.Equal(true, drv1.DataView == dv);
//check that the DataRowView has a new DataView
// check that the DataRowView has a new DataView
dv = new DataView();
Assert.Equal(true, drv1.DataView.Equals(dv));
}