public void ShouldMapDataReaderToColumnInfoWhenReaderHasNullValues()
        {
            IDataReader reader = Mock <IDataReader>();
            ColumnInfo  result = null;

            using (Record) {
                Expect.Call(reader.IsDBNull(0)).IgnoreArguments().Repeat.Times(3).Return(true);
            }
            using (Playback) {
                result = MySqlTypeConverter.GetColumnInfoFrom(reader);
            }

            Assert.That(result, Is.EqualTo(ColumnInfo.Empty));
        }
        public void ShouldMapDataReaderToColumnInfo()
        {
            IDataReader reader         = Mock <IDataReader>();
            ColumnInfo  expectedColumn = new ColumnInfo("column_name", "varchar", 20);
            ColumnInfo  result         = null;

            using (Record) {
                Expect.Call(reader.GetString(0)).Return("column_name");
                Expect.Call(reader.GetString(1)).Return("varchar");
                Expect.Call(reader.GetInt32(2)).Return(20);
            }

            using (Playback) {
                result = MySqlTypeConverter.GetColumnInfoFrom(reader);
            }

            Assert.That(result, Is.EqualTo(expectedColumn));
        }