An ITypeConverter which can convert an XDocument to and from the stored database value of either an xml or string column.
Наследование: ITypeConverter
            public void AnArgumentNullExceptionShouldBeThrown()
            {
                var typeConverter = new XDocumentTypeConverter();

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

                Assert.Equal("type", exception.ParamName);
            }
            public void AnArgumentNullExceptionShouldBeThrown()
            {
                var typeConverter = new XDocumentTypeConverter();

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

                Assert.Equal("reader", exception.ParamName);
            }
            public void AnArgumentNullExceptionShouldBeThrown()
            {
                var typeConverter = new XDocumentTypeConverter();

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

                Assert.Equal("type", exception.ParamName);
            }
            public void TrueShouldBeReturned()
            {
                var typeConverter = new XDocumentTypeConverter();

                Assert.True(typeConverter.CanConvert(typeof(XDocument)));
            }