System.Data.Tests.DataTableCollectionTest.CanRemove C# (CSharp) Метод

CanRemove() приватный Метод

private CanRemove ( ) : void
Результат void
        public void CanRemove()
        {
            DataTableCollection tbcol = _dataset[0].Tables;
            tbcol.Clear();
            /* _tables is array of DataTables defined in Setup */
            tbcol.AddRange(_tables);
            DataTable tbl = null;
            /* checking for a recently input table, expecting true */
            Assert.Equal(true, tbcol.CanRemove(_tables[0]));
            /* trying to check with a null reference, expecting false */
            Assert.Equal(false, tbcol.CanRemove(tbl));
            /* trying to check with a table that does not exist in collection, expecting false */
            Assert.Equal(false, tbcol.CanRemove(new DataTable("newTable")));
        }