public void ClosingFunctionality()
        {
            DataTable table = new DataTable();
            table.Columns.Add("State", typeof(string));
            table.Rows.Add(new object[]{"TX"});
            table.Rows.Add(new object[]{"MO"});
            table.Rows.Add(new object[]{"AR"});

            TableDataReader reader = new TableDataReader(table);

            Assert.IsFalse(reader.IsClosed);
            reader.Close();
            Assert.IsTrue(reader.IsClosed);

            reader = new TableDataReader(table);
            reader.Dispose();
            Assert.IsTrue(reader.IsClosed);
        }
        public void ReadingAClosedReaderThrowsAnException()
        {
            DataTable table = new DataTable();
            table.Columns.Add("State", typeof(string));
            table.Rows.Add(new object[]{"TX"});
            table.Rows.Add(new object[]{"MO"});
            table.Rows.Add(new object[]{"AR"});

            TableDataReader reader = new TableDataReader(table);

            Assert.IsFalse(reader.IsClosed);
            reader.Close();
            Assert.IsTrue(reader.IsClosed);

            reader.Read();
        }