private Scraper BuildSut(IScraperHttpClient scraperHttpClient = null, IScrapeRepository scrapeRepository = null, IOptions <ScraperOptions> options = null, ILogger <Scraper> logger = null) { if (scraperHttpClient == null) { scraperHttpClient = FakeHttpClient; } if (scrapeRepository == null) { scrapeRepository = FakeRepository; } if (options == null) { options = FakeOptions; var scraperOptions = new ScraperOptions() { MazeApiMaxPageSize = 250 }; A.CallTo(() => options.Value).Returns(scraperOptions); } if (logger == null) { logger = FakeLogger; } return(new Scraper(scraperHttpClient, scrapeRepository, options, logger)); }
public Scraper(IScraperHttpClient scraperHttpClient, IScrapeRepository scrapeRepository, IOptions <ScraperOptions> options, ILogger <Scraper> logger) { _scraperHttpClient = scraperHttpClient; _options = options.Value; _logger = logger; _scrapeRepository = scrapeRepository; }
public GetScrapeDetailQuery(IScrapeRepository repository) { if (repository == null) { throw new ArgumentNullException(nameof(repository)); } _repository = repository; }
public TriggerScrapeCommand(IScrapeRepository repository, IScraper scraper) { if (scraper == null) { throw new ArgumentNullException(nameof(scraper)); } if (repository == null) { throw new ArgumentNullException(nameof(repository)); } _scraper = scraper; }
public TvMazeScrapeService( IHttpClientFactory httpClientFactory, IScrapeRepository scrapeRepository, ILogger <TvMazeScrapeService> logger, IMapper mapper, IShowRepository showRepository, IPersonRepository personRepository, ICastMemberRepository castMemberRepository) { this.httpClientFactory = httpClientFactory; this.scrapeRepository = scrapeRepository; this.logger = logger; this.mapper = mapper; this.showRepository = showRepository; this.personRepository = personRepository; this.castMemberRepository = castMemberRepository; }
public ScrapeService(IScrapeRepository scrapeRepository, IStorageRepository storageRepository) { this.scrapeRepository = scrapeRepository; this.storageRepository = storageRepository; }