public AdminController(JournalsImport journalsImport, UlrichsImport ulrichsImport, DoajImport doajImport, JournalTocsImport journalsTocImport, JournalsExport journalsExport, IJournalRepository journalRepository, IUserProfileRepository userProfileRepository, IAuthentication authentication, IInstitutionRepository institutionRepository, IBlockedISSNRepository blockedIssnRepository, IBaseScoreCardRepository baseScoreCardRepository, IValuationScoreCardRepository valuationScoreCardRepository, IBulkImporter<SubmissionPageLink> bulkImporter, IBulkImporter<Institution> institutionImporter) : base(baseScoreCardRepository, valuationScoreCardRepository, userProfileRepository, authentication) { Requires.NotNull(journalsImport, nameof(journalsImport)); Requires.NotNull(ulrichsImport, nameof(ulrichsImport)); Requires.NotNull(journalsTocImport, nameof(journalsTocImport)); Requires.NotNull(doajImport, nameof(doajImport)); Requires.NotNull(journalsExport, nameof(journalsExport)); Requires.NotNull(journalRepository, nameof(journalRepository)); Requires.NotNull(institutionRepository, nameof(institutionRepository)); Requires.NotNull(blockedIssnRepository, nameof(blockedIssnRepository)); Requires.NotNull(bulkImporter, nameof(bulkImporter)); Requires.NotNull(institutionImporter, nameof(institutionImporter)); this.journalsImport = journalsImport; this.ulrichsImport = ulrichsImport; this.doajImport = doajImport; _journalsTocImport = journalsTocImport; this.journalsExport = journalsExport; this.journalRepository = journalRepository; this.institutionRepository = institutionRepository; this.blockedIssnRepository = blockedIssnRepository; _bulkImporter = bulkImporter; _institutionImporter = institutionImporter; }
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()); }
public void ParseJournalsWithJournalTypeIsOpenAccessAndXmlWithoutAlternateEditionsWillParseOnlyOpenAccessJournalsFromXml() { // Arrange var ulrichsSettings = new UlrichsSettings(); var ulrichsImport = new UlrichsImport(new UlrichsClient(ulrichsSettings), new UlrichsCache(ulrichsSettings)); // Act var journals = ulrichsImport.ParseJournals(GetUlrichsXml(), UlrichsImport.UlrichsJournalType.OpenAccess); // Assert Assert.Equal(77, journals.Count); }
public void ParseJournalsWithJournalTypeIsAllAndXmlWithAlternateEditionsWillParseAllJournalsAndAlternateEditionsFromXml() { // Arrange var ulrichsSettings = new UlrichsSettings(); var ulrichsImport = new UlrichsImport(new UlrichsClient(ulrichsSettings), new UlrichsCache(ulrichsSettings)); // Act var journals = ulrichsImport.ParseJournals(GetUlrichsXmlWithAlternateEditions(), UlrichsImport.UlrichsJournalType.All); // Assert Assert.Equal(483, journals.Count); }
public AdminController(JournalsImport journalsImport, UlrichsImport ulrichsImport, DoajImport doajImport, JournalsExport journalsExport, IJournalRepository journalRepository, IUserProfileRepository userProfileRepository, IAuthentication authentication, IInstitutionRepository institutionRepository) : base(userProfileRepository, authentication) { Requires.NotNull(journalsImport, "journalsImport"); Requires.NotNull(ulrichsImport, "ulrichsImport"); Requires.NotNull(doajImport, "doajImport"); Requires.NotNull(journalsExport, "journalsExport"); Requires.NotNull(journalRepository, "journalRepository"); Requires.NotNull(institutionRepository, "institutionRepository"); this.journalsImport = journalsImport; this.ulrichsImport = ulrichsImport; this.doajImport = doajImport; this.journalsExport = journalsExport; this.journalRepository = journalRepository; this.institutionRepository = institutionRepository; }
public void ParseJournalWithJournalWithAlternateEditionsReturnsMultipleJournals() { // Arrange var ulrichsSettings = new UlrichsSettings(); var ulrichsImport = new UlrichsImport(new UlrichsClient(ulrichsSettings), new UlrichsCache(ulrichsSettings)); // Act var journals = ulrichsImport.ParseJournal(XElement.Parse(GetUlrichsJournalXmlWithAlternateEditions())); // Assert Assert.Equal(2, journals.Count()); }
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); }