An ITypeConverter which can convert Enum values to and from database values.
It ensures that the database value is converted to and from the underlying storage type of the Enum to allow for db columns being byte, short, integer or long.
Inheritance: ITypeConverter
            public void AnArgumentNullExceptionShouldBeThrown()
            {
                var typeConverter = new EnumTypeConverter();

                var exception = Assert.Throws<ArgumentNullException>(
                    () => typeConverter.ConvertFromDbValue("foo", null));

                Assert.Equal("type", exception.ParamName);
            }
 public void FalseShouldBeReturned()
 {
     var typeConverter = new EnumTypeConverter();
     Assert.False(typeConverter.CanConvert(typeof(int)));
 }
            public void AnArgumentNullExceptionShouldBeThrown()
            {
                var typeConverter = new EnumTypeConverter();

                var exception = Assert.Throws<ArgumentNullException>(
                    () => typeConverter.ConvertFromDbValue(new Mock<IDataReader>().Object, 0, null));

                Assert.Equal("type", exception.ParamName);
            }
 public void TrueShouldBeReturned()
 {
     var typeConverter = new EnumTypeConverter();
     Assert.True(typeConverter.CanConvert(typeof(Int32EnumStatus?)));
 }
            public void AnArgumentNullExceptionShouldBeThrown()
            {
                var typeConverter = new EnumTypeConverter();

                var exception = Assert.Throws<ArgumentNullException>(
                    () => typeConverter.ConvertFromDbValue(null, 0, typeof(Int32EnumStatus)));

                Assert.Equal("reader", exception.ParamName);
            }