private T ReadXmlText <T>(string xmlText) { var stringReader = new StringReader(xmlText); var reader = new NXmlReader(typeSeedAssembly); return(reader.Read <T>(GetStream(xmlText))); }
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))); }
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))); }
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))); }
public void ThrowsExceptionIfReadingNullStream() { var reader = new NXmlReader(typeSeedAssembly); Assert.Throws <UnableToReadXMLTextException>(() => reader.Read <object>(null)); }
public void ThrowsExceptionIfReadingNullStream() { var reader = new NXmlReader(typeSeedAssembly); Assert.Throws<UnableToReadXMLTextException>(() => reader.Read<object>(null)); }