Example #1
0
        public void ParseJournalsWithJournalTypeIsOpenAccessAndXmlWithAlternateEditionsWillParseOnlyOpenAccessJournalsFromXml()
        {
            // Arrange
            var ulrichsSettings = new UlrichsSettings();
            var ulrichsImport   = new UlrichsImport(new UlrichsClient(ulrichsSettings), new UlrichsCache(ulrichsSettings));

            // Act
            var journals = ulrichsImport.ParseJournals(GetUlrichsXmlWithAlternateEditions(), UlrichsImport.UlrichsJournalType.OpenAccess);

            // Assert
            Assert.Equal(123, journals.Count);
        }
Example #2
0
        public void ParseJournalsWithJournalTypeIsAllAndXmlWithoutAlternateEditionsWillParseAllJournalsFromXml()
        {
            // Arrange
            var ulrichsSettings = new UlrichsSettings();
            var ulrichsImport   = new UlrichsImport(new UlrichsClient(ulrichsSettings), new UlrichsCache(ulrichsSettings));

            // Act
            var journals = ulrichsImport.ParseJournals(GetUlrichsXml(), UlrichsImport.UlrichsJournalType.All);

            // Assert
            Assert.Equal(281, journals.Count);
        }