Пример #1
0
        public void ParseJournalWithJournalWithoutAlternateEditionsReturnsOneJournal()
        {
            // Arrange
            var ulrichsSettings = new UlrichsSettings();
            var ulrichsImport   = new UlrichsImport(new UlrichsClient(ulrichsSettings), new UlrichsCache(ulrichsSettings));

            // Act
            var journals = ulrichsImport.ParseJournal(XElement.Parse(GetUlrichsJournalXmlWithoutAlternateEditions()));

            // Assert
            Assert.Equal(1, journals.Count());
        }
Пример #2
0
        public void ParseJournalWithJournalWithAlternateEditionsReturnsCorrectlyParsedJournal()
        {
            // Arrange
            var ulrichsSettings = new UlrichsSettings();
            var ulrichsImport   = new UlrichsImport(new UlrichsClient(ulrichsSettings), new UlrichsCache(ulrichsSettings));

            // Act
            var journals = ulrichsImport.ParseJournal(XElement.Parse(GetUlrichsJournalXmlWithAlternateEditions()));

            // Assert
            AssertEqualJournal(GetExpectedJournal(), journals.First());
        }
Пример #3
0
        public void ParseJournalWithJournalWithoutPublisherReturnsJournalWithDefaultPublisherName()
        {
            // Arrange
            var ulrichsSettings = new UlrichsSettings();
            var ulrichsImport   = new UlrichsImport(new UlrichsClient(ulrichsSettings), new UlrichsCache(ulrichsSettings));

            // Act
            var journals = ulrichsImport.ParseJournal(XElement.Parse(GetUlrichsJournalXmlWithoutPublisher()));

            // Assert
            var parsedJournal = journals.First();

            Assert.Equal("<none indicated>", parsedJournal.Publisher.Name);
        }