Пример #1
0
        private T ReadXmlText <T>(string xmlText)
        {
            var stringReader = new StringReader(xmlText);
            var reader       = new NXmlReader(typeSeedAssembly);

            return(reader.Read <T>(GetStream(xmlText)));
        }
Пример #2
0
        public void ThrowsExceptionIfReadingEmptyXmlString()
        {
            var xmlText      = string.Empty;
            var stringReader = new StringReader(xmlText);

            var reader = new NXmlReader(typeSeedAssembly);

            Assert.Throws <UnableToReadXMLTextException>(() => reader.Read <object>(GetStream(xmlText)));
        }
Пример #3
0
        public void ThrowsExceptionIfReadingEmptyXmlString()
        {
            var xmlText = string.Empty;
            var stringReader = new StringReader(xmlText);

            var reader = new NXmlReader(typeSeedAssembly);

            Assert.Throws<UnableToReadXMLTextException>(() => reader.Read<object>(GetStream(xmlText)));
        }
Пример #4
0
        protected T ReadXmlText <T>(string xmlText, IApplicationObjectsRepository appObjectRepository,
                                    IDocumentObjectsRepository docObjectRepository,
                                    IMigrationRulesBuilder migrationRulesBuilder)
        {
            var stringReader = new StringReader(xmlText);
            var reader       = new NXmlReader(typeSeedAssembly, appObjectRepository, docObjectRepository,
                                              migrationRulesBuilder, new TestPlugins());

            return(reader.Read <T>(GetStream(xmlText)));
        }
Пример #5
0
        public void ThrowsExceptionIfReadingNullStream()
        {
            var reader = new NXmlReader(typeSeedAssembly);

            Assert.Throws <UnableToReadXMLTextException>(() => reader.Read <object>(null));
        }
Пример #6
0
        public void ThrowsExceptionIfReadingNullStream()
        {
            var reader = new NXmlReader(typeSeedAssembly);

            Assert.Throws<UnableToReadXMLTextException>(() => reader.Read<object>(null));
        }