An ITypeConverter which can convert a Uri to and from the stored database value of a string column.
Наследование: ITypeConverter
Пример #1
0
            public void AnArgumentNullExceptionShouldBeThrown()
            {
                var typeConverter = new UriTypeConverter();

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

                Assert.Equal("type", exception.ParamName);
            }
Пример #2
0
            public void AnArgumentNullExceptionShouldBeThrown()
            {
                var typeConverter = new UriTypeConverter();

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

                Assert.Equal("reader", exception.ParamName);
            }
Пример #3
0
            public void TrueShouldBeReturned()
            {
                var typeConverter = new UriTypeConverter();

                Assert.True(typeConverter.CanConvert(typeof(System.Uri)));
            }