public void GetOrdinal()
        {
            DataTable table = new DataTable();

            table.Columns.Add("State", typeof(string));
            table.Columns.Add("Direction", typeof(string));
            table.Columns.Add("Count", typeof(int));
            table.Columns.Add("Sum", typeof(int));

            IDataReader reader = new TableDataReader(table);

            Assert.AreEqual(0, reader.GetOrdinal("State"));
            Assert.AreEqual(1, reader.GetOrdinal("Direction"));
            Assert.AreEqual(2, reader.GetOrdinal("Count"));
            Assert.AreEqual(3, reader.GetOrdinal("Sum"));
        }
        public void GetOrdinalWhenTheOrdinalCannotBeFound()
        {
            DataTable table = new DataTable();

            table.Columns.Add("State", typeof(string));
            table.Columns.Add("Direction", typeof(string));
            table.Columns.Add("Count", typeof(int));
            table.Columns.Add("Sum", typeof(int));

            IDataReader reader = new TableDataReader(table);

            Assert.AreEqual(0, reader.GetOrdinal("NotAColumn"));
        }