/// <inheritdoc /> public SyncTvMazeDbCommandHandler( ITvMazeService tvMazeService, IShowsRepository showsRepository, IPersonsRepository personsRepository) { _tvMazeService = tvMazeService ?? throw new ArgumentNullException(nameof(tvMazeService)); _showsRepository = showsRepository ?? throw new ArgumentNullException(nameof(showsRepository)); _personsRepository = personsRepository ?? throw new ArgumentNullException(nameof(personsRepository)); }
public SearchTvShowQueryHandlerTests() { _show1 = CreateShow1(); _show2 = CreateShow2(); _tvMazeService = Substitute.For <ITvMazeService>(); _subscriptionQueryDataSource = Substitute.For <ISubscriptionQueryDataSource>(); _handler = new SearchTvShowQueryHandler(_tvMazeService, _subscriptionQueryDataSource); }
/// <summary> /// Initializes a new instance of the <see cref="ScrapeController" /> class. /// </summary> /// <param name="showService">The show service.</param> /// <param name="tvMazeService">The tv maze service.</param> /// <param name="logger">The log service.</param> public ScrapeController( IShowService showService, ITvMazeService tvMazeService, ILogger <ScrapeController> logger) { this.showService = showService; this.tvMazeService = tvMazeService; this.logger = logger; }
/// <summary> /// Initializes a new instance of the <see cref="ScraperWorker" /> class. /// </summary> /// <param name="showService">The show service.</param> /// <param name="tvMazeService">The tv maze service.</param> /// <param name="hubContext">The hub context.</param> /// <param name="logger">The logger.</param> public ScraperWorker( IShowService showService, ITvMazeService tvMazeService, IHubContext <ScraperHub> hubContext, ILogger <ScraperWorker> logger) { this.showService = showService; this.tvMazeService = tvMazeService; this.hubContext = hubContext; this.logger = logger; }
public UpdateEpisodesServiceTests() { _subscription1 = CreateSubscription(1, 555, "The Stuff", DateTime.Now.AddDays(-2).Date); _subscription2 = CreateSubscription(2, 666, "The Stuff 2", DateTime.Now.AddDays(-3).Date); _regularEpisode1 = CreateRegularEpisode(2, 3, "Stuff happened", DateTime.Now.AddDays(2).Date); _regularEpisode2 = CreateRegularEpisode(2, 4, "Stuff didn't happen", DateTime.Now.AddDays(-1).Date); _regularEpisode3 = CreateRegularEpisode(1, 1, "Stuff 2 stuff", DateTime.Now.AddDays(-1).Date); _regularEpisode4 = CreateRegularEpisode(1, 2, "No stuff", DateTime.Now.AddDays(-3).Date); _regularEpisode5 = CreateRegularEpisode(1, 3, "Oh dear", DateTime.Now.AddDays(-4).Date); _specialEpisode1 = CreateSpecialEpisode(2, "Special stuff", DateTime.Now.AddDays(1).Date); _specialEpisode2 = CreateSpecialEpisode(1, "Stuff 2 Special", DateTime.Now.AddDays(-2).Date); _specialEpisode3 = CreateSpecialEpisode(1, "Stuff 2 Special 2", DateTime.Now.AddDays(-4).Date); _episodeCommandDataSource = Substitute.For <IEpisodeCommandDataSource>(); _tvMazeService = Substitute.For <ITvMazeService>(); _service = new UpdateEpisodesService(_episodeCommandDataSource, _tvMazeService); }
public TvMazeController(ITvMazeService tvMazeServiceService) { _tvMazeServiceService = tvMazeServiceService; }
public void Initialize() { var jsonJsonApiDataReader = new JsonApiDataReader(new Uri("http://api.tvmaze.com")); _tvMazeService = new TvMazeService(jsonJsonApiDataReader, GetLogger()); }
public TvMazeScraperTimerEventTrigger(ITvMazeService tvMazeService, IMediator mediator) { _tvMazeService = tvMazeService; _mediator = mediator; }
public UpdateEpisodesService(IEpisodeCommandDataSource episodeCommandDataSource, ITvMazeService tvMazeService) { _episodeCommandDataSource = episodeCommandDataSource; _tvMazeService = tvMazeService; }
public ScrapeTvMazeCommandHandler(ITvMazeService tvMazeService, ICommandHandler <SaveCastCommand> saveCastCommandHandler) { this.tvMazeService = tvMazeService ?? throw new ArgumentNullException(nameof(tvMazeService)); this.saveCastCommandHandler = saveCastCommandHandler ?? throw new ArgumentNullException(nameof(saveCastCommandHandler)); }
public TvMazeApiScraperService(IBookmarkDbRepository bookmarkDbRepository, ITvShowDbRepository tvShowDbRepository, ITvMazeService tvMazeService) { _bookmarkDbRepository = bookmarkDbRepository; _tvShowDbRepository = tvShowDbRepository; _tvMazeService = tvMazeService; }
public SearchTvShowQueryHandler(ITvMazeService tvMazeService, ISubscriptionQueryDataSource subscriptionQueryDataSource) { _tvMazeService = tvMazeService; _subscriptionQueryDataSource = subscriptionQueryDataSource; }